summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-03 11:50:58 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:23 +0200
commit8d107bd0a24fed7f553170816079fec0bcd21beb (patch)
tree6e680961367f3cedad0269a1092be830cce43e91 /frontend
parent0a8985a672fdc12a3cf25837635ff73fb1b0b793 (diff)
Ensure construction is ended when topology is changed
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js3
-rw-r--r--frontend/src/reducers/construction-mode.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js b/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js
index c7c81706..22ef4585 100644
--- a/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js
+++ b/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js
@@ -106,9 +106,10 @@ class ChangeTopologyModalComponent extends React.Component {
/>
</div>
<div className="form-group">
- <label className="form-control-label">Topology to duplicate</label>
+ <label className="form-control-label">Topology to duplicate (not supported yet)</label>
<select
className="form-control"
+ disabled
ref={originTopology => (this.originTopology = originTopology)}
>
<option value={-1} key={-1}>
diff --git a/frontend/src/reducers/construction-mode.js b/frontend/src/reducers/construction-mode.js
index ac281667..fb33da72 100644
--- a/frontend/src/reducers/construction-mode.js
+++ b/frontend/src/reducers/construction-mode.js
@@ -4,7 +4,7 @@ import { GO_DOWN_ONE_INTERACTION_LEVEL } from '../actions/interaction-level'
import {
CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
FINISH_NEW_ROOM_CONSTRUCTION,
- FINISH_ROOM_EDIT,
+ FINISH_ROOM_EDIT, SET_CURRENT_TOPOLOGY,
START_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
START_ROOM_EDIT,
} from '../actions/topology/building'
@@ -20,6 +20,7 @@ export function currentRoomInConstruction(state = '-1', action) {
case FINISH_NEW_ROOM_CONSTRUCTION:
case OPEN_EXPERIMENT_SUCCEEDED:
case FINISH_ROOM_EDIT:
+ case SET_CURRENT_TOPOLOGY:
case DELETE_ROOM:
return '-1'
default:
@@ -33,6 +34,7 @@ export function inRackConstructionMode(state = false, action) {
return true
case STOP_RACK_CONSTRUCTION:
case OPEN_EXPERIMENT_SUCCEEDED:
+ case SET_CURRENT_TOPOLOGY:
case GO_DOWN_ONE_INTERACTION_LEVEL:
return false
default: