From cd0b45627f0d8da8c8dc4edde223f3c36e9bcfbf Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 25 Apr 2021 16:01:14 +0200 Subject: build: Migrate to flat project structure This change updates the project structure to become flattened. Previously, the simulator, frontend and API each lived into their own directory. With this change, all modules of the project live in the top-level directory of the repository. This should improve discoverability of modules of the project. --- .../app/sidebars/topology/rack/AddPrefabContainer.js | 13 ------------- .../app/sidebars/topology/rack/BackToRoomContainer.js | 13 ------------- .../app/sidebars/topology/rack/DeleteRackContainer.js | 13 ------------- .../app/sidebars/topology/rack/EmptySlotContainer.js | 13 ------------- .../app/sidebars/topology/rack/MachineContainer.js | 19 ------------------- .../sidebars/topology/rack/MachineListContainer.js | 12 ------------ .../app/sidebars/topology/rack/RackNameContainer.js | 19 ------------------- .../sidebars/topology/rack/RackSidebarContainer.js | 12 ------------ 8 files changed, 114 deletions(-) delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/AddPrefabContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js delete mode 100644 frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js (limited to 'frontend/src/containers/app/sidebars/topology/rack') diff --git a/frontend/src/containers/app/sidebars/topology/rack/AddPrefabContainer.js b/frontend/src/containers/app/sidebars/topology/rack/AddPrefabContainer.js deleted file mode 100644 index c941e745..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/AddPrefabContainer.js +++ /dev/null @@ -1,13 +0,0 @@ -import { connect } from 'react-redux' -import { addPrefab } from '../../../../../actions/prefabs' -import AddPrefabComponent from '../../../../../components/app/sidebars/topology/rack/AddPrefabComponent' - -const mapDispatchToProps = (dispatch) => { - return { - onClick: () => dispatch(addPrefab('name')), - } -} - -const AddPrefabContainer = connect(undefined, mapDispatchToProps)(AddPrefabComponent) - -export default AddPrefabContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js b/frontend/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js deleted file mode 100644 index 58c3b082..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js +++ /dev/null @@ -1,13 +0,0 @@ -import { connect } from 'react-redux' -import { goDownOneInteractionLevel } from '../../../../../actions/interaction-level' -import BackToRoomComponent from '../../../../../components/app/sidebars/topology/rack/BackToRoomComponent' - -const mapDispatchToProps = (dispatch) => { - return { - onClick: () => dispatch(goDownOneInteractionLevel()), - } -} - -const BackToRoomContainer = connect(undefined, mapDispatchToProps)(BackToRoomComponent) - -export default BackToRoomContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js b/frontend/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js deleted file mode 100644 index 8229a359..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js +++ /dev/null @@ -1,13 +0,0 @@ -import { connect } from 'react-redux' -import { openDeleteRackModal } from '../../../../../actions/modals/topology' -import DeleteRackComponent from '../../../../../components/app/sidebars/topology/rack/DeleteRackComponent' - -const mapDispatchToProps = (dispatch) => { - return { - onClick: () => dispatch(openDeleteRackModal()), - } -} - -const DeleteRackContainer = connect(undefined, mapDispatchToProps)(DeleteRackComponent) - -export default DeleteRackContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js b/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js deleted file mode 100644 index cf341da9..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js +++ /dev/null @@ -1,13 +0,0 @@ -import { connect } from 'react-redux' -import { addMachine } from '../../../../../actions/topology/rack' -import EmptySlotComponent from '../../../../../components/app/sidebars/topology/rack/EmptySlotComponent' - -const mapDispatchToProps = (dispatch, ownProps) => { - return { - onAdd: () => dispatch(addMachine(ownProps.position)), - } -} - -const EmptySlotContainer = connect(undefined, mapDispatchToProps)(EmptySlotComponent) - -export default EmptySlotContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js b/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js deleted file mode 100644 index fe12827d..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/MachineContainer.js +++ /dev/null @@ -1,19 +0,0 @@ -import { connect } from 'react-redux' -import { goFromRackToMachine } from '../../../../../actions/interaction-level' -import MachineComponent from '../../../../../components/app/sidebars/topology/rack/MachineComponent' - -const mapStateToProps = (state, ownProps) => { - return { - machine: state.objects.machine[ownProps.machineId], - } -} - -const mapDispatchToProps = (dispatch, ownProps) => { - return { - onClick: () => dispatch(goFromRackToMachine(ownProps.position)), - } -} - -const MachineContainer = connect(mapStateToProps, mapDispatchToProps)(MachineComponent) - -export default MachineContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js b/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js deleted file mode 100644 index bc5a285a..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/MachineListContainer.js +++ /dev/null @@ -1,12 +0,0 @@ -import { connect } from 'react-redux' -import MachineListComponent from '../../../../../components/app/sidebars/topology/rack/MachineListComponent' - -const mapStateToProps = (state) => { - return { - machineIds: state.objects.rack[state.objects.tile[state.interactionLevel.tileId].rackId].machineIds, - } -} - -const MachineListContainer = connect(mapStateToProps)(MachineListComponent) - -export default MachineListContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js b/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js deleted file mode 100644 index 504dbc61..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/RackNameContainer.js +++ /dev/null @@ -1,19 +0,0 @@ -import { connect } from 'react-redux' -import { openEditRackNameModal } from '../../../../../actions/modals/topology' -import RackNameComponent from '../../../../../components/app/sidebars/topology/rack/RackNameComponent' - -const mapStateToProps = (state) => { - return { - rackName: state.objects.rack[state.objects.tile[state.interactionLevel.tileId].rackId].name, - } -} - -const mapDispatchToProps = (dispatch) => { - return { - onEdit: () => dispatch(openEditRackNameModal()), - } -} - -const RackNameContainer = connect(mapStateToProps, mapDispatchToProps)(RackNameComponent) - -export default RackNameContainer diff --git a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js b/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js deleted file mode 100644 index 453d7e41..00000000 --- a/frontend/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js +++ /dev/null @@ -1,12 +0,0 @@ -import { connect } from 'react-redux' -import RackSidebarComponent from '../../../../../components/app/sidebars/topology/rack/RackSidebarComponent' - -const mapStateToProps = (state) => { - return { - rackId: state.objects.tile[state.interactionLevel.tileId].rackId, - } -} - -const RackSidebarContainer = connect(mapStateToProps)(RackSidebarComponent) - -export default RackSidebarContainer -- cgit v1.2.3