summaryrefslogtreecommitdiff
path: root/frontend/src/containers/app/sidebars/topology
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/containers/app/sidebars/topology')
-rw-r--r--frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js3
-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.js4
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js4
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js5
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js5
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js3
-rw-r--r--frontend/src/containers/app/sidebars/topology/room/RoomTypeContainer.js12
12 files changed, 13 insertions, 33 deletions
diff --git a/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js
index 711b2b82..1869705a 100644
--- a/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/building/BuildingSidebarContainer.js
@@ -1,6 +1,5 @@
import { connect } from 'react-redux'
-import BuildingSidebarComponent
- from '../../../../../components/app/sidebars/topology/building/BuildingSidebarComponent'
+import BuildingSidebarComponent from '../../../../../components/app/sidebars/topology/building/BuildingSidebarComponent'
const mapStateToProps = state => {
return {
diff --git a/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js
index f5baee44..a39bd2d6 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js
@@ -6,7 +6,7 @@ const mapStateToProps = state => {
inSimulation: state.currentExperimentId !== -1,
machineId:
state.objects.rack[
- state.objects.tile[state.interactionLevel.tileId].objectId
+ state.objects.tile[state.interactionLevel.tileId].rackId
].machineIds[state.interactionLevel.position - 1],
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js
index 1a01cad0..d8e549a7 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js
@@ -4,8 +4,8 @@ import UnitComponent from '../../../../../components/app/sidebars/topology/machi
const mapStateToProps = (state, ownProps) => {
return {
- unit: state.objects[ownProps.unitType][ownProps.unitId],
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 fce657d4..2f11a22f 100644
--- a/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js
@@ -3,13 +3,13 @@ import UnitListComponent from '../../../../../components/app/sidebars/topology/m
const mapStateToProps = (state, ownProps) => {
return {
+ inSimulation: state.currentExperimentId !== -1,
unitIds:
state.objects.machine[
state.objects.rack[
- state.objects.tile[state.interactionLevel.tileId].objectId
+ state.objects.tile[state.interactionLevel.tileId].rackId
].machineIds[state.interactionLevel.position - 1]
][ownProps.unitType + 'Ids'],
- 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 f205257e..89818f1d 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
@@ -11,11 +11,11 @@ const mapStateToProps = (state, ownProps) => {
if (inSimulation) {
if (
state.states.machine[state.currentTick] &&
- state.states.machine[state.currentTick][machine.id]
+ state.states.machine[state.currentTick][machine._id]
) {
machineLoad = getStateLoad(
state.loadMetric,
- state.states.machine[state.currentTick][machine.id],
+ state.states.machine[state.currentTick][machine._id],
)
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js b/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js
index 3a797ed5..3898d119 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js
@@ -5,7 +5,7 @@ const mapStateToProps = state => {
return {
machineIds:
state.objects.rack[
- state.objects.tile[state.interactionLevel.tileId].objectId
+ state.objects.tile[state.interactionLevel.tileId].rackId
].machineIds,
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js b/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js
index 11173b82..1eb885fc 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js
@@ -6,7 +6,7 @@ const mapStateToProps = state => {
return {
rackName:
state.objects.rack[
- state.objects.tile[state.interactionLevel.tileId].objectId
+ state.objects.tile[state.interactionLevel.tileId].rackId
].name,
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
index 89382ef0..21745b1d 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
@@ -3,7 +3,7 @@ import RackSidebarComponent from '../../../../../components/app/sidebars/topolog
const mapStateToProps = state => {
return {
- rackId: state.objects.tile[state.interactionLevel.tileId].objectId,
+ rackId: state.objects.tile[state.interactionLevel.tileId].rackId,
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 29014022..87470bfe 100644
--- a/frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/room/EditRoomContainer.js
@@ -1,8 +1,5 @@
import { connect } from 'react-redux'
-import {
- finishRoomEdit,
- startRoomEdit,
-} from '../../../../../actions/topology/building'
+import { finishRoomEdit, startRoomEdit } from '../../../../../actions/topology/building'
import EditRoomComponent from '../../../../../components/app/sidebars/topology/room/EditRoomComponent'
const mapStateToProps = state => {
diff --git a/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js b/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js
index fe42647c..30f7a688 100644
--- a/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/room/RackConstructionContainer.js
@@ -1,8 +1,5 @@
import { connect } from 'react-redux'
-import {
- startRackConstruction,
- stopRackConstruction,
-} from '../../../../../actions/topology/room'
+import { startRackConstruction, stopRackConstruction } from '../../../../../actions/topology/room'
import RackConstructionComponent from '../../../../../components/app/sidebars/topology/room/RackConstructionComponent'
const mapStateToProps = state => {
diff --git a/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js
index f940b282..443495de 100644
--- a/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/room/RoomSidebarContainer.js
@@ -3,9 +3,8 @@ import RoomSidebarComponent from '../../../../../components/app/sidebars/topolog
const mapStateToProps = state => {
return {
- roomId: state.interactionLevel.roomId,
- roomType: state.objects.room[state.interactionLevel.roomId].roomType,
inSimulation: state.currentExperimentId !== -1,
+ roomId: state.interactionLevel.roomId,
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/room/RoomTypeContainer.js b/frontend/src/containers/app/sidebars/topology/room/RoomTypeContainer.js
deleted file mode 100644
index de4c8c85..00000000
--- a/frontend/src/containers/app/sidebars/topology/room/RoomTypeContainer.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { connect } from 'react-redux'
-import RoomTypeComponent from '../../../../../components/app/sidebars/topology/room/RoomTypeComponent'
-
-const mapStateToProps = state => {
- return {
- roomType: state.objects.room[state.interactionLevel.roomId].roomType,
- }
-}
-
-const RoomNameContainer = connect(mapStateToProps)(RoomTypeComponent)
-
-export default RoomNameContainer