blob: fcd3e03b7560d95fc4f2b68a5c11dc5586a30a29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import React from 'react'
import UnitContainer from '../../../../../containers/app/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">
<span>
<strong>No units...</strong> Add some with the menu above!
</span>
</div>
)}
</ul>
)
export default UnitListComponent
|