summaryrefslogtreecommitdiff
path: root/src/sagas/experiments.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-18 16:52:11 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:04 +0200
commitf8f617c97fcb2df3dbefc9527d974151e367cb60 (patch)
treef6405aa54f73b66220f36e3a388725f71d023cfb /src/sagas/experiments.js
parent9f86ae6de969baa625e3341c796c64f63b5153ce (diff)
Implement basic experiment mode with timeline
The timeline doesn't trigger anything yet, but the visual element is in place and connected.
Diffstat (limited to 'src/sagas/experiments.js')
-rw-r--r--src/sagas/experiments.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sagas/experiments.js b/src/sagas/experiments.js
index d1334759..cf92e97f 100644
--- a/src/sagas/experiments.js
+++ b/src/sagas/experiments.js
@@ -1,8 +1,20 @@
import {call, put, select} from "redux-saga/effects";
import {addPropToStoreObject, addToStore} from "../actions/objects";
-import {deleteExperiment} from "../api/routes/experiments";
+import {deleteExperiment, getExperiment} from "../api/routes/experiments";
import {addExperiment, getExperimentsOfSimulation} from "../api/routes/simulations";
import {fetchAndStoreAllSchedulers, fetchAndStoreAllTraces, fetchAndStorePathsOfSimulation} from "./objects";
+import {fetchAllDatacentersOfExperiment} from "./topology";
+
+export function* onOpenExperimentSucceeded(action) {
+ try {
+ const experiment = yield call(getExperiment, action.experimentId);
+ yield put(addToStore("experiment", experiment));
+
+ yield fetchAllDatacentersOfExperiment(experiment);
+ } catch (error) {
+ console.error(error);
+ }
+}
export function* onFetchExperimentsOfSimulation() {
try {