27 lines
1.3 KiB
Handlebars
27 lines
1.3 KiB
Handlebars
<div class="topo-viz {{if (or this.buildTopology.isRunning this.isSingleColumn) "is-single-column"}}" {{did-insert (perform this.buildTopology)}} {{did-insert this.captureElement}}>
|
|
{{#if this.buildTopology.isRunning}}
|
|
<div class="has-text-centered">
|
|
<h2 class="title">Loading. If you have a lot of clients this may take awhile</h2>
|
|
<p>Every client needs to be loaded individually. This is a shortcoming of the prototype and will be fixed before this is graduated to the actual Nomad project.</p>
|
|
<LoadingSpinner />
|
|
</div>
|
|
{{else}}
|
|
<FlexMasonry @columns={{if this.isSingleColumn 1 2}} @items={{this.topology.datacenters}} @withSpacing={{true}} as |dc reflow|>
|
|
<TopoViz::Datacenter
|
|
@datacenter={{dc}}
|
|
@isSingleColumn={{this.datacenterIsSingleColumn}}
|
|
@heightScale={{this.topology.heightScale}}
|
|
@onAllocationSelect={{this.associateAllocations}}
|
|
@onLoad={{action reflow}}/>
|
|
</FlexMasonry>
|
|
|
|
{{#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}}
|
|
</div>
|