diff --git a/src/ic/edit-ic.js b/src/ic/edit-ic.js index 9e8fe4a..7386131 100644 --- a/src/ic/edit-ic.js +++ b/src/ic/edit-ic.js @@ -99,6 +99,26 @@ class EditICDialog extends React.Component { } render() { + let typeOptions = []; + switch(this.state.category){ + case "Simulator": + typeOptions = ["Dummy","Generic","DPsim","RTLAB","RSCAD"]; + break; + case "Controller": + typeOptions = ["Kubernetes","VILLAS-controller"]; + break; + case "Gateway": + typeOptions = ["VILLAS-node","VILLAS-relay"]; + break; + case "Service": + typeOptions = ["EMS","Custom"]; + break; + case "Equipment": + typeOptions = ["Chroma-emulator","Chroma-loads","SMA-sunnyboy","FLEPS","Sonnenbatterie"]; + break; + default: + typeOptions =[]; + } return ( - Category (e.g. Simulator, Gateway, ...) - this.handleChange(e)} /> - + Category + this.handleChange(e)}> + + + + + + - Type (e.g. RTDS, VILLASnode, ...) - this.handleChange(e)} /> - + Type + this.handleChange(e)}> + + {typeOptions.map((name,index) => ( + + ))} + Properties diff --git a/src/ic/new-ic.js b/src/ic/new-ic.js index 78c67a8..466ead5 100644 --- a/src/ic/new-ic.js +++ b/src/ic/new-ic.js @@ -116,6 +116,26 @@ class NewICDialog extends React.Component { } render() { + let typeOptions = []; + switch(this.state.category){ + case "Simulator": + typeOptions = ["Dummy","Generic","DPsim","RTLAB","RSCAD"]; + break; + case "Controller": + typeOptions = ["Kubernetes","VILLAS-controller"]; + break; + case "Gateway": + typeOptions = ["VILLAS-node","VILLAS-relay"]; + break; + case "Service": + typeOptions = ["EMS","Custom"]; + break; + case "Equipment": + typeOptions = ["Chroma-emulator","Chroma-loads","SMA-sunnyboy","FLEPS","Sonnenbatterie"]; + break; + default: + typeOptions =[]; + } return ( this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
@@ -137,14 +157,24 @@ class NewICDialog extends React.Component { - Category of component (e.g. Simulator, Gateway, ...) - this.handleChange(e)} /> - + Category of component + this.handleChange(e)}> + + + + + + + - Type of component (e.g. RTDS, VILLASnode, ...) - this.handleChange(e)} /> - + Type of component + this.handleChange(e)}> + + {typeOptions.map((name,index) => ( + + ))} + UUID