summaryrefslogtreecommitdiff
path: root/frontend/src/sagas/topology.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-03 09:51:20 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:22 +0200
commit107a48e1a7fa0ec56faad8d8e90f76521f39f3b2 (patch)
treebd14a9d7a19c4e6ae371f819404949c35d0f3b4f /frontend/src/sagas/topology.js
parentf119fc78dda4d1e828dde04f378a63a93e3a0a7e (diff)
Get entire topology editing process working
Diffstat (limited to 'frontend/src/sagas/topology.js')
-rw-r--r--frontend/src/sagas/topology.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/src/sagas/topology.js b/frontend/src/sagas/topology.js
index 0be619a9..e7ce9043 100644
--- a/frontend/src/sagas/topology.js
+++ b/frontend/src/sagas/topology.js
@@ -199,6 +199,7 @@ export function* onAddRackToTile(action) {
const topologyId = yield select((state) => state.currentTopologyId)
const rack = {
_id: uuid(),
+ name: 'Rack',
capacity: DEFAULT_RACK_SLOT_CAPACITY,
powerCapacityW: DEFAULT_RACK_POWER_CAPACITY,
}
@@ -218,7 +219,8 @@ export function* onAddMachine(action) {
const rack = yield select((state) => state.objects.rack[rackId])
const machine = {
- _id: -1,
+ _id: uuid(),
+ rackId,
position: action.position,
cpuIds: [],
gpuIds: [],