summaryrefslogtreecommitdiff
path: root/frontend/src/containers/app/sidebars
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-03 11:46:29 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:22 +0200
commit52865c97f820b883977179930ce4961abdb39c12 (patch)
tree6b429d80694d7e5729fb1f41ff8f9ba4b2d07d4b /frontend/src/containers/app/sidebars
parent39277c91281dbc7bd40bdffabc5b5675e9ede483 (diff)
Fix integer IDs and topology deletion
Diffstat (limited to 'frontend/src/containers/app/sidebars')
-rw-r--r--frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/machine/UnitTabsContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js2
11 files changed, 11 insertions, 11 deletions
diff --git a/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js
index 1869705a..8c8cb79b 100644
--- a/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js
@@ -3,7 +3,7 @@ import BuildingSidebarComponent from '../../../../../components/app/sidebars/top
const mapStateToProps = state => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js
index a39bd2d6..3cff7cd1 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js
@@ -3,7 +3,7 @@ import MachineSidebarComponent from '../../../../../components/app/sidebars/topo
const mapStateToProps = state => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
machineId:
state.objects.rack[
state.objects.tile[state.interactionLevel.tileId].rackId
diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js
index d8e549a7..7c26b47f 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js
@@ -4,7 +4,7 @@ import UnitComponent from '../../../../../components/app/sidebars/topology/machi
const mapStateToProps = (state, ownProps) => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
unit: state.objects[ownProps.unitType][ownProps.unitId],
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js
index 2f11a22f..2596c2bd 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js
@@ -3,7 +3,7 @@ import UnitListComponent from '../../../../../components/app/sidebars/topology/m
const mapStateToProps = (state, ownProps) => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
unitIds:
state.objects.machine[
state.objects.rack[
diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitTabsContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitTabsContainer.js
index 3490cce6..5c606de4 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/UnitTabsContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/UnitTabsContainer.js
@@ -3,7 +3,7 @@ import UnitTabsComponent from '../../../../../components/app/sidebars/topology/m
const mapStateToProps = state => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js b/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
index 07439dc9..d580a3e0 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
@@ -4,7 +4,7 @@ import EmptySlotComponent from '../../../../../components/app/sidebars/topology/
const mapStateToProps = state => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
index 89818f1d..43558329 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
@@ -5,7 +5,7 @@ import { getStateLoad } from '../../../../../util/simulation-load'
const mapStateToProps = (state, ownProps) => {
const machine = state.objects.machine[ownProps.machineId]
- const inSimulation = state.currentExperimentId !== -1
+ const inSimulation = state.currentExperimentId !== '-1'
let machineLoad = undefined
if (inSimulation) {
diff --git a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
index 21745b1d..7f931979 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
@@ -4,7 +4,7 @@ import RackSidebarComponent from '../../../../../components/app/sidebars/topolog
const mapStateToProps = state => {
return {
rackId: state.objects.tile[state.interactionLevel.tileId].rackId,
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js b/frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js
index 87470bfe..227938fa 100644
--- a/frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js
@@ -4,7 +4,7 @@ import EditRoomComponent from '../../../../../components/app/sidebars/topology/r
const mapStateToProps = state => {
return {
- isEditing: state.construction.currentRoomInConstruction !== -1,
+ isEditing: state.construction.currentRoomInConstruction !== '-1',
isInRackConstructionMode: state.construction.inRackConstructionMode,
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js b/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js
index 30f7a688..17a30d20 100644
--- a/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js
@@ -5,7 +5,7 @@ import RackConstructionComponent from '../../../../../components/app/sidebars/to
const mapStateToProps = state => {
return {
inRackConstructionMode: state.construction.inRackConstructionMode,
- isEditingRoom: state.construction.currentRoomInConstruction !== -1,
+ isEditingRoom: state.construction.currentRoomInConstruction !== '-1',
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js
index 443495de..413c8f21 100644
--- a/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js
@@ -3,7 +3,7 @@ import RoomSidebarComponent from '../../../../../components/app/sidebars/topolog
const mapStateToProps = state => {
return {
- inSimulation: state.currentExperimentId !== -1,
+ inSimulation: state.currentExperimentId !== '-1',
roomId: state.interactionLevel.roomId,
}
}