mirror of https://github.com/hashicorp/consul
82 lines
2.7 KiB
Handlebars
82 lines
2.7 KiB
Handlebars
<div id="upstreams" class="tab-section">
|
|
<div role="tabpanel">
|
|
{{#if (gt gatewayServices.length 0)}}
|
|
<section>
|
|
<p>
|
|
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>.
|
|
</p>
|
|
{{#let item.Service.Namespace as |nspace|}}
|
|
<ListCollection @items={{gatewayServices}} class="consul-upstream-list" as |item index|>
|
|
{{#if (service/exists item)}}
|
|
{{#let item.Namespace as |gatewayNspace|}}
|
|
<li>
|
|
<span class={{service/health-checks item}}>
|
|
<Tooltip>
|
|
{{#if (eq 'critical' (service/health-checks item))}}
|
|
At least one health check on one instance is failing.
|
|
{{else if (eq 'warning' (service/health-checks item))}}
|
|
At least one health check on one instance has a warning.
|
|
{{else if (eq 'passing' (service/health-checks item))}}
|
|
All health checks are passing.
|
|
{{else}}
|
|
There are no health checks.
|
|
{{/if}}
|
|
</Tooltip>
|
|
</span>
|
|
{{#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}}
|
|
</li>
|
|
{{/let}}
|
|
{{else}}
|
|
<p data-test-service-name>
|
|
{{item.Name}}
|
|
</p>
|
|
{{/if}}
|
|
<ul>
|
|
{{#if (and (env 'CONSUL_NSPACES_ENABLED') (not-eq item.Namespace nspace))}}
|
|
<li class="nspace">
|
|
<span>
|
|
<Tooltip>
|
|
Namespace
|
|
</Tooltip>
|
|
</span>
|
|
<span>
|
|
{{item.Namespace}}
|
|
</span>
|
|
</li>
|
|
{{/if}}
|
|
{{#if (not-eq item.GatewayConfig.ListenerPort 0)}}
|
|
<li class="port">
|
|
<span>
|
|
<Tooltip>
|
|
Port
|
|
</Tooltip>
|
|
</span>
|
|
<span>
|
|
<span>:{{item.GatewayConfig.ListenerPort}}</span>
|
|
<CopyButton
|
|
@value={{item.GatewayConfig.ListenerPort}}
|
|
@name="Port"
|
|
/>
|
|
</span>
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</ListCollection>
|
|
{{/let}}
|
|
</section>
|
|
{{else}}
|
|
<p>
|
|
There are no upstreams.
|
|
</p>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|