61 lines
2.2 KiB
Handlebars
61 lines
2.2 KiB
Handlebars
<td data-test-short-id>
|
|
{{#link-to "allocations.allocation" allocation class="is-primary"}}
|
|
{{allocation.shortId}}
|
|
{{/link-to}}
|
|
</td>
|
|
<td data-test-modify-time>{{moment-format allocation.modifyTime "MM/DD HH:mm:ss"}}</td>
|
|
<td data-test-name>{{allocation.name}}</td>
|
|
<td data-test-client-status>
|
|
<span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
|
|
</td>
|
|
{{#if (eq context "job")}}
|
|
<td data-test-job-version>{{allocation.jobVersion}}</td>
|
|
<td data-test-client>{{#link-to "clients.client" allocation.node}}{{allocation.node.shortId}}{{/link-to}}</td>
|
|
{{else if (eq context "node")}}
|
|
<td>
|
|
{{#if (or allocation.job.isPending allocation.job.isReloading)}}
|
|
...
|
|
{{else}}
|
|
{{#link-to "jobs.job" allocation.job (query-params jobNamespace=allocation.job.namespace.id) data-test-job}}{{allocation.job.name}}{{/link-to}}
|
|
<span class="is-faded" data-test-task-group>/ {{allocation.taskGroup.name}}</span>
|
|
{{/if}}
|
|
</td>
|
|
<td data-test-job-version>{{allocation.jobVersion}}</td>
|
|
{{/if}}
|
|
<td data-test-cpu class="has-text-centered">
|
|
{{#if allocation.stats.isPending}}
|
|
...
|
|
{{else if allocation.stats.isRejected}}
|
|
<span class="tooltip text-center" aria-label="Couldn't connect to client">
|
|
{{x-icon "warning" class="is-warning"}}
|
|
</span>
|
|
{{else}}
|
|
<div class="inline-chart tooltip" aria-label="{{allocation.cpuUsed}} / {{allocation.taskGroup.reservedCPU}} MHz">
|
|
<progress
|
|
class="progress is-info is-small"
|
|
value="{{allocation.percentCPU}}"
|
|
max="1">
|
|
{{allocation.percentCPU}}
|
|
</progress>
|
|
</div>
|
|
{{/if}}
|
|
</td>
|
|
<td data-test-mem class="has-text-centered">
|
|
{{#if allocation.stats.isPending}}
|
|
...
|
|
{{else if allocation.stats.isRejected}}
|
|
<span class="tooltip text-center" aria-label="Couldn't connect to client">
|
|
{{x-icon "warning" class="is-warning"}}
|
|
</span>
|
|
{{else}}
|
|
<div class="inline-chart tooltip" aria-label="{{format-bytes allocation.memoryUsed}} / {{allocation.taskGroup.reservedMemory}} MiB">
|
|
<progress
|
|
class="progress is-danger is-small"
|
|
value="{{allocation.percentMemory}}"
|
|
max="1">
|
|
{{allocation.percentMemory}}
|
|
</progress>
|
|
</div>
|
|
{{/if}}
|
|
</td>
|