open-nomad/ui/app/templates/components/topo-viz/datacenter.hbs
2020-10-15 02:54:16 -07:00

20 lines
959 B
Handlebars

<div data-test-topo-viz-datacenter class="boxed-section topo-viz-datacenter">
<div data-test-topo-viz-datacenter-label class="boxed-section-head is-hollow">
<strong>{{@datacenter.name}}</strong>
<span class="bumper-left">{{this.scheduledAllocations.length}} Allocs</span>
<span class="bumper-left">{{@datacenter.nodes.length}} Nodes</span>
<span class="bumper-left is-faded">{{this.aggregatedAllocationResources.memory}}/{{this.aggregatedNodeResources.memory}} MiB,
{{this.aggregatedAllocationResources.cpu}}/{{this.aggregatedNodeResources.cpu}} Mhz</span>
</div>
<div class="boxed-section-body">
<FlexMasonry @columns={{if @isSingleColumn 1 2}} @items={{@datacenter.nodes}} as |node|>
<TopoViz::Node
@node={{node}}
@isDense={{@isDense}}
@heightScale={{@heightScale}}
@onAllocationSelect={{@onAllocationSelect}}
@onNodeSelect={{@onNodeSelect}}/>
</FlexMasonry>
</div>
</div>