summaryrefslogtreecommitdiff
path: root/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js')
-rw-r--r--frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js60
1 files changed, 30 insertions, 30 deletions
diff --git a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
index 8cd177e7..f205257e 100644
--- a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
+++ b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js
@@ -1,40 +1,40 @@
-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";
+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;
+ 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]
- );
+ 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
- };
-};
+ return {
+ machine,
+ inSimulation,
+ machineLoad,
+ }
+}
const mapDispatchToProps = (dispatch, ownProps) => {
- return {
- onClick: () => dispatch(goFromRackToMachine(ownProps.position))
- };
-};
+ return {
+ onClick: () => dispatch(goFromRackToMachine(ownProps.position)),
+ }
+}
const MachineContainer = connect(mapStateToProps, mapDispatchToProps)(
- MachineComponent
-);
+ MachineComponent,
+)
-export default MachineContainer;
+export default MachineContainer