Conditionally use the FlexMasonry layout for datacenters within TopoViz

This commit is contained in:
Michael Lange 2020-09-29 14:23:58 -07:00
parent 1602d72789
commit 6e55d8a6eb
2 changed files with 6 additions and 2 deletions

View File

@ -62,6 +62,10 @@
} }
} }
.flex-masonry-columns-2 > .flex-masonry-item > .chart.topo-viz-node svg {
width: calc(100% - 0.75em);
}
.chart.topo-viz-edges { .chart.topo-viz-edges {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@ -7,11 +7,11 @@
{{this.aggregatedAllocationResources.cpu}}/{{this.aggregatedNodeResources.cpu}} Mhz</span> {{this.aggregatedAllocationResources.cpu}}/{{this.aggregatedNodeResources.cpu}} Mhz</span>
</div> </div>
<div class="boxed-section-body"> <div class="boxed-section-body">
{{#each @datacenter.nodes as |node|}} <FlexMasonry @columns={{if @isSingleColumn 1 2}} @items={{@datacenter.nodes}} as |node|>
<TopoViz::Node <TopoViz::Node
@node={{node}} @node={{node}}
@heightScale={{@heightScale}} @heightScale={{@heightScale}}
@onAllocationSelect={{@onAllocationSelect}} /> @onAllocationSelect={{@onAllocationSelect}} />
{{/each}} </FlexMasonry>
</div> </div>
</div> </div>