open-nomad/ui/app/templates/components/topo-viz/datacenter.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
1.2 KiB
Handlebars
Raw Normal View History

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
2020-10-14 07:54:39 +00:00
<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">
2020-09-25 23:37:51 +00:00
<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">{{format-bytes this.aggregatedAllocationResources.memory start="MiB"}}/{{format-bytes this.aggregatedNodeResources.memory start="MiB"}},
{{format-hertz this.aggregatedAllocationResources.cpu}}/{{format-hertz this.aggregatedNodeResources.cpu}}</span>
2020-09-25 23:37:51 +00:00
</div>
<div class="boxed-section-body">
<FlexMasonry @columns={{if @isSingleColumn 1 2}} @items={{@datacenter.nodes}} as |node|>
2020-09-25 23:37:51 +00:00
<TopoViz::Node
@node={{node}}
@isDense={{@isDense}}
2020-09-25 23:37:51 +00:00
@heightScale={{@heightScale}}
@onAllocationSelect={{@onAllocationSelect}}
2020-10-30 21:23:59 +00:00
@onAllocationFocus={{@onAllocationFocus}}
@onAllocationBlur={{@onAllocationBlur}}
@onNodeSelect={{@onNodeSelect}} />
</FlexMasonry>
2020-09-03 02:37:13 +00:00
</div>
</div>