summaryrefslogtreecommitdiff
path: root/src/sagas/objects.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-15 12:53:26 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:03 +0200
commita1d95b3685cffb6a9344d0d1e5505dd391193f16 (patch)
tree42851ec0726881dd9f82a3ea12a7987324a68ef8 /src/sagas/objects.js
parentf604406453f95c82c3e5e4294a51245661868bbe (diff)
Implement experiment list and add
Diffstat (limited to 'src/sagas/objects.js')
-rw-r--r--src/sagas/objects.js18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/sagas/objects.js b/src/sagas/objects.js
index 375781be..0a0154cc 100644
--- a/src/sagas/objects.js
+++ b/src/sagas/objects.js
@@ -1,7 +1,6 @@
import {call, put, select} from "redux-saga/effects";
import {addToStore} from "../actions/objects";
import {getDatacenter, getRoomsOfDatacenter} from "../api/routes/datacenters";
-import {getAllJobs} from "../api/routes/jobs";
import {getPath, getSectionsOfPath} from "../api/routes/paths";
import {getTilesOfRoom} from "../api/routes/rooms";
import {getAllSchedulers} from "../api/routes/schedulers";
@@ -20,7 +19,6 @@ import {
getPSU,
getStorage
} from "../api/routes/specifications";
-import {getAllTasks} from "../api/routes/tasks";
import {getMachinesOfRackByTile, getRackByTile} from "../api/routes/tiles";
import {getAllTraces} from "../api/routes/traces";
import {getUser} from "../api/routes/users";
@@ -132,11 +130,11 @@ export const fetchAndStorePathsOfSimulation = (simulationId) =>
export const fetchAndStoreAllTraces = () =>
fetchAndStoreObjects("trace", call(getAllTraces));
-export const fetchAndStoreAllJobs = () =>
- fetchAndStoreObjects("job", call(getAllJobs));
-
-export const fetchAndStoreAllTasks = () =>
- fetchAndStoreObjects("task", call(getAllTasks));
-
-export const fetchAndStoreAllSchedulers = () =>
- fetchAndStoreObjects("scheduler", call(getAllSchedulers));
+export const fetchAndStoreAllSchedulers = function* () {
+ const objects = yield call(getAllSchedulers);
+ for (let index in objects) {
+ objects[index].id = objects[index].name;
+ yield put(addToStore("scheduler", objects[index]));
+ }
+ return objects;
+};