github.com/anuvu/nomad@v0.8.7-atom1/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" 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" aria-label="Allocation was rescheduled">
     9        {{x-icon "history" class="is-faded"}}
    10      </span>
    11    {{/if}}
    12  </td>
    13  <td data-test-short-id>
    14    {{#link-to "allocations.allocation" allocation class="is-primary"}}
    15      {{allocation.shortId}}
    16    {{/link-to}}
    17  </td>
    18  <td data-test-modify-time>{{moment-format allocation.modifyTime "MM/DD HH:mm:ss"}}</td>
    19  <td data-test-name>{{allocation.name}}</td>
    20  <td data-test-client-status class="is-one-line">
    21    <span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
    22  </td>
    23  {{#if (eq context "job")}}
    24    <td data-test-job-version>{{allocation.jobVersion}}</td>
    25    <td data-test-client>{{#link-to "clients.client" allocation.node}}{{allocation.node.shortId}}{{/link-to}}</td>
    26  {{else if (eq context "node")}}
    27    <td>
    28      {{#if (or allocation.job.isPending allocation.job.isReloading)}}
    29        ...
    30      {{else}}
    31        {{#link-to "jobs.job" allocation.job (query-params jobNamespace=allocation.job.namespace.id) data-test-job}}{{allocation.job.name}}{{/link-to}}
    32        <span class="is-faded" data-test-task-group>/ {{allocation.taskGroup.name}}</span>
    33      {{/if}}
    34    </td>
    35    <td data-test-job-version>{{allocation.jobVersion}}</td>
    36  {{/if}}
    37  <td data-test-cpu class="has-text-centered">
    38    {{#if (and (not stats) fetchStats.isRunning)}}
    39      ...
    40    {{else if (not allocation)}}
    41      {{! nothing when there's no allocation}}
    42    {{else if statsError}}
    43      <span class="tooltip text-center" aria-label="Couldn't collect stats">
    44        {{x-icon "warning" class="is-warning"}}
    45      </span>
    46    {{else}}
    47      <div class="inline-chart tooltip" aria-label="{{stats.cpuUsed}} / {{stats.reservedCPU}} MHz">
    48        <progress
    49          class="progress is-info is-small"
    50          value="{{stats.percentCPU}}"
    51          max="1">
    52          {{stats.percentCPU}}
    53        </progress>
    54      </div>
    55    {{/if}}
    56  </td>
    57  <td data-test-mem class="has-text-centered">
    58    {{#if (and (not stats) fetchStats.isRunning)}}
    59      ...
    60    {{else if (not allocation)}}
    61      {{! nothing when there's no allocation}}
    62    {{else if statsError}}
    63      <span class="tooltip text-center" aria-label="Couldn't collect stats">
    64        {{x-icon "warning" class="is-warning"}}
    65      </span>
    66    {{else}}
    67      <div class="inline-chart tooltip" aria-label="{{format-bytes stats.memoryUsed}} / {{stats.reservedMemory}} MiB">
    68        <progress
    69          class="progress is-danger is-small"
    70          value="{{stats.percentMemory}}"
    71          max="1">
    72          {{stats.percentMemory}}
    73        </progress>
    74      </div>
    75    {{/if}}
    76  </td>