diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-10 12:41:00 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-15 15:45:28 +0200 |
| commit | e200dbfdc076ac6263c9ac6f9dabdcc475f01d6e (patch) | |
| tree | 18bbe61cbf14f5b57e5effe04feda0da4b6d572a /opendc-web/opendc-web-ui | |
| parent | 1ab168fb80fbf3958fbadda00d1c6714cad66c86 (diff) | |
fix(ui): Relax topology schema requirements
This change fixes an issue where the topology generated by the frontend
was not accepted by the API server.
Diffstat (limited to 'opendc-web/opendc-web-ui')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/redux/sagas/topology.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/opendc-web/opendc-web-ui/src/redux/sagas/topology.js b/opendc-web/opendc-web-ui/src/redux/sagas/topology.js index 5d9154fd..333c1485 100644 --- a/opendc-web/opendc-web-ui/src/redux/sagas/topology.js +++ b/opendc-web/opendc-web-ui/src/redux/sagas/topology.js @@ -123,8 +123,6 @@ export function* onEditRoomName(action) { try { const topologyId = yield select((state) => state.currentTopologyId) const roomId = yield select((state) => state.interactionLevel.roomId) - const room = Object.assign({}, yield select((state) => state.objects.room[roomId])) - room.name = action.name yield put(addPropToStoreObject('room', roomId, { name: action.name })) yield updateTopologyOnServer(topologyId) } catch (error) { @@ -148,8 +146,6 @@ export function* onEditRackName(action) { try { const topologyId = yield select((state) => state.currentTopologyId) const rackId = yield select((state) => state.objects.tile[state.interactionLevel.tileId].rack) - const rack = Object.assign({}, yield select((state) => state.objects.rack[rackId])) - rack.name = action.name yield put(addPropToStoreObject('rack', rackId, { name: action.name })) yield updateTopologyOnServer(topologyId) } catch (error) { @@ -175,6 +171,7 @@ export function* onAddRackToTile(action) { const rack = { _id: uuid(), name: 'Rack', + tileId: action.tileId, capacity: DEFAULT_RACK_SLOT_CAPACITY, powerCapacityW: DEFAULT_RACK_POWER_CAPACITY, machines: [], @@ -195,6 +192,7 @@ export function* onAddMachine(action) { const machine = { _id: uuid(), + rackId, position: action.position, cpus: [], gpus: [], |
