From efe29ed5e7cefd0ef478ed20910bb18ceea74880 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 19 Nov 2020 15:59:27 +0000 Subject: [PATCH] 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 --- .../app/templates/dc/services/instance/healthchecks.hbs | 6 ++++-- .../tests/acceptance/dc/services/instances/show.feature | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs index a76da72437..edf2ac0c38 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs @@ -1,9 +1,10 @@
- {{#if (gt item.Checks.length 0) }} + {{#let (append item.Checks (or proxy.Checks (array))) as |checks|}} + {{#if (gt checks.length 0) }}
@@ -16,5 +17,6 @@ {{/if}} + {{/let}}
diff --git a/ui/packages/consul-ui/tests/acceptance/dc/services/instances/show.feature b/ui/packages/consul-ui/tests/acceptance/dc/services/instances/show.feature index fbe18e36e8..bb45b5a0b3 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/services/instances/show.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/services/instances/show.feature @@ -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