diff options
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)); |
