diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-08 11:09:37 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:59 +0200 |
| commit | 6296bb95ba93cb9111e19f06329b6c9b9aec57d5 (patch) | |
| tree | d0aabf6a6c1606f16f11d6f653b904997e7010f2 /src/sagas/objects.js | |
| parent | fc9c52a8f102202bd0e1a8a9dc4d8d68babe2304 (diff) | |
Fetch all unit specifications on initial datacenter load
Diffstat (limited to 'src/sagas/objects.js')
| -rw-r--r-- | src/sagas/objects.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sagas/objects.js b/src/sagas/objects.js index 5c9f00c2..508f1cf5 100644 --- a/src/sagas/objects.js +++ b/src/sagas/objects.js @@ -6,6 +6,10 @@ import {getTilesOfRoom} from "../api/routes/rooms"; import {getSection} from "../api/routes/sections"; import {getPathsOfSimulation, getSimulation} from "../api/routes/simulations"; import { + getAllCPUs, + getAllGPUs, + getAllMemories, + getAllStorages, getCoolingItem, getCPU, getFailureModel, @@ -64,15 +68,27 @@ export const fetchAndStoreUser = (id) => export const fetchAndStoreFailureModel = (id) => fetchAndStoreObject("failureModel", id, call(getFailureModel, id)); +export const fetchAndStoreAllCPUs = () => + fetchAndStoreObjects("cpu", call(getAllCPUs)); + export const fetchAndStoreCPU = (id) => fetchAndStoreObject("cpu", id, call(getCPU, id)); +export const fetchAndStoreAllGPUs = () => + fetchAndStoreObjects("gpu", call(getAllGPUs)); + export const fetchAndStoreGPU = (id) => fetchAndStoreObject("gpu", id, call(getGPU, id)); +export const fetchAndStoreAllMemories = () => + fetchAndStoreObjects("memory", call(getAllMemories)); + export const fetchAndStoreMemory = (id) => fetchAndStoreObject("memory", id, call(getMemory, id)); +export const fetchAndStoreAllStorages = () => + fetchAndStoreObjects("storage", call(getAllStorages)); + export const fetchAndStoreStorage = (id) => fetchAndStoreObject("storage", id, call(getStorage, id)); |
