mirror of https://github.com/rancher/ui.git
97 lines
3.1 KiB
Handlebars
97 lines
3.1 KiB
Handlebars
<tr class="main-row">
|
|
{{#if bulkActions}}
|
|
<td valign="middle" class="row-check" style="padding-top: 2px;">
|
|
{{check-box nodeId=model.id}}
|
|
</td>
|
|
{{/if}}
|
|
<td data-title="{{dt.state}}" class="clip">
|
|
{{badge-state model=model}}
|
|
</td>
|
|
<td data-title="{{dt.name}}" class="clip">
|
|
{{#tooltip-element
|
|
type="tooltip-basic"
|
|
model=model.name
|
|
tooltipTemplate="tooltip-static"
|
|
aria-describedby="tooltip-base"
|
|
tooltipFor="tooltipLink"
|
|
placement="top"
|
|
clip=true
|
|
inlineBlock=true
|
|
}}
|
|
{{model.name}}
|
|
{{/tooltip-element}}
|
|
</td>
|
|
<td data-title="{{dt.target}}" class="clip">
|
|
<div> {{model.displayTargetType}} </div>
|
|
{{#if (eq model.targetType "workloadSelector")}}
|
|
{{#if (eq selectorList.length 1)}}
|
|
<span
|
|
class="badge badge-xs bg-info"
|
|
style="color:#ecf0f1!important;border-radius:2px;"
|
|
>
|
|
{{get selectorList "firstObject"}}
|
|
</span>
|
|
{{else if (gt selectorList.length 1)}}
|
|
{{#tooltip-element
|
|
type="tooltip-basic"
|
|
model=selectorListTip
|
|
tooltipTemplate="tooltip-static"
|
|
aria-describedby="tooltip-base"
|
|
tooltipFor="tooltipLink"
|
|
}}
|
|
<div class="text-link"> {{selectorList.length}} {{t "alertPage.items"}} </div>
|
|
{{/tooltip-element}}
|
|
{{else}}
|
|
{{t "alertPage.na"}}
|
|
{{/if}}
|
|
{{else if (eq model.targetType "pod")}}
|
|
<div class="text-muted text-small"> {{model.podName}} </div>
|
|
{{else if (eq model.targetType "workload")}}
|
|
<div class="text-muted text-small"> {{model.workloadName}} </div>
|
|
{{/if}}
|
|
</td>
|
|
<td data-title="{{dt.condition}}" class="clip">
|
|
{{#if isRestartCondition}}
|
|
{{#tooltip-element
|
|
type="tooltip-basic"
|
|
model=displayCondition
|
|
tooltipTemplate="tooltip-static"
|
|
aria-describedby="tooltip-base"
|
|
}}
|
|
{{model.displayCondition}}
|
|
{{/tooltip-element}}
|
|
{{else if (eq model.targetType "metric")}}
|
|
{{#tooltip-element type="tooltip-basic" model=model.metricRule.expression tooltipTemplate="tooltip-static" aria-describedby="tooltip-base" tooltipFor="tooltipLink" placement="top"}}
|
|
{{model.displayCondition}}
|
|
{{/tooltip-element}}
|
|
{{else}}
|
|
{{model.displayCondition}}
|
|
{{/if}}
|
|
</td>
|
|
|
|
<td data-title="{{dt.recipients}}" class="clip">
|
|
{{#if alertGroup.recipients.length}}
|
|
{{#if (eq alertGroup.recipients.length 1)}}
|
|
<div class="clip">
|
|
{{alertGroup.displayRecipient}}
|
|
</div>
|
|
{{else if (gt alertGroup.recipients.length 1)}}
|
|
{{#tooltip-element
|
|
type="tooltip-basic"
|
|
model=recipientsTip
|
|
tooltipTemplate="tooltip-static"
|
|
aria-describedby="tooltip-base"
|
|
tooltipFor="tooltipLink"
|
|
}}
|
|
<div class="text-link">{{alertGroup.displayRecipient}}</div>
|
|
{{/tooltip-element}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{t "alertPage.na"}}
|
|
{{/if}}
|
|
</td>
|
|
|
|
<td data-title="{{t "generic.actions"}}" class="actions">
|
|
{{action-menu model=model}}
|
|
</td>
|
|
</tr> |