2020-10-23 20:54:54 +00:00
|
|
|
<div
|
|
|
|
data-test-topo-viz
|
|
|
|
class="topo-viz {{if this.isSingleColumn "is-single-column"}}"
|
|
|
|
{{did-insert this.buildTopology}}
|
|
|
|
{{did-insert this.captureElement}}
|
|
|
|
{{window-resize this.determineViewportColumns}}>
|
2020-10-14 00:27:11 +00:00
|
|
|
<FlexMasonry
|
|
|
|
@columns={{if this.isSingleColumn 1 2}}
|
|
|
|
@items={{this.topology.datacenters}}
|
2020-10-14 07:54:39 +00:00
|
|
|
@withSpacing={{true}} as |dc|>
|
2020-10-14 00:27:11 +00:00
|
|
|
<TopoViz::Datacenter
|
|
|
|
@datacenter={{dc}}
|
|
|
|
@isSingleColumn={{this.datacenterIsSingleColumn}}
|
|
|
|
@isDense={{this.isDense}}
|
|
|
|
@heightScale={{this.topology.heightScale}}
|
|
|
|
@onAllocationSelect={{this.associateAllocations}}
|
2020-10-30 21:23:59 +00:00
|
|
|
@onAllocationFocus={{this.showTooltip}}
|
|
|
|
@onAllocationBlur={{this.hideTooltip}}
|
2020-10-14 07:54:39 +00:00
|
|
|
@onNodeSelect={{this.showNodeDetails}} />
|
2020-10-14 00:27:11 +00:00
|
|
|
</FlexMasonry>
|
2020-09-11 07:56:14 +00:00
|
|
|
|
2020-10-30 21:23:59 +00:00
|
|
|
<div class="chart-tooltip is-absolute {{if this.highlightAllocation "active" "inactive"}}" style={{this.tooltipStyle}}>
|
|
|
|
{{#let this.highlightAllocation as |allocation|}}
|
|
|
|
<ol class="is-static">
|
|
|
|
<li>
|
|
|
|
<span class="label">Job</span>
|
|
|
|
<span class="value">{{allocation.allocation.job.name}}/{{allocation.allocation.taskGroupName}}</span>
|
|
|
|
</li>
|
|
|
|
{{#if this.system.shouldShowNamespaces}}
|
|
|
|
<li>
|
|
|
|
<span class="label">Namespace</span>
|
|
|
|
<span class="value">{{allocation.allocation.job.namespace.name}}</span>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
<li>
|
|
|
|
<span class="label">Memory</span>
|
2021-03-29 23:16:48 +00:00
|
|
|
<span class="value">{{format-scheduled-bytes allocation.memory start="MiB"}}</span>
|
2020-10-30 21:23:59 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<span class="label">CPU</span>
|
2021-03-29 23:16:48 +00:00
|
|
|
<span class="value">{{format-scheduled-hertz allocation.cpu}}</span>
|
2020-10-30 21:23:59 +00:00
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
{{/let}}
|
|
|
|
</div>
|
|
|
|
|
2020-10-14 00:27:11 +00:00
|
|
|
{{#if this.activeAllocation}}
|
2021-01-27 18:13:05 +00:00
|
|
|
<svg data-test-allocation-associations class="chart topo-viz-edges" {{window-resize this.resizeEdges}}>
|
2020-10-14 00:27:11 +00:00
|
|
|
<g transform="translate({{this.edgeOffset.x}},{{this.edgeOffset.y}})">
|
|
|
|
{{#each this.activeEdges as |edge|}}
|
2020-10-15 09:18:55 +00:00
|
|
|
<path data-test-allocation-association class="edge" d={{edge}} />
|
2020-10-14 00:27:11 +00:00
|
|
|
{{/each}}
|
|
|
|
</g>
|
|
|
|
</svg>
|
2020-09-04 07:43:27 +00:00
|
|
|
{{/if}}
|
2020-09-03 02:37:13 +00:00
|
|
|
</div>
|