From de8f12d74faef5fa3f9e38d1340948cab2d06ea3 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 1 Jul 2020 13:33:31 +0200 Subject: Manually generate IDs --- .../NewExperimentModalComponent.js | 190 ++++++++++----------- 1 file changed, 95 insertions(+), 95 deletions(-) (limited to 'frontend/src/components/modals/custom-components') diff --git a/frontend/src/components/modals/custom-components/NewExperimentModalComponent.js b/frontend/src/components/modals/custom-components/NewExperimentModalComponent.js index e356fe96..143109ff 100644 --- a/frontend/src/components/modals/custom-components/NewExperimentModalComponent.js +++ b/frontend/src/components/modals/custom-components/NewExperimentModalComponent.js @@ -1,104 +1,104 @@ -import PropTypes from "prop-types"; -import React from "react"; -import Shapes from "../../../shapes"; -import Modal from "../Modal"; +import PropTypes from 'prop-types' +import React from 'react' +import Shapes from '../../../shapes' +import Modal from '../Modal' class NewExperimentModalComponent extends React.Component { - static propTypes = { - show: PropTypes.bool.isRequired, - paths: PropTypes.arrayOf(Shapes.Path), - schedulers: PropTypes.arrayOf(Shapes.Scheduler), - traces: PropTypes.arrayOf(Shapes.Trace), - callback: PropTypes.func.isRequired - }; + static propTypes = { + show: PropTypes.bool.isRequired, + paths: PropTypes.arrayOf(Shapes.Path), + schedulers: PropTypes.arrayOf(Shapes.Scheduler), + traces: PropTypes.arrayOf(Shapes.Trace), + callback: PropTypes.func.isRequired, + } - reset() { - this.textInput.value = ""; - this.pathSelect.selectedIndex = 0; - this.traceSelect.selectedIndex = 0; - this.schedulerSelect.selectedIndex = 0; - } + reset() { + this.textInput.value = '' + this.pathSelect.selectedIndex = 0 + this.traceSelect.selectedIndex = 0 + this.schedulerSelect.selectedIndex = 0 + } - onSubmit() { - this.props.callback( - this.textInput.value, - parseInt(this.pathSelect.value, 10), - parseInt(this.traceSelect.value, 10), - this.schedulerSelect.value - ); - this.reset(); - } + onSubmit() { + this.props.callback( + this.textInput.value, + parseInt(this.pathSelect.value, 10), + parseInt(this.traceSelect.value, 10), + this.schedulerSelect.value, + ) + this.reset() + } - onCancel() { - this.props.callback(undefined); - this.reset(); - } + onCancel() { + this.props.callback(undefined) + this.reset() + } - render() { - return ( - -
{ - e.preventDefault(); - this.onSubmit(); - }} - > -
- - (this.textInput = textInput)} - /> -
-
- - -
-
- - -
-
- - -
-
-
- ); - } +
{ + e.preventDefault() + this.onSubmit() + }} + > +
+ + (this.textInput = textInput)} + /> +
+
+ + +
+
+ + +
+
+ + +
+
+ + ) + } } -export default NewExperimentModalComponent; +export default NewExperimentModalComponent -- cgit v1.2.3