summaryrefslogtreecommitdiff
path: root/src/components/sidebars/topology/machine/UnitListComponent.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/sidebars/topology/machine/UnitListComponent.js')
-rw-r--r--src/components/sidebars/topology/machine/UnitListComponent.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/sidebars/topology/machine/UnitListComponent.js b/src/components/sidebars/topology/machine/UnitListComponent.js
new file mode 100644
index 00000000..288d1428
--- /dev/null
+++ b/src/components/sidebars/topology/machine/UnitListComponent.js
@@ -0,0 +1,17 @@
+import React from "react";
+import UnitContainer from "../../../../containers/sidebars/topology/machine/UnitContainer";
+
+const UnitListComponent = ({unitType, unitIds}) => (
+ <ul className="list-group mt-1">
+ {unitIds.length !== 0 ?
+ unitIds.map((unitId, index) => (
+ <UnitContainer unitType={unitType} unitId={unitId} index={index} key={index}/>
+ )) :
+ <div className="alert alert-info">
+ <strong>No units...</strong> Add some with the menu above!
+ </div>
+ }
+ </ul>
+);
+
+export default UnitListComponent;