open-nomad/ui/app/templates/components/task-group-row.hbs
Buck Doyle 244157786a
Add explicit this to templates (#8388)
This is the result of running the no-implicit-this-codemod, some manual fixes,
and the addition of a linting rule to prevent future ambiguity.
2020-07-09 15:19:07 -05:00

43 lines
1.7 KiB
Handlebars

<td data-test-task-group-name>
<LinkTo @route="jobs.job.task-group" @models={{array this.taskGroup.job this.taskGroup}} class="is-primary">
{{this.taskGroup.name}}
</LinkTo>
</td>
<td data-test-task-group-count class="nowrap">
{{this.count}}
{{#if this.taskGroup.scaling}}
<div
data-test-scale-controls
class="button-bar is-shadowless is-text bumper-left {{if (or this.runningDeployment (cannot "scale job")) "tooltip multiline"}}"
aria-label={{this.tooltipText}}>
<button
data-test-scale="decrement"
role="button"
aria-label="decrement"
class="button is-xsmall is-light"
disabled={{or this.isMinimum this.runningDeployment (cannot "scale job")}}
onclick={{action "countDown"}}
type="button">
{{x-icon "minus-plain" class="is-text"}}
</button>
<button
data-test-scale="increment"
role="button"
aria-label="increment"
class="button is-xsmall is-light"
disabled={{or this.isMaximum this.runningDeployment (cannot "scale job")}}
onclick={{action "countUp"}}
type="button">
{{x-icon "plus-plain" class="is-text"}}
</button>
</div>
{{/if}}
</td>
<td data-test-task-group-allocs>
<div class="inline-chart"><AllocationStatusBar @allocationContainer={{this.taskGroup.summary}} @isNarrow={{true}} /></div>
</td>
<td data-test-task-group-volume>{{if this.taskGroup.volumes.length "Yes"}}</td>
<td data-test-task-group-cpu>{{this.taskGroup.reservedCPU}} MHz</td>
<td data-test-task-group-mem>{{this.taskGroup.reservedMemory}} MiB</td>
<td data-test-task-group-disk>{{this.taskGroup.reservedEphemeralDisk}} MiB</td>