open-nomad/ui/app/templates/components/topo-viz/datacenter.hbs
Michael Lange 4c155b5da4 CSS Grid based masonry layout
TBH, it's buggy and I don't like it.
2020-10-15 02:54:14 -07:00

24 lines
996 B
Handlebars

<div class="boxed-section topo-viz-datacenter" {{did-insert this.loadAllocations}}>
<div class="masonry-container">
<div class="boxed-section-head is-hollow">
<strong>{{@datacenter}}</strong>
<span class="bumper-left">{{this.scheduledAllocations.length}} Allocs</span>
<span class="bumper-left">{{@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">
{{#if this.isLoaded}}
{{#each @nodes as |node|}}
<TopoViz::Node
@node={{node}}
@heightScale={{@heightScale}}
@onAllocationSelect={{@onAllocationSelect}}
@activeTaskGroup={{@activeTaskGroup}}
@activeJobId={{@activeJobId}} />
{{/each}}
{{/if}}
</div>
</div>
</div>