mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
- update a lot of dependencies
- adaptions in code for compatibility with new package version (esp. react-bootstrap, react-dnd, and d3-scale) - add (ugly) workaround for flux containers to work with ES6 - use node 12.2 in Dockerfile
This commit is contained in:
parent
bc963c2600
commit
8ace42759a
57 changed files with 1533 additions and 1525 deletions
2622
package-lock.json
generated
2622
package-lock.json
generated
File diff suppressed because it is too large
Load diff
68
package.json
68
package.json
|
@ -3,47 +3,51 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.8",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.5.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.3",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.19",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.9.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.4",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"bootstrap": "^3.3.7",
|
||||
"bootstrap": "^4.3.1",
|
||||
"classnames": "^2.2.6",
|
||||
"d3-array": "^1.2.4",
|
||||
"d3-array": "^2.2.0",
|
||||
"d3-axis": "^1.0.12",
|
||||
"d3-scale": "^1.0.6",
|
||||
"d3-selection": "^1.3.2",
|
||||
"d3-shape": "^1.2.2",
|
||||
"d3-scale": "^3.0.0",
|
||||
"d3-scale-chromatic": "^1.3.3",
|
||||
"d3-selection": "^1.4.0",
|
||||
"d3-shape": "^1.3.5",
|
||||
"d3-time-format": "^2.1.3",
|
||||
"es6-promise": "^4.2.5",
|
||||
"file-saver": "^1.3.8",
|
||||
"flux": "^3.1.2",
|
||||
"gaugeJS": "^1.3.2",
|
||||
"handlebars": "^4.1.1",
|
||||
"immutable": "^3.8.1",
|
||||
"jszip": "^3.2.0",
|
||||
"es6-promise": "^4.2.8",
|
||||
"file-saver": "^2.0.2",
|
||||
"flux": "^3.1.3",
|
||||
"frontend-collective-react-dnd-scrollzone": "^1.0.2",
|
||||
"gaugeJS": "^1.3.7",
|
||||
"handlebars": "^4.1.2",
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"jquery": "^3.4.1",
|
||||
"jszip": "^3.2.2",
|
||||
"libcimsvg": "git+https://git.rwth-aachen.de/acs/public/cim/pintura-npm-package.git",
|
||||
"lodash": "^4.17.11",
|
||||
"prop-types": "^15.6.2",
|
||||
"rc-slider": "^8.6.3",
|
||||
"react": "^16.6.3",
|
||||
"react-bootstrap": "^0.31.1",
|
||||
"react-contexify": "^3.0.3",
|
||||
"lodash": "^4.17.15",
|
||||
"prop-types": "^15.7.2",
|
||||
"rc-slider": "^8.6.13",
|
||||
"react": "^16.8.6",
|
||||
"react-bootstrap": "^1.0.0-beta.9",
|
||||
"react-contexify": "^4.1.1",
|
||||
"react-d3": "^0.4.0",
|
||||
"react-dnd": "^2.6.0",
|
||||
"react-dnd-html5-backend": "^2.6.0",
|
||||
"react-dom": "^16.6.3",
|
||||
"react-fullscreenable": "^2.5.0",
|
||||
"react-dnd": "^9.3.2",
|
||||
"react-dnd-html5-backend": "^9.3.2",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-fullscreenable": "^2.5.1-0",
|
||||
"react-json-view": "^1.19.1",
|
||||
"react-notification-system": "^0.2.17",
|
||||
"react-rnd": "^7.4.3",
|
||||
"react-router": "^4.3.1",
|
||||
"react-router-dom": "^4.3.1",
|
||||
"react-rnd": "^10.0.0",
|
||||
"react-router": "^5.0.1",
|
||||
"react-router-dom": "^5.0.1",
|
||||
"react-scripts": "^3.0.1",
|
||||
"react-sortable-tree": "^0.1.19",
|
||||
"react-svg-pan-zoom": "^2.18.0",
|
||||
"superagent": "^3.8.3",
|
||||
"validator": "^10.9.0"
|
||||
"react-sortable-tree": "^2.6.2",
|
||||
"react-svg-pan-zoom": "^3.1.0",
|
||||
"superagent": "^5.1.0",
|
||||
"typescript": "^3.5.3",
|
||||
"validator": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.2.0"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:8.6 AS builder
|
||||
FROM node:12.2 AS builder
|
||||
|
||||
RUN apt-get install -y \
|
||||
git
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -80,12 +80,12 @@ class EditProjectDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="Edit Simulation" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="simulation">
|
||||
<ControlLabel>Simulation</ControlLabel>
|
||||
<FormLabel>Simulation</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select simulation" value={this.state.simulation} onChange={(e) => this.handleChange(e)}>
|
||||
{this.props.simulations.map(simulation => (
|
||||
<option key={simulation._id} value={simulation._id}>{simulation.name}</option>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
import ParametersEditor from '../parameters-editor';
|
||||
|
@ -85,13 +85,13 @@ class EditSimulationDialog extends React.Component {
|
|||
return <Dialog show={this.props.show} title='Edit Simulation' buttonTitle='Save' onClose={this.onClose} onReset={this.resetState} valid={true}>
|
||||
<form>
|
||||
<FormGroup controlId='name' validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type='text' placeholder='Enter name' value={this.state.name} onChange={this.handleChange} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup controlId='startParameters'>
|
||||
<ControlLabel>Start Parameters</ControlLabel>
|
||||
<FormLabel>Start Parameters</FormLabel>
|
||||
|
||||
<ParametersEditor content={this.state.startParameters} onChange={this.handleStartParametersChange} />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
import _ from 'lodash';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
@ -74,17 +74,17 @@ class EditSimulatorDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="Edit Simulator" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name">
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder={_.get(this.props.simulator, 'rawProperties.name')} value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="endpoint">
|
||||
<ControlLabel>Endpoint</ControlLabel>
|
||||
<FormLabel>Endpoint</FormLabel>
|
||||
<FormControl type="text" placeholder={_.get(this.props.simulator, 'rawProperties.endpoint')} value={this.state.endpoint || 'http://' } onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId='properties'>
|
||||
<ControlLabel>Properties</ControlLabel>
|
||||
<FormLabel>Properties</FormLabel>
|
||||
<ParametersEditor content={_.merge({}, this.props.simulator.rawProperties, this.props.simulator.properties)} disabled={true} />
|
||||
</FormGroup>
|
||||
</form>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -82,16 +82,16 @@ class EditUserDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="Edit user" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="username" validationState={this.validateForm('username')}>
|
||||
<ControlLabel>Username</ControlLabel>
|
||||
<FormLabel>Username</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter username" value={this.state.username} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="mail">
|
||||
<ControlLabel>E-mail</ControlLabel>
|
||||
<FormLabel>E-mail</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter e-mail" value={this.state.mail} onChange={(e) => this.handleChange(e)} />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="role" validationState={this.validateForm('role')}>
|
||||
<ControlLabel>Role</ControlLabel>
|
||||
<FormLabel>Role</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select role" value={this.state.role} onChange={(e) => this.handleChange(e)}>
|
||||
<option key='1' value='admin'>Administrator</option>
|
||||
<option key='2' value='user'>User</option>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -78,7 +78,7 @@ class EditVisualizationDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="Edit Visualization" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, Checkbox } from 'react-bootstrap';
|
||||
import { FormGroup, FormCheck } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetAspectControl extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -40,10 +40,10 @@ class EditWidgetAspectControl extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<FormGroup>
|
||||
<Checkbox id="lockAspect" checked={this.state.widget.lockAspect} onChange={e => this.props.handleChange(e)}>Lock Aspect</Checkbox>
|
||||
<FormCheck id="lockAspect" checked={this.state.widget.lockAspect} onChange={e => this.props.handleChange(e)}>Lock Aspect</FormCheck>
|
||||
</FormGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EditWidgetAspectControl;
|
||||
export default EditWidgetAspectControl;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, Checkbox } from 'react-bootstrap';
|
||||
import { FormGroup, FormCheck } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetCheckboxControl extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -37,9 +37,9 @@ class EditWidgetCheckboxControl extends React.Component {
|
|||
|
||||
render() {
|
||||
return <FormGroup>
|
||||
<Checkbox id={this.props.controlId} checked={this.state.widget[this.props.controlId] || ''} onChange={e => this.props.handleChange(e)}>{this.props.text}</Checkbox>
|
||||
<FormCheck id={this.props.controlId} checked={this.state.widget[this.props.controlId] || ''} onChange={e => this.props.handleChange(e)}>{this.props.text}</FormCheck>
|
||||
</FormGroup>;
|
||||
}
|
||||
}
|
||||
|
||||
export default EditWidgetCheckboxControl;
|
||||
export default EditWidgetCheckboxControl;
|
||||
|
|
|
@ -21,16 +21,18 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, Col, Row, Radio, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, Col, Row, FormCheck, FormLabel } from 'react-bootstrap';
|
||||
import classNames from 'classnames';
|
||||
import { scaleOrdinal, schemeCategory20 } from 'd3-scale';
|
||||
import { scaleOrdinal } from 'd3-scale';
|
||||
import {schemeCategory10} from 'd3-scale-chromatic'
|
||||
// schemeCategory20 no longer available in d3
|
||||
|
||||
class EditWidgetColorControl extends Component {
|
||||
|
||||
static get ColorPalette() {
|
||||
let colorCount = 0;
|
||||
const colors = [];
|
||||
const colorScale = scaleOrdinal(schemeCategory20);
|
||||
const colorScale = scaleOrdinal(schemeCategory10);
|
||||
while (colorCount < 20) { colors.push(colorScale(colorCount)); colorCount++; }
|
||||
colors.unshift('#000', '#FFF'); // include black and white
|
||||
|
||||
|
@ -55,7 +57,7 @@ class EditWidgetColorControl extends Component {
|
|||
return (
|
||||
<FormGroup bsClass="color-control">
|
||||
<Row>
|
||||
<Col componentClass={ControlLabel} style={{whiteSpace: 'nowrap' }} sm={2}>
|
||||
<Col componentClass={FormLabel} style={{whiteSpace: 'nowrap' }} sm={2}>
|
||||
{ this.props.label }
|
||||
</Col>
|
||||
<Col sm={10} bsClass='colors-column'>
|
||||
|
@ -70,7 +72,7 @@ class EditWidgetColorControl extends Component {
|
|||
'checked': idx === this.state.widget[this.props.controlId]
|
||||
});
|
||||
|
||||
return (<Radio key={idx} name={this.props.controlId} style={colorStyle} className={checkedClass} value={idx} inline onChange={(e) => this.props.handleChange({target: { id: this.props.controlId, value: idx}})} />)
|
||||
return (<FormCheck type='radio' key={idx} name={this.props.controlId} style={colorStyle} className={checkedClass} value={idx} inline onChange={(e) => this.props.handleChange({target: { id: this.props.controlId, value: idx}})} />)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, ControlLabel, Button } from 'react-bootstrap';
|
||||
import { FormGroup, FormLabel, Button } from 'react-bootstrap';
|
||||
|
||||
|
||||
import Icon from '../icon';
|
||||
|
@ -115,7 +115,7 @@ class EditWidgetColorZonesControl extends React.Component {
|
|||
|
||||
render() {
|
||||
return <FormGroup>
|
||||
<ControlLabel>Color zones</ControlLabel>
|
||||
<FormLabel>Color zones</FormLabel>
|
||||
|
||||
<Table data={this.state.widget.zones}>
|
||||
<TableColumn width="20" checkbox onChecked={this.checkedCell} />
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetHTMLContent extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -43,7 +43,7 @@ class EditWidgetHTMLContent extends React.Component {
|
|||
|
||||
render() {
|
||||
return <FormGroup controlId={this.props.controlId}>
|
||||
<ControlLabel>HTML Content</ControlLabel>
|
||||
<FormLabel>HTML Content</FormLabel>
|
||||
<FormControl onKeyPress={this.handleKeyIgnore} componentClass="textarea" style={{ height: 200 }} placeholder={this.props.placeholder} value={this.state.widget[this.props.controlId] || ''} onChange={e => this.props.handleChange(e)} />
|
||||
</FormGroup>;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel, Button, ProgressBar } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, Button, ProgressBar } from 'react-bootstrap';
|
||||
|
||||
import AppDispatcher from '../../app-dispatcher';
|
||||
|
||||
|
@ -72,7 +72,7 @@ class EditImageWidgetControl extends React.Component {
|
|||
render() {
|
||||
return <div>
|
||||
<FormGroup controlId="file">
|
||||
<ControlLabel>Image</ControlLabel>
|
||||
<FormLabel>Image</FormLabel>
|
||||
<FormControl componentClass="select" value={this.state.widget.file} onChange={(e) => this.props.handleChange(e)}>
|
||||
{this.props.files.length === 0 ? (
|
||||
<option disabled value style={{ display: 'none' }}>No images found, please upload one first.</option>
|
||||
|
@ -88,7 +88,7 @@ class EditImageWidgetControl extends React.Component {
|
|||
</FormGroup>
|
||||
|
||||
<FormGroup controlId="upload">
|
||||
<ControlLabel>Upload</ControlLabel>
|
||||
<FormLabel>Upload</FormLabel>
|
||||
<FormControl type="file" onChange={(e) => this.setState({ fileList: e.target.files }) } />
|
||||
</FormGroup>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel, Checkbox, Table } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, FormCheck, Table } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetMinMaxControl extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -42,8 +42,8 @@ class EditWidgetMinMaxControl extends React.Component {
|
|||
|
||||
render() {
|
||||
return <FormGroup>
|
||||
<ControlLabel>{this.props.label}</ControlLabel>
|
||||
<Checkbox id={this.props.controlId + "UseMinMax"} checked={this.state.widget[this.props.controlId + "UseMinMax"] || ''} onChange={e => this.props.handleChange(e)}>Enable min-max</Checkbox>
|
||||
<FormLabel>{this.props.label}</FormLabel>
|
||||
<FormCheck id={this.props.controlId + "UseMinMax"} checked={this.state.widget[this.props.controlId + "UseMinMax"] || ''} onChange={e => this.props.handleChange(e)}>Enable min-max</FormCheck>
|
||||
|
||||
<Table>
|
||||
<tbody>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetNumberControl extends Component {
|
||||
constructor(props) {
|
||||
|
@ -39,7 +39,7 @@ class EditWidgetNumberControl extends Component {
|
|||
render() {
|
||||
return (
|
||||
<FormGroup controlId={this.props.controlId}>
|
||||
<ControlLabel>{this.props.label}</ControlLabel>
|
||||
<FormLabel>{this.props.label}</FormLabel>
|
||||
<FormControl type="number" step="any" defaultValue={this.props.defaultValue} value={this.state.widget[this.props.controlId] || 0} onChange={e => this.props.handleChange(e)} />
|
||||
</FormGroup>
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, Col, Row, Radio, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, Col, Row, FormCheck, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import WidgetSlider from '../widgets/slider';
|
||||
|
||||
|
@ -48,7 +48,7 @@ class EditWidgetOrientation extends Component {
|
|||
return (
|
||||
<FormGroup controlId="orientation">
|
||||
<Row>
|
||||
<Col componentClass={ControlLabel} sm={2}>
|
||||
<Col componentClass={FormLabel} sm={2}>
|
||||
Orientation
|
||||
</Col>
|
||||
<Col sm={10}>
|
||||
|
@ -58,9 +58,9 @@ class EditWidgetOrientation extends Component {
|
|||
let name = WidgetSlider.OrientationTypes[type].name;
|
||||
|
||||
return (
|
||||
<Radio inline key={value} name='orientation' checked={ value === this.state.widget.orientation } onChange={(e) => this.handleOrientationChange(value)}>
|
||||
<FormCheck inline key={value} type='radio' name='orientation' checked={ value === this.state.widget.orientation } onChange={(e) => this.handleOrientationChange(value)}>
|
||||
{ name }
|
||||
</Radio>)
|
||||
</FormCheck>)
|
||||
})
|
||||
}
|
||||
</Col>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormLabel } from 'react-bootstrap';
|
||||
import ParametersEditor from '../parameters-editor';
|
||||
|
||||
class EditWidgetParametersControl extends Component {
|
||||
|
@ -49,7 +49,7 @@ class EditWidgetParametersControl extends Component {
|
|||
render() {
|
||||
return (
|
||||
<FormGroup controlId={this.props.controlId} validationState={this.props.validate ? this.props.validate(this.props.controlId) : null}>
|
||||
<ControlLabel>{this.props.label}</ControlLabel>
|
||||
<FormLabel>{this.props.label}</FormLabel>
|
||||
<ParametersEditor content={this.state.widget[this.props.controlId] || {}} onChange={(v)=> this.handleChange(v)} />
|
||||
</FormGroup>
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetSignalControl extends Component {
|
||||
constructor(props) {
|
||||
|
@ -53,7 +53,7 @@ class EditWidgetSignalControl extends Component {
|
|||
|
||||
return (
|
||||
<FormGroup controlId="signal">
|
||||
<ControlLabel>Signal</ControlLabel>
|
||||
<FormLabel>Signal</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select signal" value={this.state.widget.signal} onChange={(e) => this.props.handleChange(e)}>
|
||||
{
|
||||
signalsToRender.length === 0 ? (
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, Checkbox, ControlLabel, FormControl } from 'react-bootstrap';
|
||||
import { FormGroup, FormCheck, FormLabel, FormControl } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetSignalsControl extends Component {
|
||||
constructor(props) {
|
||||
|
@ -65,13 +65,13 @@ class EditWidgetSignalsControl extends Component {
|
|||
|
||||
return (
|
||||
<FormGroup>
|
||||
<ControlLabel>Signals</ControlLabel>
|
||||
<FormLabel>Signals</FormLabel>
|
||||
{
|
||||
signalsToRender.length === 0 || !this.state.widget.hasOwnProperty(this.props.controlId)? (
|
||||
<FormControl.Static>No signals available.</FormControl.Static>
|
||||
) : (
|
||||
signalsToRender.map((signal, index) => (
|
||||
<Checkbox key={index} checked={this.state.widget[this.props.controlId].indexOf(index) !== -1} onChange={(e) => this.handleSignalChange(e.target.checked, index)}>{signal.name}</Checkbox>
|
||||
<FormCheck key={index} checked={this.state.widget[this.props.controlId].indexOf(index) !== -1} onChange={(e) => this.handleSignalChange(e.target.checked, index)}>{signal.name}</FormCheck>
|
||||
))
|
||||
)
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetSimulationControl extends Component {
|
||||
constructor(props) {
|
||||
|
@ -41,7 +41,7 @@ class EditWidgetSimulationControl extends Component {
|
|||
render() {
|
||||
return (
|
||||
<FormGroup controlId="simulationModel">
|
||||
<ControlLabel>Simulation Model</ControlLabel>
|
||||
<FormLabel>Simulation Model</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select simulation model" value={this.state.widget.simulationModel || '' } onChange={(e) => this.props.handleChange(e)}>
|
||||
{
|
||||
this.props.simulationModels.length === 0 ? (
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetTextControl extends Component {
|
||||
constructor(props) {
|
||||
|
@ -39,7 +39,7 @@ class EditWidgetTextControl extends Component {
|
|||
render() {
|
||||
return (
|
||||
<FormGroup controlId={this.props.controlId} validationState={this.props.validate ? this.props.validate(this.props.controlId) : null}>
|
||||
<ControlLabel>{this.props.label}</ControlLabel>
|
||||
<FormLabel>{this.props.label}</FormLabel>
|
||||
<FormControl type="text" placeholder={this.props.placeholder} value={this.state.widget[this.props.controlId] || ''} onChange={e => this.props.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetTextSizeControl extends React.Component {
|
||||
render() {
|
||||
|
@ -28,7 +28,7 @@ class EditWidgetTextSizeControl extends React.Component {
|
|||
|
||||
return (
|
||||
<FormGroup controlId="textSize">
|
||||
<ControlLabel>Text size</ControlLabel>
|
||||
<FormLabel>Text size</FormLabel>
|
||||
<FormControl componentClass="select" value={this.props.widget.textSize} onChange={e => this.props.handleChange(e)}>
|
||||
{sizes.map((size, index) => (
|
||||
<option key={index} value={size}>{size}</option>
|
||||
|
@ -39,4 +39,4 @@ class EditWidgetTextSizeControl extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default EditWidgetTextSizeControl;
|
||||
export default EditWidgetTextSizeControl;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel, HelpBlock } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, FormText } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetTimeControl extends Component {
|
||||
constructor(props) {
|
||||
|
@ -41,9 +41,9 @@ class EditWidgetTimeControl extends Component {
|
|||
|
||||
return (
|
||||
<FormGroup controlId="time">
|
||||
<ControlLabel>Time</ControlLabel>
|
||||
<FormLabel>Time</FormLabel>
|
||||
<FormControl type="number" min="1" max="300" placeholder="Enter time" value={this.state.widget.time} onChange={(e) => this.props.handleChange(e)} />
|
||||
<HelpBlock>Time in seconds</HelpBlock>
|
||||
<FormText>Time in seconds</FormText>
|
||||
</FormGroup>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
//import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
//import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
import _ from 'lodash';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
@ -91,12 +91,12 @@ class ImportSimulationModelDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="Import Simulation Model" buttonTitle="Import" onClose={this.onClose} onReset={this.resetState} valid={this.imported}>
|
||||
<form>
|
||||
<FormGroup controlId='file'>
|
||||
<ControlLabel>Simulation Model File</ControlLabel>
|
||||
<FormLabel>Simulation Model File</FormLabel>
|
||||
<FormControl type='file' onChange={this.loadFile} />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup controlId='simulator'>
|
||||
<ControlLabel>Simulator</ControlLabel>
|
||||
<FormLabel>Simulator</FormLabel>
|
||||
<FormControl disabled={this.imported === false} componentClass='select' placeholder='Select simulator' value={this.state.model.simulator} onChange={this.handleSimulatorChange}>
|
||||
{this.props.simulators.map(simulator => (
|
||||
<option key={simulator._id} value={simulator._id}>{_.get(simulator, 'properties.name') || _.get(simulator, 'rawProperties.name')}</option>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
import ParametersEditor from '../parameters-editor';
|
||||
|
@ -119,25 +119,25 @@ class ImportSimulationDialog extends React.Component {
|
|||
return <Dialog show={this.props.show} title="Import Simulation" buttonTitle="Import" onClose={this.onClose} onReset={this.resetState} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="file">
|
||||
<ControlLabel>Simulation File</ControlLabel>
|
||||
<FormLabel>Simulation File</FormLabel>
|
||||
<FormControl type="file" onChange={this.loadFile} />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl readOnly={this.imported === false} type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<ControlLabel>Start Parameters</ControlLabel>
|
||||
<FormLabel>Start Parameters</FormLabel>
|
||||
|
||||
<ParametersEditor content={this.state.startParameters} onChange={this.handleStartParametersChange} disabled={this.imported === false} />
|
||||
</FormGroup>
|
||||
|
||||
{/* {this.state.models.map((model, index) => (
|
||||
<FormGroup controlId="simulator" key={index}>
|
||||
<ControlLabel>{model.name} - Simulator</ControlLabel>
|
||||
<FormLabel>{model.name} - Simulator</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select simulator" value={JSON.stringify({ node: model.simulator.node, simulator: model.simulator.simulator})} onChange={(e) => this.handleChange(e, index)}>
|
||||
{this.props.nodes.map(node => (
|
||||
node.simulators.map((simulator, index) => (
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
import _ from 'lodash';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
@ -118,22 +118,22 @@ class ImportSimulatorDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="New Simulator" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="file">
|
||||
<ControlLabel>Simulator File</ControlLabel>
|
||||
<FormLabel>Simulator File</FormLabel>
|
||||
<FormControl type="file" onChange={(e) => this.loadFile(e.target.files)} />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="endpoint">
|
||||
<ControlLabel>Endpoint</ControlLabel>
|
||||
<FormLabel>Endpoint</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter endpoint" value={this.state.endpoint} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="uuid" validationState={this.validateForm('uuid')}>
|
||||
<ControlLabel>UUID</ControlLabel>
|
||||
<FormLabel>UUID</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter uuid" value={this.state.uuid} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
@ -143,4 +143,4 @@ class ImportSimulatorDialog extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default ImportSimulatorDialog;
|
||||
export default ImportSimulatorDialog;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -118,12 +118,12 @@ class ImportVisualizationDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="Import Visualization" buttonTitle="Import" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="file">
|
||||
<ControlLabel>Visualization File</ControlLabel>
|
||||
<FormLabel>Visualization File</FormLabel>
|
||||
<FormControl type="file" onChange={(e) => this.loadFile(e.target.files)} />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl readOnly={!this.imported} type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -82,12 +82,12 @@ class NewProjectDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="New Project" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="simulation" validationState={this.validateForm('simulation')}>
|
||||
<ControlLabel>Simulation</ControlLabel>
|
||||
<FormLabel>Simulation</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select simulation" value={this.state.simulation} onChange={(e) => this.handleChange(e)}>
|
||||
{this.props.simulations.map(simulation => (
|
||||
<option key={simulation._id} value={simulation._id}>{simulation.name}</option>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
import ParametersEditor from '../parameters-editor';
|
||||
|
@ -81,13 +81,13 @@ class NewSimulationDialog extends React.Component {
|
|||
return <Dialog show={this.props.show} title="New Simulation" buttonTitle="Add" onClose={this.onClose} onReset={this.resetState} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={this.handleChange} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<ControlLabel>Start Parameters</ControlLabel>
|
||||
<FormLabel>Start Parameters</FormLabel>
|
||||
|
||||
<ParametersEditor content={this.state.startParameters} onChange={this.handleStartParametersChange} />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -99,17 +99,17 @@ class NewSimulatorDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="New Simulator" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="endpoint">
|
||||
<ControlLabel>Endpoint</ControlLabel>
|
||||
<FormLabel>Endpoint</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter endpoint" value={this.state.endpoint} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="uuid" validationState={this.validateForm('uuid')}>
|
||||
<ControlLabel>UUID</ControlLabel>
|
||||
<FormLabel>UUID</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter uuid" value={this.state.uuid} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel, HelpBlock } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, FormText } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -84,23 +84,23 @@ class NewUserDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="New user" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="username" validationState={this.validateForm('username')}>
|
||||
<ControlLabel>Username</ControlLabel>
|
||||
<FormLabel>Username</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter username" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
<HelpBlock>Min 3 characters.</HelpBlock>
|
||||
<FormText>Min 3 characters.</FormText>
|
||||
</FormGroup>
|
||||
<FormGroup controlId="mail">
|
||||
<ControlLabel>E-mail</ControlLabel>
|
||||
<FormLabel>E-mail</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter e-mail" value={this.state.mail} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="password" validationState={this.validateForm('password')}>
|
||||
<ControlLabel>Password</ControlLabel>
|
||||
<FormLabel>Password</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter password" value={this.state.password} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId="role" validationState={this.validateForm('role')}>
|
||||
<ControlLabel>Role</ControlLabel>
|
||||
<FormLabel>Role</FormLabel>
|
||||
<FormControl componentClass="select" placeholder="Select role" value={this.state.role} onChange={(e) => this.handleChange(e)}>
|
||||
<option key='1' value='admin'>Administrator</option>
|
||||
<option key='2' value='user'>User</option>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import Dialog from './dialog';
|
||||
|
||||
|
@ -74,7 +74,7 @@ class NewVisualzationDialog extends React.Component {
|
|||
<Dialog show={this.props.show} title="New Visualization" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
|
||||
<form>
|
||||
<FormGroup controlId="name" validationState={this.validateForm('name')}>
|
||||
<ControlLabel>Name</ControlLabel>
|
||||
<FormLabel>Name</FormLabel>
|
||||
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { Form, Button, FormGroup, FormControl, ControlLabel, Col } from 'react-bootstrap';
|
||||
import { Form, Button, FormGroup, FormControl, FormLabel, Col } from 'react-bootstrap';
|
||||
|
||||
import AppDispatcher from '../app-dispatcher';
|
||||
|
||||
|
@ -63,7 +63,7 @@ class LoginForm extends Component {
|
|||
return (
|
||||
<Form horizontal>
|
||||
<FormGroup controlId="username">
|
||||
<Col componentClass={ControlLabel} sm={2}>
|
||||
<Col componentClass={FormLabel} sm={2}>
|
||||
Username
|
||||
</Col>
|
||||
<Col sm={10}>
|
||||
|
@ -72,7 +72,7 @@ class LoginForm extends Component {
|
|||
</FormGroup>
|
||||
|
||||
<FormGroup controlId="password">
|
||||
<Col componentClass={ControlLabel} sm={2}>
|
||||
<Col componentClass={FormLabel} sm={2}>
|
||||
Password
|
||||
</Col>
|
||||
<Col sm={10}>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormGroup, FormControl, ControlLabel, HelpBlock } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, FormText } from 'react-bootstrap';
|
||||
import validator from 'validator';
|
||||
|
||||
import Table from './table';
|
||||
|
@ -98,14 +98,14 @@ class SignalMapping extends React.Component {
|
|||
render() {
|
||||
return <div>
|
||||
<FormGroup validationState={this.validateLength()}>
|
||||
<ControlLabel>{this.props.name} Length</ControlLabel>
|
||||
<FormLabel>{this.props.name} Length</FormLabel>
|
||||
<FormControl name='length' type='number' placeholder='Enter length' defaultValue={this.state.length} min='1' onBlur={this.handleLengthChange} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<ControlLabel>{this.props.name} Mapping</ControlLabel>
|
||||
<HelpBlock>Click <i>name</i> or <i>type</i> cell to edit</HelpBlock>
|
||||
<FormLabel>{this.props.name} Mapping</FormLabel>
|
||||
<FormText>Click <i>name</i> or <i>type</i> cell to edit</FormText>
|
||||
<Table data={this.props.signals}>
|
||||
<TableColumn title='ID' width='60' dataIndex />
|
||||
<TableColumn title='Name' dataKey='name' inlineEditable onInlineChange={this.handleMappingChange} />
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { Button, DropdownButton, MenuItem } from 'react-bootstrap';
|
||||
import { Button, DropdownButton, DropdownItem } from 'react-bootstrap';
|
||||
|
||||
class SimulatorAction extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -50,9 +50,9 @@ class SimulatorAction extends React.Component {
|
|||
|
||||
render() {
|
||||
const actionList = this.props.actions.map(action => (
|
||||
<MenuItem key={action.id} eventKey={action.id} active={this.state.selectedAction === action.id}>
|
||||
<DropdownItem key={action.id} eventKey={action.id} active={this.state.selectedAction === action.id}>
|
||||
{action.title}
|
||||
</MenuItem>
|
||||
</DropdownItem>
|
||||
));
|
||||
|
||||
return <div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React, { Component } from 'react';
|
||||
import _ from 'lodash';
|
||||
import { Table, Button, FormControl, Label, Checkbox } from 'react-bootstrap';
|
||||
import { Table, Button, FormControl, FormLabel, FormCheck } from 'react-bootstrap';
|
||||
import { Link } from 'react-router-dom';
|
||||
import Icon from './icon';
|
||||
|
||||
|
@ -89,7 +89,7 @@ class CustomTable extends Component {
|
|||
labelContent = child.props.labelModifier(labelContent, data);
|
||||
}
|
||||
|
||||
cell.push(<span> <Label bsClass={child.props.labelStyle(data[labelKey], data)}>{labelContent.toString()}</Label></span>);
|
||||
cell.push(<span> <FormLabel bsClass={child.props.labelStyle(data[labelKey], data)}>{labelContent.toString()}</FormLabel></span>);
|
||||
}
|
||||
|
||||
if (child.props.dataIndex) {
|
||||
|
@ -108,7 +108,7 @@ class CustomTable extends Component {
|
|||
if (child.props.checkbox) {
|
||||
const checkboxKey = this.props.checkboxKey;
|
||||
|
||||
cell.push(<Checkbox className="table-control-checkbox" inline checked={checkboxKey ? data[checkboxKey] : null} onChange={e => child.props.onChecked(index, e)} />);
|
||||
cell.push(<FormCheck className="table-control-checkbox" inline checked={checkboxKey ? data[checkboxKey] : null} onChange={e => child.props.onChecked(index, e)} />);
|
||||
}
|
||||
|
||||
if (child.props.exportButton) {
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { scaleOrdinal, schemeCategory10 } from 'd3-scale';
|
||||
import { scaleOrdinal} from 'd3-scale';
|
||||
import {schemeCategory10} from 'd3-scale-chromatic'
|
||||
|
||||
class PlotLegend extends React.Component {
|
||||
render() {
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React from 'react';
|
||||
import { scaleLinear, scaleTime, scaleOrdinal, schemeCategory10 } from 'd3-scale';
|
||||
import { scaleLinear, scaleTime, scaleOrdinal} from 'd3-scale';
|
||||
import {schemeCategory10} from 'd3-scale-chromatic'
|
||||
import { extent } from 'd3-array';
|
||||
import { line } from 'd3-shape';
|
||||
import { axisBottom, axisLeft } from 'd3-axis';
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { Form, FormGroup, Col, ControlLabel, FormControl, InputGroup } from 'react-bootstrap';
|
||||
import { Form, FormGroup, Col, FormLabel, FormControl, InputGroup } from 'react-bootstrap';
|
||||
|
||||
class WidgetInput extends Component {
|
||||
|
||||
|
@ -75,7 +75,7 @@ class WidgetInput extends Component {
|
|||
<div className="number-input-widget full">
|
||||
<Form componentClass="fieldset" horizontal>
|
||||
<FormGroup>
|
||||
<Col componentClass={ControlLabel} xs={3}>
|
||||
<Col componentClass={FormLabel} xs={3}>
|
||||
{this.props.widget.name}
|
||||
</Col>
|
||||
<Col xs={9}>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React, { Component } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { FormGroup, Checkbox } from 'react-bootstrap';
|
||||
import { FormGroup, FormCheck } from 'react-bootstrap';
|
||||
|
||||
import Plot from '../widget-plot/plot';
|
||||
import PlotLegend from '../widget-plot/plot-legend';
|
||||
|
@ -118,7 +118,7 @@ class WidgetPlotTable extends Component {
|
|||
'btn-default': true,
|
||||
'active': checked
|
||||
});
|
||||
return <Checkbox key={signal.index} className={chkBxClasses} checked={checked} disabled={ this.props.editing } onChange={(e) => this.updateSignalSelection(signal.index, e.target.checked) } > { signal.name } </Checkbox>
|
||||
return <FormCheck key={signal.index} className={chkBxClasses} checked={checked} disabled={ this.props.editing } onChange={(e) => this.updateSignalSelection(signal.index, e.target.checked) } > { signal.name } </FormCheck>
|
||||
});
|
||||
}
|
||||
|
||||
|
|
15
src/containers/FluxContainerConverter.js
Normal file
15
src/containers/FluxContainerConverter.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
/// FluxContainerConverter.js
|
||||
/// This is an ugly workaround found here https://github.com/facebook/flux/issues/351 to make Flux Containers work with ES6
|
||||
|
||||
module.exports = {
|
||||
convert: function(containerClass) {
|
||||
const tmp = containerClass;
|
||||
containerClass = function(...args) {
|
||||
return new tmp(...args);
|
||||
};
|
||||
containerClass.prototype = tmp.prototype;
|
||||
containerClass.getStores = tmp.getStores;
|
||||
containerClass.calculateState = tmp.calculateState;
|
||||
return containerClass;
|
||||
}
|
||||
};
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Container } from 'flux/utils';
|
||||
import { DragDropContext } from 'react-dnd';
|
||||
import { DndProvider } from 'react-dnd';
|
||||
import HTML5Backend from 'react-dnd-html5-backend';
|
||||
import NotificationSystem from 'react-notification-system';
|
||||
import { Redirect, Route } from 'react-router-dom';
|
||||
|
@ -51,6 +51,7 @@ import Users from './users';
|
|||
import '../styles/app.css';
|
||||
|
||||
class App extends React.Component {
|
||||
|
||||
static getStores() {
|
||||
return [ SimulatorStore, UserStore, SimulationStore ];
|
||||
}
|
||||
|
@ -112,40 +113,44 @@ class App extends React.Component {
|
|||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Col style={{ width: this.state.showSidebarMenu ? '280px' : '0px' }} smHidden mdHidden lgHidden className="sidenav">
|
||||
<HeaderMenu onClose={this.hideSidebarMenu} currentRole={this.state.currentRole} />
|
||||
</Col>
|
||||
<DndProvider backend={HTML5Backend} >
|
||||
<div>
|
||||
<Col style={{ width: this.state.showSidebarMenu ? '280px' : '0px' }} smHidden mdHidden lgHidden className="sidenav">
|
||||
<HeaderMenu onClose={this.hideSidebarMenu} currentRole={this.state.currentRole} />
|
||||
</Col>
|
||||
|
||||
<div className="app">
|
||||
<NotificationSystem ref="notificationSystem" />
|
||||
<div className="app">
|
||||
<NotificationSystem ref="notificationSystem" />
|
||||
|
||||
<Header onMenuButton={this.showSidebarMenu} showMenuButton={this.state.token != null} />
|
||||
<Header onMenuButton={this.showSidebarMenu} showMenuButton={this.state.token != null} />
|
||||
|
||||
<div className={`app-body app-body-spacing`} >
|
||||
<Col xsHidden>
|
||||
<SidebarMenu currentRole={this.state.currentRole} />
|
||||
</Col>
|
||||
<div className={`app-body app-body-spacing`} >
|
||||
<Col xsHidden>
|
||||
<SidebarMenu currentRole={this.state.currentRole} />
|
||||
</Col>
|
||||
|
||||
<div className={`app-content app-content-margin-left`}>
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route path="/home" component={Home} />
|
||||
<Route exact path="/projects" component={Projects} />
|
||||
<Route path="/projects/:project" component={Project} />
|
||||
<Route path="/visualizations/:visualization" component={Visualization} />
|
||||
<Route exact path="/simulations" component={Simulations} />
|
||||
<Route path="/simulations/:simulation" component={Simulation} />
|
||||
<Route path="/simulationModel/:simulationModel" component={SimulationModel} />
|
||||
<Route path="/simulators" component={Simulators} />
|
||||
<Route path="/users" component={Users} />
|
||||
<div className={`app-content app-content-margin-left`}>
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route path="/home" component={Home} />
|
||||
<Route exact path="/projects" component={Projects} />
|
||||
<Route path="/projects/:project" component={Project} />
|
||||
<Route path="/visualizations/:visualization" component={Visualization} />
|
||||
<Route exact path="/simulations" component={Simulations} />
|
||||
<Route path="/simulations/:simulation" component={Simulation} />
|
||||
<Route path="/simulationModel/:simulationModel" component={SimulationModel} />
|
||||
<Route path="/simulators" component={Simulators} />
|
||||
<Route path="/users" component={Users} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
<Footer />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
</DndProvider>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default DragDropContext(HTML5Backend)(Container.create(App));
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(App));
|
||||
//DragDropContext(HTML5Backend)(Container.create(App));
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React, { Component } from 'react';
|
||||
import { Container } from 'flux/utils';
|
||||
import { PageHeader } from 'react-bootstrap';
|
||||
import { NavbarBrand } from 'react-bootstrap';
|
||||
import NotificationSystem from 'react-notification-system';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
|
||||
|
@ -82,7 +82,7 @@ class Login extends Component {
|
|||
<Header />
|
||||
|
||||
<div className="login-container">
|
||||
<PageHeader>Login</PageHeader>
|
||||
<NavbarBrand>Login</NavbarBrand>
|
||||
|
||||
<LoginForm loginMessage={this.state.loginMessage} />
|
||||
</div>
|
||||
|
@ -93,4 +93,5 @@ class Login extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Login);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Login));
|
||||
|
|
|
@ -231,4 +231,5 @@ class Visualizations extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Visualizations, {withProps: true});
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Visualizations), {withProps: true});
|
||||
|
|
|
@ -156,4 +156,5 @@ class Projects extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Projects);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Projects));
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Container } from 'flux/utils';
|
||||
import { FormGroup, FormControl, ControlLabel, Button, ProgressBar, Col } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, Button, ProgressBar, Col } from 'react-bootstrap';
|
||||
|
||||
import FileStore from '../stores/file-store';
|
||||
import UserStore from '../stores/user-store';
|
||||
|
@ -118,7 +118,7 @@ class SelectFile extends React.Component {
|
|||
|
||||
return <div>
|
||||
<FormGroup>
|
||||
<Col componentClass={ControlLabel} sm={3} md={2}>
|
||||
<Col componentClass={FormLabel} sm={3} md={2}>
|
||||
{this.props.name}
|
||||
</Col>
|
||||
|
||||
|
@ -148,4 +148,5 @@ class SelectFile extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(SelectFile);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(SelectFile));
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Container } from 'flux/utils';
|
||||
import { FormGroup, FormControl, ControlLabel, Col } from 'react-bootstrap';
|
||||
import { FormGroup, FormControl, FormLabel, Col } from 'react-bootstrap';
|
||||
import _ from 'lodash';
|
||||
|
||||
import SimulatorStore from '../stores/simulator-store';
|
||||
|
@ -72,7 +72,7 @@ class SelectSimulator extends React.Component {
|
|||
);
|
||||
|
||||
return <FormGroup>
|
||||
<Col componentClass={ControlLabel} sm={3} md={2}>
|
||||
<Col componentClass={FormLabel} sm={3} md={2}>
|
||||
Simulator
|
||||
</Col>
|
||||
|
||||
|
@ -85,4 +85,5 @@ class SelectSimulator extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(SelectSimulator);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(SelectSimulator));
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Container } from 'flux/utils';
|
||||
import { Button, Col, Form, ControlLabel } from 'react-bootstrap';
|
||||
import { Button, Col, Form, FormLabel } from 'react-bootstrap';
|
||||
|
||||
import SimulationModelStore from '../stores/simulation-model-store';
|
||||
import UserStore from '../stores/user-store';
|
||||
|
@ -140,7 +140,7 @@ class SimulationModel extends React.Component {
|
|||
<SelectFile disabled type='configuration' name='Configuration' onChange={this.handleConfigurationChange} value={this.state.simulationModel.configuration} />
|
||||
|
||||
<div>
|
||||
<Col componentClass={ControlLabel} sm={3} md={2}>
|
||||
<Col componentClass={FormLabel} sm={3} md={2}>
|
||||
Start Parameters
|
||||
</Col>
|
||||
|
||||
|
@ -168,4 +168,5 @@ class SimulationModel extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(SimulationModel, { withProps: true });
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(SimulationModel), { withProps: true });
|
||||
|
|
|
@ -285,4 +285,5 @@ class Simulation extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Simulation, { withProps: true });
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Simulation), { withProps: true });
|
||||
|
|
|
@ -325,4 +325,5 @@ class Simulations extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Simulations);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Simulations));
|
||||
|
|
|
@ -310,4 +310,5 @@ class Simulators extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Simulators);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Simulators));
|
||||
|
|
|
@ -139,4 +139,5 @@ class Users extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Users);
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Users));
|
||||
|
|
|
@ -547,4 +547,5 @@ class Visualization extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Fullscreenable()(Container.create(Visualization, { withProps: true }));
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Fullscreenable()(Container.create(fluxContainerConverter.convert(Visualization), { withProps: true }));
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
import React from 'react';
|
||||
import { Container } from 'flux/utils';
|
||||
import { ContextMenuProvider } from 'react-contexify';
|
||||
import Rnd from 'react-rnd';
|
||||
import { Rnd } from 'react-rnd';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import AppDispatcher from '../app-dispatcher';
|
||||
|
@ -294,4 +294,5 @@ class Widget extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Container.create(Widget, { withProps: true });
|
||||
let fluxContainerConverter = require('./FluxContainerConverter');
|
||||
export default Container.create(fluxContainerConverter.convert(Widget), { withProps: true });
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
import RestAPI from '../api/rest-api';
|
||||
import AppDispatcher from '../app-dispatcher';
|
||||
|
||||
const API_URL = '/api/v1';
|
||||
const API_URL = '/api/v2';
|
||||
|
||||
class RestDataManager {
|
||||
constructor(type, url, keyFilter) {
|
||||
|
|
Loading…
Add table
Reference in a new issue