From 2f81c7b292cdb4008b3b57ecc3e9234b112b7337 Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Thu, 21 Jul 2022 17:09:54 +0200 Subject: [PATCH] ui: peered services only show instance- and tags-tabs (#13840) * Only show instances- and tags-tab peered services * Adapt show-with-slashes test to peering changes Tests always have the peering feature turned on and the default service we load from the mock-api will be peered. This is why the topology view of the service.show page will not be accessible in the updated test it will show the instances instead. This change does not change what the test is actually testing so just putting changing to the now different url is fine. --- .../consul-ui/app/templates/dc/services/show.hbs | 10 +++++----- .../acceptance/dc/services/show-with-slashes.feature | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/packages/consul-ui/app/templates/dc/services/show.hbs b/ui/packages/consul-ui/app/templates/dc/services/show.hbs index 8fa15b308e..e8c0044e65 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show.hbs @@ -117,12 +117,12 @@ as |items item dc|}} {{/if}} {{#let (hash - topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (eq item.Service.Kind 'ingress-gateway'))) - services=(eq item.Service.Kind 'terminating-gateway') - upstreams=(eq item.Service.Kind 'ingress-gateway') + topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (eq item.Service.Kind 'ingress-gateway')) (not item.Service.PeerName)) + services=(and (eq item.Service.Kind 'terminating-gateway') (not item.Service.PeerName)) + upstreams=(and (eq item.Service.Kind 'ingress-gateway') (not item.Service.PeerName)) instances=true - intentions=(and (not-eq item.Service.Kind 'terminating-gateway') (can 'read intention for service' item=item.Service)) - routing=(and dc.MeshEnabled item.IsOrigin) + intentions=(and (not-eq item.Service.Kind 'terminating-gateway') (can 'read intention for service' item=item.Service) (not item.Service.PeerName)) + routing=(and dc.MeshEnabled item.IsOrigin (not item.Service.PeerName)) tags=true ) as |tabs|}} diff --git a/ui/packages/consul-ui/tests/acceptance/dc/services/show-with-slashes.feature b/ui/packages/consul-ui/tests/acceptance/dc/services/show-with-slashes.feature index 88d8c111c5..73c220e5de 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/services/show-with-slashes.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/services/show-with-slashes.feature @@ -17,5 +17,5 @@ Feature: dc / services / show-with-slashes: Show Service that has slashes in its Then the url should be /dc1/services Then I see 1 service model And I click service on the services - Then the url should be /:billing/dc1/services/hashicorp%2Fservice%2Fservice-0/topology + Then the url should be /:billing/dc1/services/hashicorp%2Fservice%2Fservice-0/instances