summaryrefslogtreecommitdiff
path: root/frontend/src/sagas/objects.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-21 15:33:37 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:16 +0200
commit912e1b96bfa7d6c022d854fa744f719b49ca98d0 (patch)
tree49cdaf109aa08b0149c34174ce0f00c7056221ea /frontend/src/sagas/objects.js
parent791b5d1e443f97adc756264878c3aae41ca0f748 (diff)
Add first plotting attempts for portfolios
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]),
+ })),
+ },
})),
})),
}