consul/ui-v2/app/templates/components/healthchecked-resource.hbs

39 lines
1.4 KiB
Handlebars

{{#stats-card}}
{{#block-slot 'icon'}}{{yield}}{{/block-slot}}
{{#block-slot 'mini-stat'}}
{{#if (eq checks.length 0)}}
<span class="zero" data-tooltip="This node has no registered healthchecks">{{checks.length}}</span>
{{else if (eq checks.length healthy.length)}}
<span class="non-zero" data-tooltip={{concat 'All ' healthy.length ' ' (pluralize healthy.length 'check' without-count=true) ' passing'}}>{{healthy.length}}</span>
{{/if}}
{{/block-slot}}
{{#block-slot 'header'}}
<a href={{href}}>
<strong>{{name}}</strong>
<span>{{address}}</span>
</a>
{{/block-slot}}
{{#block-slot 'body'}}
{{#if (not-eq checks.length healthy.length)}}
<ul>
{{#each unhealthy as |item|}}
<li>
<a href={{href}} class={{item.Status}}>
<strong data-tooltip={{capitalize item.Status}}>{{capitalize item.Status}}</strong>
<span>{{item.Name}}</span>
</a>
</li>
{{/each}}
{{#if (gt healthy.length 0)}}
<li>
<a href={{href}} class="passing">
<strong data-tooltip={{concat healthy.length ' other passing ' (pluralize healthy.length 'check' without-count=true)}}></strong>
<span>{{healthy.length}} other passing {{pluralize healthy.length 'check' without-count=true}}</span>
</a>
</li>
{{/if}}
</ul>
{{/if}}
{{/block-slot}}
{{/stats-card}}