mirror of https://github.com/status-im/consul.git
ui: Customize link for an Upstream in a different namespace as the ingress gateway (#8006)
* Add configuration default value for findGatewayBySlug * Customize link for an Upstream in a different nspace as the ingress gateway
This commit is contained in:
parent
b0f38fe899
commit
d295d976ce
|
@ -76,7 +76,7 @@ export default RepositoryService.extend({
|
|||
throw e;
|
||||
});
|
||||
},
|
||||
findGatewayBySlug: function(slug, dc, nspace, configuration) {
|
||||
findGatewayBySlug: function(slug, dc, nspace, configuration = {}) {
|
||||
const query = {
|
||||
dc: dc,
|
||||
ns: nspace,
|
||||
|
|
|
@ -8,9 +8,17 @@
|
|||
{{#let item.Service.Namespace as |nspace|}}
|
||||
<ListCollection @items={{gatewayServices}} class="consul-upstream-list" as |item index|>
|
||||
{{#if (service/exists item)}}
|
||||
<a data-test-service-name href={{href-to 'dc.services.show' item.Name}}>
|
||||
{{item.Name}}
|
||||
</a>
|
||||
{{#let item.Namespace as |gatewayNspace|}}
|
||||
{{#if (and (env 'CONSUL_NSPACES_ENABLED') (not-eq gatewayNspace nspace))}}
|
||||
<a data-test-service-name href={{href-to 'nspace.dc.services.show' (concat '~' gatewayNspace) dc item.Name}}>
|
||||
{{item.Name}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a data-test-service-name href={{href-to 'dc.services.show' item.Name}}>
|
||||
{{item.Name}}
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/let}}
|
||||
{{else}}
|
||||
<p data-test-service-name>
|
||||
{{item.Name}}
|
||||
|
|
Loading…
Reference in New Issue