open-nomad/ui/app/templates/components/allocation-row.hbs

75 lines
3 KiB
Handlebars
Raw Normal View History

2018-05-02 21:01:34 +00:00
<td data-test-indicators class="is-narrow">
2018-05-11 18:35:48 +00:00
{{#if allocation.unhealthyDrivers.length}}
<span data-test-icon="unhealthy-driver" class="tooltip text-center" role="tooltip" aria-label="Allocation depends on unhealthy drivers">
2018-05-11 18:35:48 +00:00
{{x-icon "warning" class="is-warning"}}
</span>
{{/if}}
2018-05-02 21:01:34 +00:00
{{#if allocation.nextAllocation}}
<span data-test-icon="reschedule" class="tooltip text-center" role="tooltip" aria-label="Allocation was rescheduled">
2018-05-02 21:01:34 +00:00
{{x-icon "history" class="is-faded"}}
</span>
{{/if}}
2019-04-17 17:47:32 +00:00
{{#if allocation.wasPreempted}}
<span data-test-icon="preemption" class="tooltip text-center" role="tooltip" aria-label="Allocation was preempted">
{{x-icon "boot" class="is-faded"}}
</span>
{{/if}}
2018-05-02 21:01:34 +00:00
</td>
<td data-test-short-id>
<LinkTo @route="allocations.allocation" @model={{allocation}} class="is-primary">
2017-09-19 14:47:10 +00:00
{{allocation.shortId}}
</LinkTo>
2017-09-19 14:47:10 +00:00
</td>
{{#if (eq context "job")}}
<td data-test-task-group>
<LinkTo @route="jobs.job.task-group" @models={{array allocation.job allocation.taskGroupName}} @query={{hash jobNamespace=allocation.job.namespace.id}}>
{{allocation.taskGroupName}}
</LinkTo>
</td>
{{/if}}
<td data-test-create-time>{{format-month-ts allocation.createTime}}</td>
<td data-test-modify-time>
<span class="tooltip" aria-label="{{format-month-ts allocation.modifyTime}}">
{{moment-from-now allocation.modifyTime}}
</span>
</td>
<td data-test-client-status class="is-one-line">
2017-09-19 14:47:10 +00:00
<span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
</td>
{{#if (eq context "volume")}}
<td data-test-client><LinkTo @route="clients.client" @model={{allocation.node}}>{{allocation.node.shortId}}</LinkTo></td>
{{/if}}
{{#if (or (eq context "taskGroup") (eq context "job"))}}
<td data-test-job-version>{{allocation.jobVersion}}</td>
<td data-test-client><LinkTo @route="clients.client" @model={{allocation.node}}>{{allocation.node.shortId}}</LinkTo></td>
{{else if (or (eq context "node") (eq context "volume"))}}
2017-09-19 14:47:10 +00:00
<td>
{{#if (or allocation.job.isPending allocation.job.isReloading)}}
...
{{else}}
<LinkTo @route="jobs.job" @model={{allocation.job}} @query={{hash jobNamespace=allocation.job.namespace.id}} data-test-job>{{allocation.job.name}}</LinkTo>
<span class="is-faded" data-test-task-group>/ {{allocation.taskGroup.name}}</span>
{{/if}}
2017-09-19 14:47:10 +00:00
</td>
<td data-test-job-version class="is-1">{{allocation.jobVersion}}</td>
2017-09-19 14:47:10 +00:00
{{/if}}
{{#if (not (eq context "volume"))}}
<td data-test-volume>{{if allocation.taskGroup.volumes.length "Yes"}}</td>
{{/if}}
<td data-test-cpu class="is-1 has-text-centered">
<AllocationStat
@metric="cpu"
@allocation={{allocation}}
@statsTracker={{stats}}
@isLoading={{fetchStats.isRunning}}
@error={{statsError}} />
2017-09-19 14:47:10 +00:00
</td>
<td data-test-mem class="is-1 has-text-centered">
<AllocationStat
@metric="memory"
@allocation={{allocation}}
@statsTracker={{stats}}
@isLoading={{fetchStats.isRunning}}
@error={{statsError}} />
2017-09-19 14:47:10 +00:00
</td>