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.
This commit is contained in:
Michael Klein 2022-07-21 17:09:54 +02:00 committed by GitHub
parent b1a39fc12f
commit 2f81c7b292
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -117,12 +117,12 @@ as |items item dc|}}
{{/if}} {{/if}}
{{#let {{#let
(hash (hash
topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (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=(eq item.Service.Kind 'terminating-gateway') services=(and (eq item.Service.Kind 'terminating-gateway') (not item.Service.PeerName))
upstreams=(eq item.Service.Kind 'ingress-gateway') upstreams=(and (eq item.Service.Kind 'ingress-gateway') (not item.Service.PeerName))
instances=true instances=true
intentions=(and (not-eq item.Service.Kind 'terminating-gateway') (can 'read intention for service' item=item.Service)) 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) routing=(and dc.MeshEnabled item.IsOrigin (not item.Service.PeerName))
tags=true tags=true
) )
as |tabs|}} as |tabs|}}

View File

@ -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 the url should be /dc1/services
Then I see 1 service model Then I see 1 service model
And I click service on the services 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