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

50 lines
1.2 KiB
Handlebars
Raw Normal View History

2017-09-19 14:47:10 +00:00
<td>
<a href="{{href-to "allocations.allocation" allocation}}" class="is-primary">
{{allocation.shortId}}
</a>
</td>
<td>{{allocation.name}}</td>
<td>
<span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
</td>
{{#if (eq context "job")}}
<td><a href="{{href-to "nodes.node" allocation.node}}">{{allocation.node.shortId}}</a></td>
{{else if (eq context "node")}}
<td>
<a href="{{href-to "jobs.job" allocation.job}}">{{allocation.job.name}}</a>
<span class="is-faded">/ {{allocation.taskGroup.name}}</span>
</td>
{{/if}}
<td>
{{#if allocation.stats.isPending}}
...
{{else if allocation.stats.isRejected}}
!!!
{{else}}
<div class="inline-chart">
<progress
class="progress is-info is-small"
value="{{allocation.percentCPU}}"
max="1">
{{allocation.percentCPU}}
</progress>
</div>
{{/if}}
</td>
<td>
{{#if allocation.stats.isPending}}
...
{{else if allocation.stats.isRejected}}
!!!
{{else}}
<div class="inline-chart">
<progress
class="progress is-danger is-small"
value="{{allocation.percentMemory}}"
max="1">
{{allocation.percentMemory}}
</progress>
</div>
{{/if}}
</td>