open-nomad/ui/app/templates/components/plugin-allocation-row.hbs
Jai e5b2171cd0
remove unnecessary query parameters in LinkTo components (#14117)
* chore: remove query param in topology

* chore: remove query param in plugin alloc

* chore: remove query param in parameterized child

* chore: remove query param in periodic child
2022-08-16 09:52:31 -04:00

84 lines
2.9 KiB
Handlebars

{{#if this.allocation}}
<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>
{{/if}}
{{#if this.allocation.nextAllocation}}
<span data-test-icon="reschedule" class="tooltip text-center" role="tooltip" aria-label="Allocation was rescheduled">
{{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">
{{x-icon "boot" class="is-faded"}}
</span>
{{/if}}
</td>
<td data-test-short-id>
<LinkTo @route="allocations.allocation" @model={{this.allocation}} class="is-primary">
{{this.allocation.shortId}}
</LinkTo>
</td>
<td data-test-create-time>
<span class="tooltip" aria-label="{{format-month-ts this.allocation.createTime}}">
{{format-month-ts this.allocation.createTime short=true}}
</span>
</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-health>
<span class="nowrap">
{{x-icon
(if this.pluginAllocation.healthy "check-circle-outline" "minus-circle-outline")
class=(if this.pluginAllocation.healthy "is-success" "is-danger")}}
{{if this.pluginAllocation.healthy "Healthy" "Unhealthy"}}
</span>
</td>
<td data-test-client>
<Tooltip @text={{this.allocation.node.name}}>
<LinkTo @route="clients.client" @model={{this.allocation.node}}>
{{this.allocation.node.shortId}}
</LinkTo>
</Tooltip>
</td>
<td>
{{#if (or this.allocation.job.isPending this.allocation.job.isReloading)}}
...
{{else}}
<LinkTo @route="jobs.job" @model={{this.allocation.job}} data-test-job>{{this.allocation.job.name}}</LinkTo>
<span class="is-faded" data-test-task-group>/ {{this.allocation.taskGroup.name}}</span>
{{/if}}
</td>
<td data-test-job-version class="is-1">{{this.allocation.jobVersion}}</td>
<td data-test-volume>{{if this.allocation.taskGroup.volumes.length "Yes"}}</td>
<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}} />
</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>
{{else}}
<td colspan="10">&hellip;</td>
{{/if}}