ui: Add namespaces to gateway services (#7868)

* Add namespace info to gateway Linked Services and Upstreams tabs

* Upgrade consul-api-double to version 2.15.1
This commit is contained in:
Kenia 2020-05-13 13:11:20 -04:00 committed by kenia
parent 600dea8631
commit c07ef3f36a
3 changed files with 21 additions and 3 deletions

View file

@ -7,11 +7,19 @@
<a href="{{env 'CONSUL_DOCS_URL'}}/connect/terminating_gateway.html" target="_blank" rel="noopener noreferrer">step-by-step guide.</a> <a href="{{env 'CONSUL_DOCS_URL'}}/connect/terminating_gateway.html" target="_blank" rel="noopener noreferrer">step-by-step guide.</a>
</p> </p>
{{#let item.Service.Namespace as |nspace|}}
<ListCollection @cellHeight={{73}} @items={{gateway.Services}} class="consul-gateway-services-list" as |item index|> <ListCollection @cellHeight={{73}} @items={{gateway.Services}} class="consul-gateway-services-list" as |item index|>
<a data-test-service-name href={{href-to 'dc.services.show' item.Name}} class={{service/health-checks item}}> <a data-test-service-name href={{href-to 'dc.services.show' item.Name}} class={{service/health-checks item}}>
{{item.Name}} {{item.Name}}
</a> </a>
<ul> <ul>
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
{{#if (not-eq item.Namespace nspace)}}
<li class="nspace">
{{item.Namespace}}
</li>
{{/if}}
{{/if}}
{{#if (not-eq item.InstanceCount 0)}} {{#if (not-eq item.InstanceCount 0)}}
<li> <li>
{{format-number item.InstanceCount}} {{pluralize item.InstanceCount 'Instance' without-count=true}} {{format-number item.InstanceCount}} {{pluralize item.InstanceCount 'Instance' without-count=true}}
@ -24,6 +32,7 @@
</TagList> </TagList>
</ul> </ul>
</ListCollection> </ListCollection>
{{/let}}
</section> </section>
{{else}} {{else}}
<p> <p>

View file

@ -6,11 +6,19 @@
Upstreams are services that may receive traffic from this gateway. Learn more about configuring gateways in our Upstreams are services that may receive traffic from this gateway. Learn more about configuring gateways in our
<a href="{{env 'CONSUL_DOCS_URL'}}/connect/ingress_gateway.html" target="_blank" rel="noopener noreferrer">documentation.</a> <a href="{{env 'CONSUL_DOCS_URL'}}/connect/ingress_gateway.html" target="_blank" rel="noopener noreferrer">documentation.</a>
</p> </p>
{{#let item.Service.Namespace as |nspace|}}
<ListCollection @cellHeight={{73}} @items={{gateway.Services}} class="consul-gateway-services-list" as |item index|> <ListCollection @cellHeight={{73}} @items={{gateway.Services}} class="consul-gateway-services-list" as |item index|>
<a data-test-service-name href={{href-to 'dc.services.show' item.Name}}> <a data-test-service-name href={{href-to 'dc.services.show' item.Name}}>
{{item.Name}} {{item.Name}}
</a> </a>
<ul> <ul>
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
{{#if (not-eq item.Namespace nspace)}}
<li class="nspace">
{{item.Namespace}}
</li>
{{/if}}
{{/if}}
{{#if (not-eq item.GatewayConfig.ListenerPort 0)}} {{#if (not-eq item.GatewayConfig.ListenerPort 0)}}
<li class="port"> <li class="port">
<CopyButton <CopyButton
@ -22,6 +30,7 @@
{{/if}} {{/if}}
</ul> </ul>
</ListCollection> </ListCollection>
{{/let}}
</section> </section>
{{else}} {{else}}
<p> <p>

View file

@ -1211,9 +1211,9 @@
js-yaml "^3.13.1" js-yaml "^3.13.1"
"@hashicorp/consul-api-double@^2.6.2": "@hashicorp/consul-api-double@^2.6.2":
version "2.15.0" version "2.15.1"
resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.15.0.tgz#033b3887449f92f26156b123f251f9e6e1b42e52" resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.15.1.tgz#1b41c92ee7930e0bcead8283eea019b5f1238819"
integrity sha512-uPzwU/MPzPDhhsLjY3X1rKIjZDOSbqYHMGM0f6n15cDF2lEcbeBHwE0snuCvqTDn72qBVdYZvA13AQBm8XCy2A== integrity sha512-0q0h2krXFR5uj/A+x5WtsKVF1ltPPDrrxmX9g+SjUmeWHIcffH7qz/PCo4fdqWOPjcTXkPfBxSZwGd2uDishaQ==
"@hashicorp/ember-cli-api-double@^3.0.2": "@hashicorp/ember-cli-api-double@^3.0.2":
version "3.0.2" version "3.0.2"