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

25 lines
1,016 B
Handlebars
Raw Normal View History

<div data-test-topo-viz class="topo-viz {{if this.isSingleColumn "is-single-column"}}" {{did-insert this.buildTopology}} {{did-insert this.captureElement}}>
<FlexMasonry
@columns={{if this.isSingleColumn 1 2}}
@items={{this.topology.datacenters}}
2020-10-14 07:54:39 +00:00
@withSpacing={{true}} as |dc|>
<TopoViz::Datacenter
@datacenter={{dc}}
@isSingleColumn={{this.datacenterIsSingleColumn}}
@isDense={{this.isDense}}
@heightScale={{this.topology.heightScale}}
@onAllocationSelect={{this.associateAllocations}}
2020-10-14 07:54:39 +00:00
@onNodeSelect={{this.showNodeDetails}} />
</FlexMasonry>
{{#if this.activeAllocation}}
<svg data-test-allocation-associations class="chart topo-viz-edges" {{window-resize this.computedActiveEdges}}>
<g transform="translate({{this.edgeOffset.x}},{{this.edgeOffset.y}})">
{{#each this.activeEdges as |edge|}}
<path data-test-allocation-association class="edge" d={{edge}} />
{{/each}}
</g>
</svg>
{{/if}}
2020-09-03 02:37:13 +00:00
</div>