diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-21 15:33:37 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:16 +0200 |
| commit | 912e1b96bfa7d6c022d854fa744f719b49ca98d0 (patch) | |
| tree | 49cdaf109aa08b0149c34174ce0f00c7056221ea /frontend/src/sagas/topology.js | |
| parent | 791b5d1e443f97adc756264878c3aae41ca0f748 (diff) | |
Add first plotting attempts for portfolios
Diffstat (limited to 'frontend/src/sagas/topology.js')
| -rw-r--r-- | frontend/src/sagas/topology.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/frontend/src/sagas/topology.js b/frontend/src/sagas/topology.js index e915f9ff..14c1ed2d 100644 --- a/frontend/src/sagas/topology.js +++ b/frontend/src/sagas/topology.js @@ -44,7 +44,7 @@ export function* onAddTopology(action) { addTopology, Object.assign({}, action.topology, { projectId: currentProjectId, - }), + }) ) yield fetchAndStoreTopology(topology._id) @@ -52,7 +52,7 @@ export function* onAddTopology(action) { yield put( addPropToStoreObject('project', currentProjectId, { topologyIds: topologyIds.concat([topology._id]), - }), + }) ) yield put(setCurrentTopology(topology._id)) } catch (error) { @@ -74,7 +74,7 @@ export function* onDeleteTopology(action) { yield put( addPropToStoreObject('project', currentProjectId, { topologyIds: topologyIds.filter((id) => id !== action.id), - }), + }) ) } catch (error) { console.error(error) @@ -258,7 +258,7 @@ export function* onAddUnit(action) { const position = yield select((state) => state.interactionLevel.position) const machine = yield select( (state) => - state.objects.machine[state.objects.rack[state.objects.tile[tileId].rackId].machineIds[position - 1]], + state.objects.machine[state.objects.rack[state.objects.tile[tileId].rackId].machineIds[position - 1]] ) if (machine[action.unitType + 'Ids'].length >= MAX_NUM_UNITS_PER_MACHINE) { @@ -269,7 +269,7 @@ export function* onAddUnit(action) { yield put( addPropToStoreObject('machine', machine._id, { [action.unitType + 'Ids']: units, - }), + }) ) yield updateTopologyOnServer(topologyId) } catch (error) { @@ -284,7 +284,7 @@ export function* onDeleteUnit(action) { const position = yield select((state) => state.interactionLevel.position) const machine = yield select( (state) => - state.objects.machine[state.objects.rack[state.objects.tile[tileId].rackId].machineIds[position - 1]], + state.objects.machine[state.objects.rack[state.objects.tile[tileId].rackId].machineIds[position - 1]] ) const unitIds = machine[action.unitType + 'Ids'].slice() unitIds.splice(action.index, 1) @@ -292,7 +292,7 @@ export function* onDeleteUnit(action) { yield put( addPropToStoreObject('machine', machine._id, { [action.unitType + 'Ids']: unitIds, - }), + }) ) yield updateTopologyOnServer(topologyId) } catch (error) { |
