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;
|
throw e;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
findGatewayBySlug: function(slug, dc, nspace, configuration) {
|
findGatewayBySlug: function(slug, dc, nspace, configuration = {}) {
|
||||||
const query = {
|
const query = {
|
||||||
dc: dc,
|
dc: dc,
|
||||||
ns: nspace,
|
ns: nspace,
|
||||||
|
|
|
@ -8,9 +8,17 @@
|
||||||
{{#let item.Service.Namespace as |nspace|}}
|
{{#let item.Service.Namespace as |nspace|}}
|
||||||
<ListCollection @items={{gatewayServices}} class="consul-upstream-list" as |item index|>
|
<ListCollection @items={{gatewayServices}} class="consul-upstream-list" as |item index|>
|
||||||
{{#if (service/exists item)}}
|
{{#if (service/exists item)}}
|
||||||
<a data-test-service-name href={{href-to 'dc.services.show' item.Name}}>
|
{{#let item.Namespace as |gatewayNspace|}}
|
||||||
{{item.Name}}
|
{{#if (and (env 'CONSUL_NSPACES_ENABLED') (not-eq gatewayNspace nspace))}}
|
||||||
</a>
|
<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}}
|
{{else}}
|
||||||
<p data-test-service-name>
|
<p data-test-service-name>
|
||||||
{{item.Name}}
|
{{item.Name}}
|
||||||
|
|
Loading…
Reference in New Issue