diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-18 16:52:11 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:06:04 +0200 |
| commit | f8f617c97fcb2df3dbefc9527d974151e367cb60 (patch) | |
| tree | f6405aa54f73b66220f36e3a388725f71d023cfb /src/sagas/experiments.js | |
| parent | 9f86ae6de969baa625e3341c796c64f63b5153ce (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.js | 14 |
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 { |
