github.com/thomasobenaus/nomad@v0.11.1/ui/app/templates/components/allocation-row.hbs (about)

     1  <td data-test-indicators class="is-narrow">
     2    {{#if allocation.unhealthyDrivers.length}}
     3      <span data-test-icon="unhealthy-driver" class="tooltip text-center" role="tooltip" aria-label="Allocation depends on unhealthy drivers">
     4        {{x-icon "warning" class="is-warning"}}
     5      </span>
     6    {{/if}}
     7    {{#if allocation.nextAllocation}}
     8      <span data-test-icon="reschedule" class="tooltip text-center" role="tooltip" aria-label="Allocation was rescheduled">
     9        {{x-icon "history" class="is-faded"}}
    10      </span>
    11    {{/if}}
    12    {{#if allocation.wasPreempted}}
    13      <span data-test-icon="preemption" class="tooltip text-center" role="tooltip" aria-label="Allocation was preempted">
    14        {{x-icon "boot" class="is-faded"}}
    15      </span>
    16    {{/if}}
    17  </td>
    18  <td data-test-short-id>
    19    {{#link-to "allocations.allocation" allocation class="is-primary"}}
    20      {{allocation.shortId}}
    21    {{/link-to}}
    22  </td>
    23  {{#if (eq context "job")}}
    24    <td data-test-task-group>
    25      {{#link-to "jobs.job.task-group" allocation.job allocation.taskGroupName (query-params jobNamespace=allocation.job.namespace.id)}}
    26        {{allocation.taskGroupName}}
    27      {{/link-to}}
    28    </td>
    29  {{/if}}
    30  <td data-test-create-time>{{format-month-ts allocation.createTime}}</td>
    31  <td data-test-modify-time>
    32    <span class="tooltip" aria-label="{{format-month-ts allocation.modifyTime}}">
    33      {{moment-from-now allocation.modifyTime}}
    34    </span>
    35  </td>
    36  <td data-test-client-status class="is-one-line">
    37    <span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
    38  </td>
    39  {{#if (eq context "volume")}}
    40    <td data-test-client>{{#link-to "clients.client" allocation.node}}{{allocation.node.shortId}}{{/link-to}}</td>
    41  {{/if}}
    42  {{#if (or (eq context "taskGroup") (eq context "job"))}}
    43    <td data-test-job-version>{{allocation.jobVersion}}</td>
    44    <td data-test-client>{{#link-to "clients.client" allocation.node}}{{allocation.node.shortId}}{{/link-to}}</td>
    45  {{else if (or (eq context "node") (eq context "volume"))}}
    46    <td>
    47      {{#if (or allocation.job.isPending allocation.job.isReloading)}}
    48        ...
    49      {{else}}
    50        {{#link-to "jobs.job" allocation.job (query-params jobNamespace=allocation.job.namespace.id) data-test-job}}{{allocation.job.name}}{{/link-to}}
    51        <span class="is-faded" data-test-task-group>/ {{allocation.taskGroup.name}}</span>
    52      {{/if}}
    53    </td>
    54    <td data-test-job-version class="is-1">{{allocation.jobVersion}}</td>
    55  {{/if}}
    56  {{#if (not (eq context "volume"))}}
    57    <td data-test-volume>{{if allocation.taskGroup.volumes.length "Yes"}}</td>
    58  {{/if}}
    59  <td data-test-cpu class="is-1 has-text-centered">
    60    {{#if allocation.isRunning}}
    61      {{#if (and (not cpu) fetchStats.isRunning)}}
    62        ...
    63      {{else if statsError}}
    64        <span class="tooltip text-center" role="tooltip" aria-label="Couldn't collect stats">
    65          {{x-icon "warning" class="is-warning"}}
    66        </span>
    67      {{else}}
    68        <div class="inline-chart is-small tooltip" role="tooltip" aria-label="{{cpu.used}} / {{stats.reservedCPU}} MHz">
    69          <progress
    70            class="progress is-info is-small"
    71            value="{{cpu.percent}}"
    72            max="1">
    73            {{cpu.percent}}
    74          </progress>
    75        </div>
    76      {{/if}}
    77    {{/if}}
    78  </td>
    79  <td data-test-mem class="is-1 has-text-centered">
    80    {{#if allocation.isRunning}}
    81      {{#if (and (not memory) fetchStats.isRunning)}}
    82        ...
    83      {{else if statsError}}
    84        <span class="tooltip is-small text-center" role="tooltip" aria-label="Couldn't collect stats">
    85          {{x-icon "warning" class="is-warning"}}
    86        </span>
    87      {{else}}
    88        <div class="inline-chart tooltip" role="tooltip" aria-label="{{format-bytes memory.used}} / {{stats.reservedMemory}} MiB">
    89          <progress
    90            class="progress is-danger is-small"
    91            value="{{memory.percent}}"
    92            max="1">
    93            {{memory.percent}}
    94          </progress>
    95        </div>
    96      {{/if}}
    97    {{/if}}
    98  </td>