diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-01 13:33:31 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:47:17 +0200 |
| commit | de8f12d74faef5fa3f9e38d1340948cab2d06ea3 (patch) | |
| tree | 678bf1af3e5fa2334f0df43388d45294785bbf1e /frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js | |
| parent | 44236756c4cf689806dc17c6950a2cff3e9227bf (diff) | |
Manually generate IDs
Diffstat (limited to 'frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js')
| -rw-r--r-- | frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js | 60 |
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 |
