summaryrefslogtreecommitdiff
path: root/frontend/src/containers/modals/NewExperimentModal.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-01 13:33:31 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:17 +0200
commitde8f12d74faef5fa3f9e38d1340948cab2d06ea3 (patch)
tree678bf1af3e5fa2334f0df43388d45294785bbf1e /frontend/src/containers/modals/NewExperimentModal.js
parent44236756c4cf689806dc17c6950a2cff3e9227bf (diff)
Manually generate IDs
Diffstat (limited to 'frontend/src/containers/modals/NewExperimentModal.js')
-rw-r--r--frontend/src/containers/modals/NewExperimentModal.js62
1 files changed, 31 insertions, 31 deletions
diff --git a/frontend/src/containers/modals/NewExperimentModal.js b/frontend/src/containers/modals/NewExperimentModal.js
index c703c39a..db60f088 100644
--- a/frontend/src/containers/modals/NewExperimentModal.js
+++ b/frontend/src/containers/modals/NewExperimentModal.js
@@ -1,39 +1,39 @@
-import { connect } from "react-redux";
-import { addExperiment } from "../../actions/experiments";
-import { closeNewExperimentModal } from "../../actions/modals/experiments";
-import NewExperimentModalComponent from "../../components/modals/custom-components/NewExperimentModalComponent";
+import { connect } from 'react-redux'
+import { addExperiment } from '../../actions/experiments'
+import { closeNewExperimentModal } from '../../actions/modals/experiments'
+import NewExperimentModalComponent from '../../components/modals/custom-components/NewExperimentModalComponent'
const mapStateToProps = state => {
- return {
- show: state.modals.newExperimentModalVisible,
- paths: Object.values(state.objects.path).filter(
- path => path.simulationId === state.currentSimulationId
- ),
- traces: Object.values(state.objects.trace),
- schedulers: Object.values(state.objects.scheduler)
- };
-};
+ return {
+ show: state.modals.newExperimentModalVisible,
+ paths: Object.values(state.objects.path).filter(
+ path => path.simulationId === state.currentSimulationId,
+ ),
+ traces: Object.values(state.objects.trace),
+ schedulers: Object.values(state.objects.scheduler),
+ }
+}
const mapDispatchToProps = dispatch => {
- return {
- callback: (name, pathId, traceId, schedulerName) => {
- if (name) {
- dispatch(
- addExperiment({
- name,
- pathId,
- traceId,
- schedulerName
- })
- );
- }
- dispatch(closeNewExperimentModal());
+ return {
+ callback: (name, pathId, traceId, schedulerName) => {
+ if (name) {
+ dispatch(
+ addExperiment({
+ name,
+ pathId,
+ traceId,
+ schedulerName,
+ }),
+ )
+ }
+ dispatch(closeNewExperimentModal())
+ },
}
- };
-};
+}
const NewExperimentModal = connect(mapStateToProps, mapDispatchToProps)(
- NewExperimentModalComponent
-);
+ NewExperimentModalComponent,
+)
-export default NewExperimentModal;
+export default NewExperimentModal