summaryrefslogtreecommitdiff
path: root/src/containers/sidebars/topology/rack
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-22 21:20:54 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:18 +0200
commitbf7708f658cc6299a3b775afe24459b5a808c54d (patch)
tree227520267968759e2a2f1e29e6f3edfeb4e3cf8a /src/containers/sidebars/topology/rack
parente722cf117d0e3ebac20237f96764fb08cab49a62 (diff)
Restructure component and container directories
Diffstat (limited to 'src/containers/sidebars/topology/rack')
-rw-r--r--src/containers/sidebars/topology/rack/BackToRoomContainer.js16
-rw-r--r--src/containers/sidebars/topology/rack/DeleteRackContainer.js16
-rw-r--r--src/containers/sidebars/topology/rack/EmptySlotContainer.js22
-rw-r--r--src/containers/sidebars/topology/rack/MachineContainer.js35
-rw-r--r--src/containers/sidebars/topology/rack/MachineListContainer.js14
-rw-r--r--src/containers/sidebars/topology/rack/RackNameContainer.js22
-rw-r--r--src/containers/sidebars/topology/rack/RackSidebarContainer.js15
7 files changed, 0 insertions, 140 deletions
diff --git a/src/containers/sidebars/topology/rack/BackToRoomContainer.js b/src/containers/sidebars/topology/rack/BackToRoomContainer.js
deleted file mode 100644
index 876078d5..00000000
--- a/src/containers/sidebars/topology/rack/BackToRoomContainer.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import {connect} from "react-redux";
-import {goDownOneInteractionLevel} from "../../../../actions/interaction-level";
-import BackToRoomComponent from "../../../../components/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/sidebars/topology/rack/DeleteRackContainer.js b/src/containers/sidebars/topology/rack/DeleteRackContainer.js
deleted file mode 100644
index f95c48b8..00000000
--- a/src/containers/sidebars/topology/rack/DeleteRackContainer.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import {connect} from "react-redux";
-import {openDeleteRackModal} from "../../../../actions/modals/topology";
-import DeleteRackComponent from "../../../../components/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/sidebars/topology/rack/EmptySlotContainer.js b/src/containers/sidebars/topology/rack/EmptySlotContainer.js
deleted file mode 100644
index aa0673d1..00000000
--- a/src/containers/sidebars/topology/rack/EmptySlotContainer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import {connect} from "react-redux";
-import {addMachine} from "../../../../actions/topology/rack";
-import EmptySlotComponent from "../../../../components/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/sidebars/topology/rack/MachineContainer.js b/src/containers/sidebars/topology/rack/MachineContainer.js
deleted file mode 100644
index 7406d191..00000000
--- a/src/containers/sidebars/topology/rack/MachineContainer.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import {connect} from "react-redux";
-import {goFromRackToMachine} from "../../../../actions/interaction-level";
-import MachineComponent from "../../../../components/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/sidebars/topology/rack/MachineListContainer.js b/src/containers/sidebars/topology/rack/MachineListContainer.js
deleted file mode 100644
index eef2a4e1..00000000
--- a/src/containers/sidebars/topology/rack/MachineListContainer.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import {connect} from "react-redux";
-import MachineListComponent from "../../../../components/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/sidebars/topology/rack/RackNameContainer.js b/src/containers/sidebars/topology/rack/RackNameContainer.js
deleted file mode 100644
index 34416938..00000000
--- a/src/containers/sidebars/topology/rack/RackNameContainer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import {connect} from "react-redux";
-import {openEditRackNameModal} from "../../../../actions/modals/topology";
-import RackNameComponent from "../../../../components/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/sidebars/topology/rack/RackSidebarContainer.js b/src/containers/sidebars/topology/rack/RackSidebarContainer.js
deleted file mode 100644
index 4652b968..00000000
--- a/src/containers/sidebars/topology/rack/RackSidebarContainer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import {connect} from "react-redux";
-import RackSidebarComponent from "../../../../components/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;