summaryrefslogtreecommitdiff
path: root/frontend/src/containers/app/sidebars/topology/rack
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-07 09:55:10 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:25 +0200
commitb4bdf9fde013bb7ff9579693b64ff575f7b00e44 (patch)
tree5e05ceba918849391a639bbeeab37d290a86523c /frontend/src/containers/app/sidebars/topology/rack
parent7331e9baf2cfe7bdfb24effcf0a4801da1e7ea4d (diff)
Rename simulations to projects and remove experiment view
Diffstat (limited to 'frontend/src/containers/app/sidebars/topology/rack')
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js8
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js21
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js2
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js1
4 files changed, 3 insertions, 29 deletions
diff --git a/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js b/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
index d580a3e0..ab287bac 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
@@ -2,19 +2,13 @@ import { connect } from 'react-redux'
import { addMachine } from '../../../../../actions/topology/rack'
import EmptySlotComponent from '../../../../../components/app/sidebars/topology/rack/EmptySlotComponent'
-const mapStateToProps = state => {
- return {
- inSimulation: state.currentExperimentId !== '-1',
- }
-}
-
const mapDispatchToProps = (dispatch, ownProps) => {
return {
onAdd: () => dispatch(addMachine(ownProps.position)),
}
}
-const EmptySlotContainer = connect(mapStateToProps, mapDispatchToProps)(
+const EmptySlotContainer = connect(undefined, mapDispatchToProps)(
EmptySlotComponent,
)
diff --git a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
index 43558329..6b0f0a04 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
@@ -1,29 +1,10 @@
import { connect } from 'react-redux'
import { goFromRackToMachine } from '../../../../../actions/interaction-level'
import MachineComponent from '../../../../../components/app/sidebars/topology/rack/MachineComponent'
-import { getStateLoad } from '../../../../../util/simulation-load'
const mapStateToProps = (state, ownProps) => {
- const machine = state.objects.machine[ownProps.machineId]
- const inSimulation = state.currentExperimentId !== '-1'
-
- let machineLoad = undefined
- if (inSimulation) {
- if (
- state.states.machine[state.currentTick] &&
- state.states.machine[state.currentTick][machine._id]
- ) {
- machineLoad = getStateLoad(
- state.loadMetric,
- state.states.machine[state.currentTick][machine._id],
- )
- }
- }
-
return {
- machine,
- inSimulation,
- machineLoad,
+ machine: state.objects.machine[ownProps.machineId],
}
}
diff --git a/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js b/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js
index 1eb885fc..4d8e8936 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].rackId
+ 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 7f931979..d9be1e8b 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js
@@ -4,7 +4,6 @@ import RackSidebarComponent from '../../../../../components/app/sidebars/topolog
const mapStateToProps = state => {
return {
rackId: state.objects.tile[state.interactionLevel.tileId].rackId,
- inSimulation: state.currentExperimentId !== '-1',
}
}