summaryrefslogtreecommitdiff
path: root/frontend/src/sagas/objects.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-22 14:07:39 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:18 +0200
commit92ce9387f5c3ce54b4077ef6a5f604fc2cfe6ade (patch)
tree90432dbd06a13d300f8307dea342f4639c9c57e7 /frontend/src/sagas/objects.js
parentae8f03d514ba0982a34b96f1e29e262ca6048a19 (diff)
parent8739a156b75ba96e15d1bb19b08ca829c1eb01e8 (diff)
Merge pull request #12 from atlarge-research/feature/scenario-plots
Plotting of portfolio results
Diffstat (limited to 'frontend/src/sagas/objects.js')
-rw-r--r--frontend/src/sagas/objects.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/frontend/src/sagas/objects.js b/frontend/src/sagas/objects.js
index 17b28d02..1dbc7903 100644
--- a/frontend/src/sagas/objects.js
+++ b/frontend/src/sagas/objects.js
@@ -96,7 +96,7 @@ export const fetchAndStoreTopology = function* (id) {
const filledSlots = new Array(fullRack.capacity).fill(null)
fullRack.machines.forEach(
- (machine) => (filledSlots[machine.position - 1] = machine._id),
+ (machine) => (filledSlots[machine.position - 1] = machine._id)
)
let rack = (({ _id, name, capacity, powerCapacityW }) => ({
_id,
@@ -165,21 +165,21 @@ export const updateTopologyOnServer = function* (id) {
rack: !tileStore[tileId].rackId
? undefined
: {
- _id: rackStore[tileStore[tileId].rackId]._id,
- name: rackStore[tileStore[tileId].rackId].name,
- capacity: rackStore[tileStore[tileId].rackId].capacity,
- powerCapacityW: rackStore[tileStore[tileId].rackId].powerCapacityW,
- machines: rackStore[tileStore[tileId].rackId].machineIds
- .filter((m) => m !== null)
- .map((machineId) => ({
- _id: machineId,
- position: machineStore[machineId].position,
- cpus: machineStore[machineId].cpuIds.map((id) => cpuStore[id]),
- gpus: machineStore[machineId].gpuIds.map((id) => gpuStore[id]),
- memories: machineStore[machineId].memoryIds.map((id) => memoryStore[id]),
- storages: machineStore[machineId].storageIds.map((id) => storageStore[id]),
- })),
- },
+ _id: rackStore[tileStore[tileId].rackId]._id,
+ name: rackStore[tileStore[tileId].rackId].name,
+ capacity: rackStore[tileStore[tileId].rackId].capacity,
+ powerCapacityW: rackStore[tileStore[tileId].rackId].powerCapacityW,
+ machines: rackStore[tileStore[tileId].rackId].machineIds
+ .filter((m) => m !== null)
+ .map((machineId) => ({
+ _id: machineId,
+ position: machineStore[machineId].position,
+ cpus: machineStore[machineId].cpuIds.map((id) => cpuStore[id]),
+ gpus: machineStore[machineId].gpuIds.map((id) => gpuStore[id]),
+ memories: machineStore[machineId].memoryIds.map((id) => memoryStore[id]),
+ storages: machineStore[machineId].storageIds.map((id) => storageStore[id]),
+ })),
+ },
})),
})),
}