mirror of https://github.com/rancher/ui.git
62 lines
1.8 KiB
Handlebars
62 lines
1.8 KiB
Handlebars
<div class="mb-20">
|
|
<label>{{t 'formTargets.title'}}{{field-required}}</label>
|
|
</div>
|
|
<div>
|
|
<button class="btn bg-link icon-btn" {{action "addTargetService"}}>
|
|
<i class="icon icon-plus text-small"/>
|
|
<span>{{t 'formTargets.addAction'}}</span>
|
|
</button>
|
|
</div>
|
|
<div>
|
|
{{#if targetsArray.length}}
|
|
<table class="fixed mt-10">
|
|
{{#if (or isAdvanced isBalancer)}}
|
|
<thead>
|
|
<tr>
|
|
{{#if isAdvanced}}
|
|
<th>{{t 'formTargets.hostname.label'}}</th>
|
|
<th width="90">{{t 'formTargets.srcPort.label'}}</th>
|
|
<th>{{t 'formTargets.path.label'}}</th>
|
|
<th width="30"> </th>
|
|
{{/if}}
|
|
<th>{{t 'formTargets.value.label'}}{{field-required}}</th>
|
|
{{#if isAdvanced}}
|
|
<th width="90">{{t 'formTargets.dstPort.label'}}</th>
|
|
{{/if}}
|
|
<th width="30"> </th>
|
|
</tr>
|
|
</thead>
|
|
{{/if}}
|
|
<tbody>
|
|
{{#each targetsArray as |tgt|}}
|
|
{{form-target-row
|
|
remove="removeTarget"
|
|
tgt=tgt
|
|
exclude=exclude
|
|
isAdvanced=isAdvanced
|
|
isBalancer=isBalancer
|
|
rowClass="pl-0 pr-0 pb-10"
|
|
}}
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#if isAdvanced}}
|
|
<div class="row">
|
|
<div class="">
|
|
<p class="text-info">{{t 'formTargets.advanced.help1'}}</p>
|
|
<p class="text-info">{{t 'formTargets.advanced.help2'}}</p>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
{{#if (and isBalancer targetsArray.length)}}
|
|
<div class="row">
|
|
<div class="">
|
|
<button {{action "setAdvanced"}} class="btn bg-transparent btn-sm pl-0" type="button">{{t 'formTargets.advanced.toggle'}}</button><small>– {{t 'formTargets.advanced.detail'}}</small>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|