open-nomad/ui/app/components/das/task-row.hbs
Phil Renaud 99185e2d8f
[ui, compliance] Remove the newline after .hbs copyright headers (#16861)
* Remove the newline after .hbs copyright headers

* Trying with the whitespace control char
2023-04-14 13:08:13 -04:00

39 lines
1.1 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
~}}
<tr
class={{if @active 'active'}}
{{on 'click' @onClick}}
{{did-insert this.calculateHeight}}
data-test-task-toggles
>
<td class="task-cell" data-test-name colspan="2">{{@task.name}}</td>
<td class="toggle-cell">
<Toggle
data-test-cpu-toggle
@isActive={{@cpu.isActive}}
@onToggle={{action @toggleRecommendation @cpu.recommendation}}
@isDisabled={{not @cpu.recommendation}}
title={{concat 'CPU for ' @task.name}}
/>
</td>
<td class="toggle-cell">
<Toggle
data-test-memory-toggle
@isActive={{@memory.isActive}}
@onToggle={{action @toggleRecommendation @memory.recommendation}}
@isDisabled={{not @memory.recommendation}}
title={{concat 'Memory for ' @task.name}}
/>
{{#if (and @active this.height)}}
<svg width={{this.height}} height={{this.height}}>
<rect class="border-cover" x="0" y="1" height={{this.borderCoverHeight}} />
<polyline class="triangle" points="1 1 {{this.half}} {{this.half}} 1 {{this.height}}" />
</svg>
{{/if}}
</td>
</tr>