github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/templates/components/task-row.hbs (about)

     1  <td class="is-narrow">
     2    {{#unless this.task.driverStatus.healthy}}
     3      <span data-test-icon="unhealthy-driver" class="tooltip text-center" aria-label="{{this.task.driver}} is unhealthy">
     4        {{x-icon "alert-triangle" class="is-warning"}}
     5      </span>
     6    {{/unless}}
     7  </td>
     8  <td data-test-name class="nowrap">
     9    <LinkTo @route="allocations.allocation.task" @models={{array this.task.allocation this.task}} class="is-primary">
    10      {{this.task.name}}
    11      {{#if this.task.isConnectProxy}}
    12        <ProxyTag @class="bumper-left" />
    13      {{/if}}
    14    </LinkTo>
    15  </td>
    16  <td data-test-state>{{this.task.state}}</td>
    17  <td data-test-message>
    18    {{#if this.task.events.lastObject.message}}
    19      {{this.task.events.lastObject.message}}
    20    {{else}}
    21      <em>No message</em>
    22    {{/if}}
    23  </td>
    24  <td data-test-time>{{format-ts this.task.events.lastObject.time}}</td>
    25  <td data-test-volumes>
    26    <ul>
    27      {{#each this.task.task.volumeMounts as |volume|}}
    28        <li data-test-volume>
    29          <strong>{{volume.volume}}:</strong>
    30          {{#if volume.isCSI}}
    31            <LinkTo @route="csi.volumes.volume" @model={{volume.source}} @query={{hash volumeNamespace=volume.namespace.id}}>
    32              {{volume.source}}
    33            </LinkTo>
    34          {{else}}
    35            {{volume.source}}
    36          {{/if}}
    37        </li>
    38      {{/each}}
    39    </ul>
    40  </td>
    41  <td data-test-cpu class="is-1 has-text-centered">
    42    {{#if this.task.isRunning}}
    43      {{#if (and (not this.cpu) this.fetchStats.isRunning)}}
    44        ...
    45      {{else if this.statsError}}
    46        <span class="tooltip text-center" role="tooltip" aria-label="Couldn't collect stats">
    47          {{x-icon "alert-triangle" class="is-warning"}}
    48        </span>
    49      {{else}}
    50        <div class="inline-chart is-small tooltip" role="tooltip" aria-label="{{this.cpu.used}} / {{this.taskStats.reservedCPU}} MHz">
    51          <progress
    52            class="progress is-info is-small"
    53            value="{{this.cpu.percent}}"
    54            max="1">
    55            {{this.cpu.percent}}
    56          </progress>
    57        </div>
    58      {{/if}}
    59    {{/if}}
    60  </td>
    61  <td data-test-mem class="is-1 has-text-centered">
    62    {{#if this.task.isRunning}}
    63      {{#if (and (not this.memory) this.fetchStats.isRunning)}}
    64        ...
    65      {{else if this.statsError}}
    66        <span class="tooltip is-small text-center" role="tooltip" aria-label="Couldn't collect stats">
    67          {{x-icon "alert-triangle" class="is-warning"}}
    68        </span>
    69      {{else}}
    70        <div class="inline-chart tooltip" role="tooltip" aria-label="{{format-bytes this.memory.used}} / {{this.taskStats.reservedMemory}} MiB">
    71          <progress
    72            class="progress is-danger is-small"
    73            value="{{this.memory.percent}}"
    74            max="1">
    75            {{this.memory.percent}}
    76          </progress>
    77        </div>
    78      {{/if}}
    79    {{/if}}
    80  </td>