summaryrefslogtreecommitdiff
path: root/src/components/sidebars/topology/rack/EmptySlotComponent.js
diff options
context:
space:
mode:
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>
);