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