From f604406453f95c82c3e5e4294a51245661868bbe Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 14 Sep 2017 14:07:21 +0200 Subject: First attempt at experiment list UI --- src/actions/experiments.js | 24 ++++++++++++++++++++++++ src/actions/modals/experiments.js | 14 ++++++++++++++ src/actions/modals/simulations.js | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/actions/experiments.js create mode 100644 src/actions/modals/experiments.js (limited to 'src/actions') diff --git a/src/actions/experiments.js b/src/actions/experiments.js new file mode 100644 index 00000000..b067f5d9 --- /dev/null +++ b/src/actions/experiments.js @@ -0,0 +1,24 @@ +export const FETCH_EXPERIMENTS_OF_SIMULATION = "FETCH_EXPERIMENTS_OF_SIMULATION"; +export const ADD_EXPERIMENT = "ADD_EXPERIMENT"; +export const DELETE_EXPERIMENT = "DELETE_EXPERIMENT"; + +export function fetchExperimentsOfSimulation(simulationId) { + return { + type: FETCH_EXPERIMENTS_OF_SIMULATION, + simulationId + }; +} + +export function addExperiment(experiment) { + return { + type: ADD_EXPERIMENT, + experiment + }; +} + +export function deleteExperiment(id) { + return { + type: DELETE_EXPERIMENT, + id + }; +} diff --git a/src/actions/modals/experiments.js b/src/actions/modals/experiments.js new file mode 100644 index 00000000..43a53a3a --- /dev/null +++ b/src/actions/modals/experiments.js @@ -0,0 +1,14 @@ +export const OPEN_NEW_EXPERIMENT_MODAL = "OPEN_NEW_EXPERIMENT_MODAL"; +export const CLOSE_NEW_EXPERIMENT_MODAL = "CLOSE_EXPERIMENT_MODAL"; + +export function openNewExperimentModal() { + return { + type: OPEN_NEW_EXPERIMENT_MODAL + }; +} + +export function closeNewExperimentModal() { + return { + type: CLOSE_NEW_EXPERIMENT_MODAL + }; +} diff --git a/src/actions/modals/simulations.js b/src/actions/modals/simulations.js index 53d2c565..8281238d 100644 --- a/src/actions/modals/simulations.js +++ b/src/actions/modals/simulations.js @@ -1,5 +1,5 @@ export const OPEN_NEW_SIMULATION_MODAL = "OPEN_NEW_SIMULATION_MODAL"; -export const CLOSE_NEW_SIMULATION_MODAL = "CLOSE_SIMULATION_POPUP"; +export const CLOSE_NEW_SIMULATION_MODAL = "CLOSE_SIMULATION_MODAL"; export function openNewSimulationModal() { return { -- cgit v1.2.3