mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Merge branch 'master' of git.rwth-aachen.de:acs/public/villas/web
This commit is contained in:
commit
1f6fda1c2e
3 changed files with 19 additions and 21 deletions
|
@ -37,7 +37,7 @@ class EditICDialog extends React.Component {
|
|||
type: '',
|
||||
category: '',
|
||||
managedexternally: false,
|
||||
startParameterScheme: {},
|
||||
startParameterSchema: {},
|
||||
properties: {}
|
||||
};
|
||||
}
|
||||
|
@ -70,8 +70,13 @@ class EditICDialog extends React.Component {
|
|||
data.category = this.state.category;
|
||||
}
|
||||
|
||||
data.startParameterScheme = this.state.startParameterScheme
|
||||
data.properties = this.state.properties
|
||||
if (this.state.startParameterSchema !== {}) {
|
||||
data.startParameterSchema = this.state.startParameterSchema;
|
||||
}
|
||||
|
||||
if (this.state.properties !== {}) {
|
||||
data.properties = this.state.properties;
|
||||
}
|
||||
|
||||
data.managedexternally = this.state.managedexternally;
|
||||
|
||||
|
@ -93,8 +98,8 @@ class EditICDialog extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
handleStartParameterSchemeChange(data) {
|
||||
this.setState({ startParameterScheme: data });
|
||||
handleStartParameterSchemaChange(data) {
|
||||
this.setState({ startParameterSchema: data });
|
||||
}
|
||||
|
||||
handlePropertiesChange(data) {
|
||||
|
@ -111,7 +116,7 @@ class EditICDialog extends React.Component {
|
|||
description: this.props.ic.description,
|
||||
category: this.props.ic.category,
|
||||
managedexternally: false,
|
||||
startParameterScheme: this.props.ic.startParameterScheme,
|
||||
startParameterSchema: this.props.ic.startParameterSchema,
|
||||
properties: this.props.ic.properties,
|
||||
});
|
||||
}
|
||||
|
@ -193,12 +198,12 @@ class EditICDialog extends React.Component {
|
|||
<FormControl type="text" placeholder={this.props.ic.description} value={this.state.description || '' } onChange={(e) => this.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
<FormGroup controlId='startParameterScheme'>
|
||||
<FormLabel column={false}>Start parameter scheme of IC</FormLabel>
|
||||
<FormGroup controlId='startParameterSchema'>
|
||||
<FormLabel column={false}>Start parameter schema of IC</FormLabel>
|
||||
<ParametersEditor
|
||||
content={this.state.startParameterScheme}
|
||||
content={this.state.startParameterSchema}
|
||||
disabled={false}
|
||||
onChange={(data) => this.handleStartParameterSchemeChange(data)}
|
||||
onChange={(data) => this.handleStartParameterSchemaChange(data)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup controlId='properties'>
|
||||
|
|
|
@ -110,7 +110,7 @@ class ICDialog extends React.Component {
|
|||
<Col><b>Start parameter schema</b></Col>
|
||||
<Col>
|
||||
<ReactJson
|
||||
src={this.props.ic.startParameterScheme}
|
||||
src={this.props.ic.startParameterSchema}
|
||||
name={false}
|
||||
displayDataTypes={false}
|
||||
displayObjectSize={false}
|
||||
|
|
|
@ -117,12 +117,7 @@ class InfrastructureComponentStore extends ArrayStore {
|
|||
if(!tempIC.managedexternally){
|
||||
tempIC.state = action.data.state;
|
||||
tempIC.uptime = action.data.time_now - action.data.time_started;
|
||||
if (tempIC.statusupdateraw === null || tempIC.statusupdateraw === undefined){
|
||||
tempIC.statusupdateraw = {};
|
||||
tempIC.statusupdateraw["status"] = action.data;
|
||||
} else {
|
||||
tempIC.statusupdateraw["status"] = action.data;
|
||||
}
|
||||
tempIC.statusupdateraw = action.data
|
||||
AppDispatcher.dispatch({
|
||||
type: 'ics/start-edit',
|
||||
data: tempIC,
|
||||
|
@ -138,12 +133,10 @@ class InfrastructureComponentStore extends ArrayStore {
|
|||
case 'ics/nodestats-received':
|
||||
let tempIC2 = action.ic;
|
||||
if(!tempIC2.managedexternally){
|
||||
if (tempIC2.statusupdateraw === null || tempIC2.statusupdateraw === undefined){
|
||||
if (tempIC2.statusupdateraw === null || tempIC2.statusupdateraw === undefined) {
|
||||
tempIC2.statusupdateraw = {};
|
||||
tempIC2.statusupdateraw["statistics"] = action.data;
|
||||
} else {
|
||||
tempIC2.statusupdateraw["statistics"] = action.data;
|
||||
}
|
||||
tempIC2.statusupdateraw["statistics"] = action.data;
|
||||
AppDispatcher.dispatch({
|
||||
type: 'ics/start-edit',
|
||||
data: tempIC2,
|
||||
|
|
Loading…
Add table
Reference in a new issue