From 90fae26aa4bd0e0eb3272ff6e6524060e9004fbb Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Mon, 29 Jun 2020 15:47:09 +0200 Subject: Prepare frontend repository for monorepo This change prepares the frontend Git repository for the monorepo residing at https://github.com/atlarge-research.com/opendc. To accomodate for this, we move all files into a frontend subdirectory. --- .../sidebars/topology/rack/BackToRoomContainer.js | 15 -------- .../sidebars/topology/rack/DeleteRackContainer.js | 15 -------- .../sidebars/topology/rack/EmptySlotContainer.js | 21 ------------ .../app/sidebars/topology/rack/MachineContainer.js | 40 ---------------------- .../sidebars/topology/rack/MachineListContainer.js | 15 -------- .../sidebars/topology/rack/RackNameContainer.js | 24 ------------- .../sidebars/topology/rack/RackSidebarContainer.js | 13 ------- 7 files changed, 143 deletions(-) delete mode 100644 src/containers/app/sidebars/topology/rack/BackToRoomContainer.js delete mode 100644 src/containers/app/sidebars/topology/rack/DeleteRackContainer.js delete mode 100644 src/containers/app/sidebars/topology/rack/EmptySlotContainer.js delete mode 100644 src/containers/app/sidebars/topology/rack/MachineContainer.js delete mode 100644 src/containers/app/sidebars/topology/rack/MachineListContainer.js delete mode 100644 src/containers/app/sidebars/topology/rack/RackNameContainer.js delete mode 100644 src/containers/app/sidebars/topology/rack/RackSidebarContainer.js (limited to 'src/containers/app/sidebars/topology/rack') diff --git a/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js b/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js deleted file mode 100644 index 1b1bb2b0..00000000 --- a/src/containers/app/sidebars/topology/rack/BackToRoomContainer.js +++ /dev/null @@ -1,15 +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/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js b/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js deleted file mode 100644 index a54ceb23..00000000 --- a/src/containers/app/sidebars/topology/rack/DeleteRackContainer.js +++ /dev/null @@ -1,15 +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/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js b/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js deleted file mode 100644 index 527805a2..00000000 --- a/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js +++ /dev/null @@ -1,21 +0,0 @@ -import { connect } from "react-redux"; -import { addMachine } from "../../../../../actions/topology/rack"; -import EmptySlotComponent from "../../../../../components/app/sidebars/topology/rack/EmptySlotComponent"; - -const mapStateToProps = state => { - return { - inSimulation: state.currentExperimentId !== -1 - }; -}; - -const mapDispatchToProps = (dispatch, ownProps) => { - return { - onAdd: () => dispatch(addMachine(ownProps.position)) - }; -}; - -const EmptySlotContainer = connect(mapStateToProps, mapDispatchToProps)( - EmptySlotComponent -); - -export default EmptySlotContainer; diff --git a/src/containers/app/sidebars/topology/rack/MachineContainer.js b/src/containers/app/sidebars/topology/rack/MachineContainer.js deleted file mode 100644 index 8cd177e7..00000000 --- a/src/containers/app/sidebars/topology/rack/MachineContainer.js +++ /dev/null @@ -1,40 +0,0 @@ -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; - - 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 - }; -}; - -const mapDispatchToProps = (dispatch, ownProps) => { - return { - onClick: () => dispatch(goFromRackToMachine(ownProps.position)) - }; -}; - -const MachineContainer = connect(mapStateToProps, mapDispatchToProps)( - MachineComponent -); - -export default MachineContainer; diff --git a/src/containers/app/sidebars/topology/rack/MachineListContainer.js b/src/containers/app/sidebars/topology/rack/MachineListContainer.js deleted file mode 100644 index b19a50ae..00000000 --- a/src/containers/app/sidebars/topology/rack/MachineListContainer.js +++ /dev/null @@ -1,15 +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].objectId - ].machineIds - }; -}; - -const MachineListContainer = connect(mapStateToProps)(MachineListComponent); - -export default MachineListContainer; diff --git a/src/containers/app/sidebars/topology/rack/RackNameContainer.js b/src/containers/app/sidebars/topology/rack/RackNameContainer.js deleted file mode 100644 index 8f364ca0..00000000 --- a/src/containers/app/sidebars/topology/rack/RackNameContainer.js +++ /dev/null @@ -1,24 +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].objectId - ].name - }; -}; - -const mapDispatchToProps = dispatch => { - return { - onEdit: () => dispatch(openEditRackNameModal()) - }; -}; - -const RackNameContainer = connect(mapStateToProps, mapDispatchToProps)( - RackNameComponent -); - -export default RackNameContainer; diff --git a/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js b/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js deleted file mode 100644 index 0a2bfdcc..00000000 --- a/src/containers/app/sidebars/topology/rack/RackSidebarContainer.js +++ /dev/null @@ -1,13 +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].objectId, - inSimulation: state.currentExperimentId !== -1 - }; -}; - -const RackSidebarContainer = connect(mapStateToProps)(RackSidebarComponent); - -export default RackSidebarContainer; -- cgit v1.2.3