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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

134 lines
3.5 KiB
Handlebars
Raw Normal View History

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