diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-21 15:33:37 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:16 +0200 |
| commit | 912e1b96bfa7d6c022d854fa744f719b49ca98d0 (patch) | |
| tree | 49cdaf109aa08b0149c34174ce0f00c7056221ea /frontend/src/containers/app/sidebars/topology/machine | |
| parent | 791b5d1e443f97adc756264878c3aae41ca0f748 (diff) | |
Add first plotting attempts for portfolios
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'], } } |
