github.com/hernad/nomad@v1.6.112/ui/app/components/job-status/allocation-status-block.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  <div
     7    class="allocation-status-block {{unless this.countToShow "rest-only"}}"
     8    style={{html-safe (concat "width: " @width "px")}}
     9  >
    10    {{#if this.countToShow}}
    11      <div class="ungrouped-allocs">
    12        {{#each (range 0 this.countToShow) as |i|}}
    13          <JobStatus::IndividualAllocation
    14            @allocation={{get @allocs i}}
    15            @status={{@status}}
    16            @health={{@health}}
    17            @canary={{@canary}}
    18            @steady={{@steady}}
    19          />
    20        {{/each}}
    21      </div>
    22    {{/if}}
    23    {{#if this.remaining}}
    24  
    25      <ConditionalLinkTo
    26        @condition={{not (eq @status "unplaced")}}
    27        @route="jobs.job.allocations"
    28        @model={{@allocs.0.job}}
    29        @query={{hash status=(concat '["' @status '"]') version=(concat '[' @allocs.0.jobVersion ']')}}
    30        @class="represented-allocation rest {{@status}} {{@health}} {{@canary}}"
    31        @label="View all {{@status}} allocations"
    32      >
    33        <span class="rest-count">{{#if this.countToShow}}+{{/if}}{{this.remaining}}</span>
    34        {{#unless @steady}}
    35          {{#if (eq @canary "canary")}}
    36            <span class="alloc-canary-indicator" />
    37          {{/if}}
    38          {{#if (eq @status "running")}}
    39            <span class="alloc-health-indicator">
    40              {{#if (eq @health "healthy")}}
    41                <FlightIcon @name="check" @color="#25ba81" />
    42              {{else if (eq @health "unhealthy")}}
    43                <FlightIcon @name="x" @color="#c84034" />
    44              {{else}}
    45                <FlightIcon @name="running" @color="black" />
    46              {{/if}}
    47            </span>
    48          {{/if}}
    49        {{/unless}}
    50      </ConditionalLinkTo>
    51    {{/if}}
    52  </div>