diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-15 12:53:26 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:06:03 +0200 |
| commit | a1d95b3685cffb6a9344d0d1e5505dd391193f16 (patch) | |
| tree | 42851ec0726881dd9f82a3ea12a7987324a68ef8 /src/components/modals/custom-components/NewExperimentModalComponent.js | |
| parent | f604406453f95c82c3e5e4294a51245661868bbe (diff) | |
Implement experiment list and add
Diffstat (limited to 'src/components/modals/custom-components/NewExperimentModalComponent.js')
| -rw-r--r-- | src/components/modals/custom-components/NewExperimentModalComponent.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/components/modals/custom-components/NewExperimentModalComponent.js b/src/components/modals/custom-components/NewExperimentModalComponent.js index 9efccc8a..d56d2316 100644 --- a/src/components/modals/custom-components/NewExperimentModalComponent.js +++ b/src/components/modals/custom-components/NewExperimentModalComponent.js @@ -20,8 +20,12 @@ class NewExperimentModalComponent extends React.Component { } onSubmit() { - this.props.callback(this.textInput.value, this.pathSelect.value, this.traceSelect.value, - this.schedulerSelect.value); + this.props.callback( + this.textInput.value, + parseInt(this.pathSelect.value, 10), + parseInt(this.traceSelect.value, 10), + this.schedulerSelect.value + ); this.reset(); } @@ -41,23 +45,23 @@ class NewExperimentModalComponent extends React.Component { this.onSubmit(); }}> <div className="form-group"> - <label className="form-control-label">Name:</label> + <label className="form-control-label">Name</label> <input type="text" className="form-control" ref={textInput => this.textInput = textInput}/> </div> <div className="form-group"> - <label className="form-control-label">Path:</label> + <label className="form-control-label">Path</label> <select className="form-control" ref={pathSelect => this.pathSelect = pathSelect}> {this.props.paths.map(path => ( <option value={path.id} key={path.id}> - {path.name} + {path.name ? path.name : "Path " + path.id} </option> ))} </select> </div> <div className="form-group"> - <label className="form-control-label">Trace:</label> + <label className="form-control-label">Trace</label> <select className="form-control" ref={traceSelect => this.traceSelect = traceSelect}> {this.props.traces.map(trace => ( @@ -68,7 +72,7 @@ class NewExperimentModalComponent extends React.Component { </select> </div> <div className="form-group"> - <label className="form-control-label">Scheduler:</label> + <label className="form-control-label">Scheduler</label> <select className="form-control" ref={schedulerSelect => this.schedulerSelect = schedulerSelect}> {this.props.schedulers.map(scheduler => ( |
