blob: d8a31ddca5213a7eadda681608f1708ac40f8799 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
|