Files
nomad/ui/app/templates/components/topo-viz/datacenter.hbs
Luiz Aoqui df37f2d022 ui: add tooltips to the Topology labels (#17647)
Add tooltips to labels in nodes and datacenters for the Topology view
page to clarify what each value represents.
2023-06-22 10:33:42 -04:00

31 lines
1.5 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
~}}
<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">
<span class="tooltip" aria-label="Datacenter"><strong>{{@datacenter.name}}</strong></span>
<span class="bumper-left tooltip" aria-label="Number of Allocations">{{this.scheduledAllocations.length}} Allocs</span>
<span class="bumper-left tooltip" aria-label="Number of Nodes">{{@datacenter.nodes.length}} Nodes</span>
<span class="bumper-left is-faded">
<span class="tooltip" aria-label="Memory Allocated">{{format-bytes this.aggregatedAllocationResources.memory start="MiB"}}</span> /
<span class="tooltip" aria-label="Total Memory">{{format-bytes this.aggregatedNodeResources.memory start="MiB"}},</span>
<span class="tooltip" aria-label="CPU Allocated">{{format-hertz this.aggregatedAllocationResources.cpu}}</span> /
<span class="tooltip" aria-label="Total CPU">{{format-hertz this.aggregatedNodeResources.cpu}}</span>
</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}}
@onAllocationFocus={{@onAllocationFocus}}
@onAllocationBlur={{@onAllocationBlur}}
@onNodeSelect={{@onNodeSelect}} />
</FlexMasonry>
</div>
</div>