2020-06-01 19:03:56 +00:00
|
|
|
<ListAccordion data-test-job-summary @source={{array job}} @key="id" @startExpanded={{isExpanded}} @onToggle={{action persist}} as |a|>
|
|
|
|
<a.head @buttonLabel={{if a.isOpen "collapse" "expand"}}>
|
2018-07-12 19:06:42 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column is-minimum nowrap">
|
|
|
|
{{#if a.item.hasChildren}}
|
|
|
|
Children Status
|
|
|
|
<span class="badge {{if a.isOpen "is-white" "is-light"}}">
|
|
|
|
{{a.item.summary.totalChildren}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
Allocation Status
|
|
|
|
<span class="badge {{if a.isOpen "is-white" "is-light"}}">
|
|
|
|
{{a.item.summary.totalAllocs}}
|
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if (not a.isOpen)}}
|
|
|
|
<div class="column">
|
|
|
|
<div class="inline-chart bumper-left">
|
|
|
|
{{#if a.item.hasChildren}}
|
|
|
|
{{#if (gt a.item.totalChildren 0)}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<ChildrenStatusBar @job={{a.item}} @isNarrow={{true}} />
|
2018-07-12 19:06:42 +00:00
|
|
|
{{else}}
|
|
|
|
<em class="is-faded">No Children</em>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<AllocationStatusBar @allocationContainer={{a.item}} @isNarrow={{true}} />
|
2018-07-12 19:06:42 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2020-06-01 19:03:56 +00:00
|
|
|
</a.head>
|
|
|
|
<a.body>
|
2018-07-12 19:06:42 +00:00
|
|
|
{{#component (if a.item.hasChildren "children-status-bar" "allocation-status-bar")
|
|
|
|
allocationContainer=a.item.summary
|
|
|
|
job=a.item.summary
|
2018-01-25 17:31:48 +00:00
|
|
|
class="split-view" as |chart|}}
|
2018-02-01 00:55:43 +00:00
|
|
|
<ol data-test-legend class="legend">
|
2018-01-25 17:31:48 +00:00
|
|
|
{{#each chart.data as |datum index|}}
|
2018-08-21 23:37:36 +00:00
|
|
|
<li class="{{datum.className}} {{if (eq datum.label chart.activeDatum.label) "is-active"}} {{if (eq datum.value 0) "is-empty"}}">
|
2018-01-25 17:31:48 +00:00
|
|
|
<span class="color-swatch {{if datum.className datum.className (concat "swatch-" index)}}" />
|
|
|
|
<span class="value" data-test-legend-value="{{datum.className}}">{{datum.value}}</span>
|
|
|
|
<span class="label">
|
|
|
|
{{datum.label}}
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ol>
|
|
|
|
{{/component}}
|
2020-06-01 19:03:56 +00:00
|
|
|
</a.body>
|
|
|
|
</ListAccordion>
|
2018-07-12 19:06:42 +00:00
|
|
|
|