github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/templates/components/allocation-row.hbs (about)

     1  <td data-test-indicators class="is-narrow">
     2    {{#if this.allocation.unhealthyDrivers.length}}
     3      <span
     4        data-test-icon="unhealthy-driver"
     5        class="tooltip text-center"
     6        role="tooltip"
     7        aria-label="Allocation depends on unhealthy drivers"
     8      >
     9        {{x-icon "alert-triangle" class="is-warning"}}
    10      </span>
    11    {{/if}}
    12    {{#if this.allocation.nextAllocation}}
    13      <span
    14        data-test-icon="reschedule"
    15        class="tooltip text-center"
    16        role="tooltip"
    17        aria-label="Allocation was rescheduled"
    18      >
    19        {{x-icon "history" class="is-faded"}}
    20      </span>
    21    {{/if}}
    22    {{#if this.allocation.wasPreempted}}
    23      <span
    24        data-test-icon="preemption"
    25        class="tooltip text-center"
    26        role="tooltip"
    27        aria-label="Allocation was preempted"
    28      >
    29        {{x-icon "boot" class="is-faded"}}
    30      </span>
    31    {{/if}}
    32  </td>
    33  <td data-test-short-id>
    34    <LinkTo
    35      @route="allocations.allocation"
    36      @model={{this.allocation.id}}
    37      class="is-primary"
    38    >
    39      {{this.allocation.shortId}}
    40    </LinkTo>
    41  </td>
    42  {{#if (eq this.context "job")}}
    43    <td data-test-task-group>
    44      <LinkTo
    45        @route="jobs.job.task-group"
    46        @models={{array
    47          (format-job-id this.allocation.job.id)
    48          this.allocation.taskGroupName
    49        }}
    50      >
    51        {{this.allocation.taskGroupName}}
    52      </LinkTo>
    53    </td>
    54  {{/if}}
    55  <td data-test-create-time>
    56    {{format-month-ts this.allocation.createTime}}
    57  </td>
    58  <td data-test-modify-time>
    59    <span
    60      class="tooltip"
    61      aria-label="{{format-month-ts this.allocation.modifyTime}}"
    62    >
    63      {{moment-from-now this.allocation.modifyTime}}
    64    </span>
    65  </td>
    66  <td data-test-client-status class="is-one-line">
    67    <span class="color-swatch {{this.allocation.clientStatus}}"></span>
    68    {{this.allocation.clientStatus}}
    69  </td>
    70  {{#if (eq this.context "volume")}}
    71    <td data-test-client>
    72      <Tooltip @text={{this.allocation.node.name}}>
    73        <LinkTo @route="clients.client" @model={{this.allocation.node}}>
    74          {{this.allocation.node.shortId}}
    75        </LinkTo>
    76      </Tooltip>
    77    </td>
    78  {{/if}}
    79  {{#if (or (eq this.context "taskGroup") (eq this.context "job"))}}
    80    <td data-test-job-version>
    81      {{this.allocation.jobVersion}}
    82    </td>
    83    <td data-test-client>
    84      <Tooltip @text={{this.allocation.node.name}}>
    85        <LinkTo @route="clients.client" @model={{this.allocation.node}}>
    86          {{this.allocation.node.shortId}}
    87        </LinkTo>
    88      </Tooltip>
    89    </td>
    90  {{else if (or (eq this.context "node") (eq this.context "volume"))}}
    91    <td>
    92      {{#if (or this.allocation.job.isPending this.allocation.job.isReloading)}}
    93        ...
    94      {{else}}
    95        <LinkTo
    96          @route="jobs.job"
    97          @model={{format-job-id this.allocation.job.id}}
    98          data-test-job
    99        >
   100          {{this.allocation.job.name}}
   101        </LinkTo>
   102        <span class="is-faded" data-test-task-group>
   103          /
   104          {{this.allocation.taskGroup.name}}
   105        </span>
   106      {{/if}}
   107    </td>
   108    <td data-test-job-version class="is-1">
   109      {{this.allocation.jobVersion}}
   110    </td>
   111  {{/if}}
   112  {{#if (not (eq this.context "volume"))}}
   113    <td data-test-volume>
   114      {{if this.allocation.taskGroup.volumes.length "Yes"}}
   115    </td>
   116  {{/if}}
   117  <td data-test-cpu class="is-1 has-text-centered">
   118    <AllocationStat
   119      @metric="cpu"
   120      @allocation={{this.allocation}}
   121      @statsTracker={{this.stats}}
   122      @isLoading={{this.fetchStats.isRunning}}
   123      @error={{this.statsError}}
   124    />
   125  </td>
   126  <td data-test-mem class="is-1 has-text-centered">
   127    <AllocationStat
   128      @metric="memory"
   129      @allocation={{this.allocation}}
   130      @statsTracker={{this.stats}}
   131      @isLoading={{this.fetchStats.isRunning}}
   132      @error={{this.statsError}}
   133    />
   134  </td>