github.com/hernad/nomad@v1.6.112/ui/app/templates/components/job-page/parts/summary-chart.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 {{#if @job.hasChildren}} 7 <ChildrenStatusBar 8 @allocationContainer={{@job.summary}} 9 @job={{@job.summary}} 10 @class="split-view" as |chart| 11 > 12 <ol data-test-legend class="legend"> 13 {{#each chart.data as |datum index|}} 14 <li 15 class="{{datum.className}} 16 17 {{if (eq datum.label chart.activeDatum.label) "is-active"}} 18 19 {{if (eq datum.value 0) "is-empty"}}" 20 > 21 <JobPage::Parts::SummaryLegendItem 22 @datum={{datum}} 23 @index={{index}} 24 /> 25 </li> 26 {{/each}} 27 </ol> 28 </ChildrenStatusBar> 29 {{else}} 30 <AllocationStatusBar 31 @allocationContainer={{@job.summary}} 32 @job={{@job}} 33 @onSliceClick={{this.onSliceClick}} 34 @class="split-view" as |chart| 35 > 36 <ol data-test-legend class="legend"> 37 {{#each chart.data as |datum index|}} 38 <li 39 data-test-legend-label="{{datum.className}}" 40 class="{{datum.className}} 41 42 {{if (eq datum.label chart.activeDatum.label) "is-active"}} 43 44 {{if (eq datum.value 0) "is-empty" "is-clickable"}}" 45 > 46 {{#if (and (gt datum.value 0) datum.legendLink)}} 47 <LinkTo 48 @route="jobs.job.allocations" 49 @model={{@job}} 50 @query={{datum.legendLink.queryParams}} 51 > 52 <JobPage::Parts::SummaryLegendItem 53 @datum={{datum}} 54 @index={{index}} 55 /> 56 </LinkTo> 57 {{else}} 58 <JobPage::Parts::SummaryLegendItem 59 @datum={{datum}} 60 @index={{index}} 61 /> 62 {{/if}} 63 </li> 64 {{/each}} 65 </ol> 66 </AllocationStatusBar> 67 {{/if}}