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
This commit is contained in:
John Cowen 2020-11-19 15:59:27 +00:00 committed by GitHub
parent c5af73c4f1
commit 4eb64e0dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1,9 +1,10 @@
<div class="tab-section">
<div role="tabpanel">
{{#if (gt item.Checks.length 0) }}
{{#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') (append item.Checks proxy.Checks)}}
@items={{sort-by (comparator 'check' 'Status:asc') checks}}
@exposed={{proxyMeta.ServiceProxy.Expose.Checks}}
/>
</section>
@ -16,5 +17,6 @@
</BlockSlot>
</EmptyState>
{{/if}}
{{/let}}
</div>
</div>

View File

@ -65,7 +65,7 @@ Feature: dc / services / instances / show: Show Service Instance
And I don't see upstreams on the tabs
And I see healthChecksIsSelected on the tabs
And I see 7 of the checks object
And I see 6 of the checks object
When I click tags&Meta on the tabs
And I see tags&MetaIsSelected on the tabs