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

23 lines
859 B
Handlebars
Raw Normal View History

<div class="topo-viz {{if (eq this.datacenters.length 1) "is-single-column"}}" {{did-insert this.loadNodes}} {{did-insert this.captureElement}}>
{{#if this.isLoaded}}
{{#each this.datacenters as |dc|}}
<TopoViz::Datacenter
@datacenter={{dc.name}}
@nodes={{dc.nodes}}
@heightScale={{this.heightScale}}
@onAllocationSelect={{this.associateAllocations}}
@activeTaskGroup={{this.activeTaskGroup}}
@activeJobId={{this.activeJobId}}
@onLoad={{action this.masonry}}/>
{{/each}}
{{#if this.activeAllocation}}
<svg class="chart topo-viz-edges" {{window-resize this.computedActiveEdges}}>
{{#each this.activeEdges as |edge|}}
<line class="edge" x1={{edge.x1}} y1={{edge.y1}} x2={{edge.x2}} y2={{edge.y2}} />
{{/each}}
</svg>
{{/if}}
{{/if}}
2020-09-03 02:37:13 +00:00
</div>