mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
some fixes to make simulator add and edit work
This commit is contained in:
parent
9dc65a640b
commit
3f926d1e94
2 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ class EditSimulatorDialog extends React.Component {
|
|||
onClose(canceled) {
|
||||
if (canceled === false) {
|
||||
if (this.valid) {
|
||||
let data = {};
|
||||
let data = this.props.simulator.properties;
|
||||
|
||||
if (this.state.name != null && this.state.name !== "" && this.state.name !== _.get(this.props.simulator, 'rawProperties.name')) {
|
||||
data.name = this.state.name;
|
||||
|
@ -85,7 +85,7 @@ class EditSimulatorDialog extends React.Component {
|
|||
</FormGroup>
|
||||
<FormGroup controlId='properties'>
|
||||
<FormLabel column={false}>Properties</FormLabel>
|
||||
<ParametersEditor content={_.merge({}, this.props.simulator.rawProperties, this.props.simulator.properties)} disabled={true} />
|
||||
<ParametersEditor content={_.merge({}, _.get(this.props.simulator, 'rawProperties'), _.get(this.props.simulator, 'properties'))} disabled={true} />
|
||||
</FormGroup>
|
||||
</form>
|
||||
</Dialog>
|
||||
|
|
|
@ -96,7 +96,7 @@ class Simulators extends Component {
|
|||
});
|
||||
|
||||
// Start timer for periodic refresh
|
||||
this.timer = window.setInterval(() => this.refresh(), 5000);
|
||||
this.timer = window.setInterval(() => this.refresh(), 10000);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
Loading…
Add table
Reference in a new issue