summaryrefslogtreecommitdiff
path: root/src/components/sidebars/topology/rack/EmptySlotComponent.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-21 16:07:12 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:05 +0200
commit19f1e6db285d0bb8a96d2cea9c7f3a543692b81a (patch)
tree6c4aeea3bd174c4675bb90fbcdbc4f70136058d3 /src/components/sidebars/topology/rack/EmptySlotComponent.js
parent5020d7c293beb08699897e003525059396c16424 (diff)
Hide all construction elements in simulation
Diffstat (limited to 'src/components/sidebars/topology/rack/EmptySlotComponent.js')
-rw-r--r--src/components/sidebars/topology/rack/EmptySlotComponent.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/components/sidebars/topology/rack/EmptySlotComponent.js b/src/components/sidebars/topology/rack/EmptySlotComponent.js
index 1ca13b67..380cbf16 100644
--- a/src/components/sidebars/topology/rack/EmptySlotComponent.js
+++ b/src/components/sidebars/topology/rack/EmptySlotComponent.js
@@ -1,15 +1,20 @@
import React from "react";
import FontAwesome from "react-fontawesome";
-const EmptySlotComponent = ({position, onAdd}) => (
+const EmptySlotComponent = ({position, onAdd, inSimulation}) => (
<li className="list-group-item d-flex justify-content-between align-items-center">
- <span className="badge badge-default badge-info mr-1">
- {position}
- </span>
- <button className="btn btn-outline-primary" onClick={onAdd}>
- <FontAwesome name="plus" className="mr-1"/>
- Add machine
- </button>
+ <span className="badge badge-default badge-info mr-1 disabled">
+ {position}
+ </span>
+ {inSimulation ?
+ <span className="badge badge-default badge-success">
+ Empty Slot
+ </span> :
+ <button className="btn btn-outline-primary" onClick={onAdd}>
+ <FontAwesome name="plus" className="mr-1"/>
+ Add machine
+ </button>
+ }
</li>
);