diff options
| author | jc0b <j@jc0b.computer> | 2020-07-22 16:28:47 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:21 +0200 |
| commit | d7469b9ebb01cf36a78cc98aab31fa8f307c4f65 (patch) | |
| tree | d0535fa0cfe95001302fbd2b0d046d51caab6ffd /frontend/src/containers/app/sidebars/topology/machine | |
| parent | 67b6ec800df8e023efadb60ae5f7919030b19789 (diff) | |
| parent | 9e7cb3bd367607b32e102c3a87b68b33c53dec46 (diff) | |
Merge branch 'master' onto working copy
Diffstat (limited to 'frontend/src/containers/app/sidebars/topology/machine')
7 files changed, 17 insertions, 27 deletions
diff --git a/frontend/src/containers/app/sidebars/topology/machine/BackToRackContainer.js b/frontend/src/containers/app/sidebars/topology/machine/BackToRackContainer.js index 61cb79a8..24287ab0 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/BackToRackContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/BackToRackContainer.js @@ -2,14 +2,12 @@ import { connect } from 'react-redux' import { goDownOneInteractionLevel } from '../../../../../actions/interaction-level' import BackToRackComponent from '../../../../../components/app/sidebars/topology/machine/BackToRackComponent' -const mapDispatchToProps = dispatch => { +const mapDispatchToProps = (dispatch) => { return { onClick: () => dispatch(goDownOneInteractionLevel()), } } -const BackToRackContainer = connect(undefined, mapDispatchToProps)( - BackToRackComponent, -) +const BackToRackContainer = connect(undefined, mapDispatchToProps)(BackToRackComponent) export default BackToRackContainer diff --git a/frontend/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js b/frontend/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js index 2dfb0d46..65e683e6 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js @@ -2,14 +2,12 @@ import { connect } from 'react-redux' import { openDeleteMachineModal } from '../../../../../actions/modals/topology' import DeleteMachineComponent from '../../../../../components/app/sidebars/topology/machine/DeleteMachineComponent' -const mapDispatchToProps = dispatch => { +const mapDispatchToProps = (dispatch) => { return { onClick: () => dispatch(openDeleteMachineModal()), } } -const DeleteMachineContainer = connect(undefined, mapDispatchToProps)( - DeleteMachineComponent, -) +const DeleteMachineContainer = connect(undefined, mapDispatchToProps)(DeleteMachineComponent) export default DeleteMachineContainer diff --git a/frontend/src/containers/app/sidebars/topology/machine/MachineNameContainer.js b/frontend/src/containers/app/sidebars/topology/machine/MachineNameContainer.js index 5c29f85f..1cf35b05 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/MachineNameContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/MachineNameContainer.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import MachineNameComponent from '../../../../../components/app/sidebars/topology/machine/MachineNameComponent' -const mapStateToProps = state => { +const mapStateToProps = (state) => { return { position: state.interactionLevel.position, } diff --git a/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js index 868f26da..b04e3118 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/MachineSidebarContainer.js @@ -1,17 +1,15 @@ import { connect } from 'react-redux' import MachineSidebarComponent from '../../../../../components/app/sidebars/topology/machine/MachineSidebarComponent' -const mapStateToProps = state => { +const mapStateToProps = (state) => { return { machineId: - state.objects.rack[ - state.objects.tile[state.interactionLevel.tileId].rackId - ].machineIds[state.interactionLevel.position - 1], + state.objects.rack[state.objects.tile[state.interactionLevel.tileId].rackId].machineIds[ + state.interactionLevel.position - 1 + ], } } -const MachineSidebarContainer = connect(mapStateToProps)( - MachineSidebarComponent, -) +const MachineSidebarContainer = connect(mapStateToProps)(MachineSidebarComponent) export default MachineSidebarContainer diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitAddContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitAddContainer.js index 7ff06f4f..29e48016 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/UnitAddContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/UnitAddContainer.js @@ -10,12 +10,10 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = (dispatch, ownProps) => { return { - onAdd: id => dispatch(addUnit(ownProps.unitType, id)), + onAdd: (id) => dispatch(addUnit(ownProps.unitType, id)), } } -const UnitAddContainer = connect(mapStateToProps, mapDispatchToProps)( - UnitAddComponent, -) +const UnitAddContainer = connect(mapStateToProps, mapDispatchToProps)(UnitAddComponent) export default UnitAddContainer diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js index bd629564..a028ebce 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/UnitContainer.js @@ -14,8 +14,6 @@ const mapDispatchToProps = (dispatch, ownProps) => { } } -const UnitContainer = connect(mapStateToProps, mapDispatchToProps)( - UnitComponent, -) +const UnitContainer = connect(mapStateToProps, mapDispatchToProps)(UnitComponent) export default UnitContainer diff --git a/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js b/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js index e3ad77fd..f382ff74 100644 --- a/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js +++ b/frontend/src/containers/app/sidebars/topology/machine/UnitListContainer.js @@ -5,10 +5,10 @@ const mapStateToProps = (state, ownProps) => { return { unitIds: state.objects.machine[ - state.objects.rack[ - state.objects.tile[state.interactionLevel.tileId].rackId - ].machineIds[state.interactionLevel.position - 1] - ][ownProps.unitType + 'Ids'], + state.objects.rack[state.objects.tile[state.interactionLevel.tileId].rackId].machineIds[ + state.interactionLevel.position - 1 + ] + ][ownProps.unitType + 'Ids'], } } |
