mirror of https://github.com/rancher/ui.git
82 lines
2.8 KiB
Handlebars
82 lines
2.8 KiB
Handlebars
<div class="mb-20"><label class="acc-label">{{t 'formScheduling.toleration.title'}}</label></div>
|
|
{{#if tolerationArray.length}}
|
|
<table class="table fixed no-lines mb-20">
|
|
{{#if editing}}
|
|
<thead>
|
|
<tr>
|
|
<th class="acc-label" >{{t 'formScheduling.key'}}</th>
|
|
<th width="40"></th>
|
|
<th class="acc-label">{{t 'formScheduling.operator'}}</th>
|
|
<th width="40"></th>
|
|
<th class="acc-label">{{t 'formScheduling.value'}}</th>
|
|
<th width="40"></th>
|
|
<th class="acc-label">{{t 'formScheduling.effect'}}</th>
|
|
<th width="40"></th>
|
|
<th class="acc-label">{{t 'formScheduling.time'}}</th>
|
|
<th width="10"> </th>
|
|
<th width="40"></th>
|
|
</tr>
|
|
</thead>
|
|
{{/if}}
|
|
<tbody>
|
|
{{#each tolerationArray as |toleration|}}
|
|
<tr>
|
|
<td>{{input type="text" class="form-control input-sm" value=toleration.key}}</td>
|
|
<td> </td>
|
|
<td>
|
|
{{searchable-select
|
|
class="form-control input-sm"
|
|
content=operatorChoices
|
|
value=toleration.operator
|
|
style="display: inline-block; width: auto;"
|
|
}}
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
{{#if (eq toleration.operator 'Equals')}}
|
|
{{input type="text" class="form-control input-sm" value=toleration.value}}
|
|
{{else}}
|
|
{{t 'generic.na'}}
|
|
{{/if}}
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
{{searchable-select
|
|
class="form-control input-sm"
|
|
allowCustom=true
|
|
content=effectChoices
|
|
value=toleration.effect
|
|
style="display: inline-block; width: auto;"
|
|
}}
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
{{#input-or-display editable=editing value=toleration.tolerationSeconds}}
|
|
<div class="input-group">
|
|
{{input-integer classNames="form-control" value=toleration.tolerationSeconds}}
|
|
<span class="input-group-addon bg-default">{{t 'generic.seconds'}}</span>
|
|
</div>
|
|
{{/input-or-display}}
|
|
</td>
|
|
<td> </td>
|
|
{{#if editing}}
|
|
<div class="input-group-btn">
|
|
<button class="btn bg-primary btn-sm" {{action "removeToleration" toleration}}><i class="icon icon-minus"/></button>
|
|
</div>
|
|
{{/if}}
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
{{#unless editing}}
|
|
<div class="text-muted">{{t 'formScheduling.noToleration'}}</div>
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
{{#if editing}}
|
|
<button class="btn bg-link icon-btn" {{action "addToleration"}}>
|
|
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
|
<span>{{t 'formScheduling.toleration.add'}}</span>
|
|
</button>
|
|
{{/if}} |