ui: Include nspace in up/downstream link when nspaces are enabled (#9257)

This commit is contained in:
John Cowen 2020-11-24 14:33:34 +00:00 committed by GitHub
parent 0ba7f4ce39
commit 9c3c7bcf3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
<a class="card"
href={{href-to "dc.services.show.index" @item.Name}}
href={{if
(and (env 'CONSUL_NSPACES_ENABLED') (not-eq @item.Namespace @service.Namespace))
(href-to "nspace.dc.services.show.index" (concat '~' @item.Namespace) @item.Datacenter @item.Name)
(href-to "dc.services.show.index" @item.Name)
}}
data-permission={{service/intention-permissions @item}}
id="{{@item.Namespace}}{{@item.Name}}"
>