summaryrefslogtreecommitdiff
path: root/src/containers/sidebars/topology/rack
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/sidebars/topology/rack')
-rw-r--r--src/containers/sidebars/topology/rack/EmptySlotContainer.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/containers/sidebars/topology/rack/EmptySlotContainer.js b/src/containers/sidebars/topology/rack/EmptySlotContainer.js
index 97abf473..aa0673d1 100644
--- a/src/containers/sidebars/topology/rack/EmptySlotContainer.js
+++ b/src/containers/sidebars/topology/rack/EmptySlotContainer.js
@@ -2,6 +2,12 @@ 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)),
@@ -9,7 +15,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
};
const EmptySlotContainer = connect(
- undefined,
+ mapStateToProps,
mapDispatchToProps
)(EmptySlotComponent);