diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-10-04 22:49:07 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-10-04 22:49:25 +0200 |
| commit | 751a9ef3a12c952fe179f256d854d0c4aa37e28e (patch) | |
| tree | 241fc22c592a277526e73cc70ea0f95d5a8a7b29 /src/containers/app/sidebars/topology/rack/MachineContainer.js | |
| parent | 9257d89ec2e22b65ffecc7dc7cf67b7a74c34d60 (diff) | |
Apply prettier to codebase
Diffstat (limited to 'src/containers/app/sidebars/topology/rack/MachineContainer.js')
| -rw-r--r-- | src/containers/app/sidebars/topology/rack/MachineContainer.js | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/containers/app/sidebars/topology/rack/MachineContainer.js b/src/containers/app/sidebars/topology/rack/MachineContainer.js index cd15ddd0..8cd177e7 100644 --- a/src/containers/app/sidebars/topology/rack/MachineContainer.js +++ b/src/containers/app/sidebars/topology/rack/MachineContainer.js @@ -1,35 +1,40 @@ -import {connect} from "react-redux"; -import {goFromRackToMachine} from "../../../../../actions/interaction-level"; +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 { 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); +const MachineContainer = connect(mapStateToProps, mapDispatchToProps)( + MachineComponent +); export default MachineContainer; |
