github.com/hernad/nomad@v1.6.112/ui/app/components/job-status/allocation-status-row.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <div class="allocation-status-row"> 7 {{#if this.showSummaries}} 8 <div class="alloc-status-summaries" 9 {{did-insert this.captureElement}} 10 {{window-resize this.reflow}} 11 > 12 {{#each-in @allocBlocks as |status allocsByStatus|}} 13 {{#each-in allocsByStatus as |health allocsByHealth|}} 14 {{#each-in allocsByHealth as |canary allocsByCanary|}} 15 {{#if (gt allocsByCanary.length 0)}} 16 <JobStatus::AllocationStatusBlock 17 @status={{status}} 18 @health={{health}} 19 @canary={{canary}} 20 @steady={{@steady}} 21 @count={{allocsByCanary.length}} 22 @width={{compute (action this.calcPerc) allocsByCanary.length}} 23 @allocs={{allocsByCanary}} /> 24 {{/if}} 25 {{/each-in}} 26 {{/each-in}} 27 {{/each-in}} 28 </div> 29 {{else}} 30 <div class="ungrouped-allocs" 31 {{did-insert this.captureElement}} 32 {{window-resize this.reflow}} 33 > 34 {{#each-in @allocBlocks as |status allocsByStatus|}} 35 {{#each-in allocsByStatus as |health allocsByHealth|}} 36 {{#each-in allocsByHealth as |canary allocsByCanary|}} 37 {{#if (gt allocsByCanary.length 0)}} 38 {{#each (range 0 allocsByCanary.length) as |i|}} 39 <JobStatus::IndividualAllocation 40 @allocation={{get allocsByCanary i}} 41 @status={{status}} 42 @health={{health}} 43 @canary={{canary}} 44 @steady={{@steady}} 45 /> 46 {{/each}} 47 {{/if}} 48 {{/each-in}} 49 {{/each-in}} 50 {{/each-in}} 51 </div> 52 {{/if}} 53 </div> 54