diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-22 14:07:39 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:18 +0200 |
| commit | 92ce9387f5c3ce54b4077ef6a5f604fc2cfe6ade (patch) | |
| tree | 90432dbd06a13d300f8307dea342f4639c9c57e7 /frontend/src/sagas/topology.js | |
| parent | ae8f03d514ba0982a34b96f1e29e262ca6048a19 (diff) | |
| parent | 8739a156b75ba96e15d1bb19b08ca829c1eb01e8 (diff) | |
Merge pull request #12 from atlarge-research/feature/scenario-plots
Plotting of portfolio results
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) { |
