summaryrefslogtreecommitdiff
path: root/src/components/sidebars/topology/rack/MachineListComponent.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/sidebars/topology/rack/MachineListComponent.js')
-rw-r--r--src/components/sidebars/topology/rack/MachineListComponent.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/components/sidebars/topology/rack/MachineListComponent.js b/src/components/sidebars/topology/rack/MachineListComponent.js
new file mode 100644
index 00000000..d8a31ddc
--- /dev/null
+++ b/src/components/sidebars/topology/rack/MachineListComponent.js
@@ -0,0 +1,19 @@
+import React from "react";
+import EmptySlotContainer from "../../../../containers/sidebars/topology/rack/EmptySlotContainer";
+import MachineContainer from "../../../../containers/sidebars/topology/rack/MachineContainer";
+
+const MachineListComponent = ({machineIds}) => {
+ return (
+ <ul className="list-group">
+ {machineIds.map((machineId, index) => {
+ if (machineId === null) {
+ return <EmptySlotContainer key={index} position={index}/>;
+ } else {
+ return <MachineContainer key={index} position={index} machineId={machineId}/>;
+ }
+ })}
+ </ul>
+ );
+};
+
+export default MachineListComponent;