John Cowen 8a5670d7d5 ui: Remove ghost healthcheck from the service instance healthcheck list (#9220)
* ui: Fixup service instance healthcheck list not to show ghost check

If the proxy is undefined, then an undefined vaule is appended to the
list of checks

* There are only 6 checks in the mocks so only expect 6
2020-11-19 16:02:18 +00:00

23 lines
592 B
Handlebars

<div class="tab-section">
<div role="tabpanel">
{{#let (append item.Checks (or proxy.Checks (array))) as |checks|}}
{{#if (gt checks.length 0) }}
<section data-test-checks>
<HealthcheckList
@items={{sort-by (comparator 'check' 'Status:asc') checks}}
@exposed={{proxyMeta.ServiceProxy.Expose.Checks}}
/>
</section>
{{else}}
<EmptyState>
<BlockSlot @name="body">
<p>
This instance has no health checks.
</p>
</BlockSlot>
</EmptyState>
{{/if}}
{{/let}}
</div>
</div>