consul/ui-v2/app/templates/dc/services/instance/proxy.hbs

107 lines
3.2 KiB
Handlebars

<div class="tab-section">
<div role="tabpanel">
{{#if (or (gt proxy.ServiceChecks.length 0) (gt proxy.NodeChecks.length 0))}}
<section>
<h3>Proxy health checks</h3>
<HealthcheckList data-test-proxy-checks @items={{append proxy.ServiceChecks proxy.NodeChecks}} />
</section>
{{/if}}
{{#if (gt proxy.Proxy.Upstreams.length 0)}}
<section class="proxy-upstreams">
<h3> Upstreams</h3>
<ul data-test-proxy-upstreams>
{{#let proxy.Datacenter as |proxyDatacenter|}}
{{#each proxy.Proxy.Upstreams as |item|}}
<li>
<p data-test-destination-name>
{{item.DestinationName}}
</p>
<ul>
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
{{#if (not-eq item.DestinationType 'prepared_query')}}
<li class="nspace">
{{or item.DestinationNamespace 'default'}}
<Tooltip>
Namespace
</Tooltip>
</li>
{{/if}}
{{/if}}
{{#if (and (not-eq item.Datacenter proxyDatacenter) (not-eq item.Datacenter ""))}}
<li class="datacenter">
{{item.Datacenter}}
<Tooltip>
Datacenter
</Tooltip>
</li>
{{/if}}
{{#if (gt item.LocalBindPort 0)}}
{{#let (concat (or item.LocalBindAddress '127.0.0.1') ':' item.LocalBindPort) as |combinedAddress| }}
<li class="port">
<span>{{combinedAddress}}</span>
<CopyButton
@value={{combinedAddress}}
@name="Address"
/>
<Tooltip>
Address
</Tooltip>
</li>
{{/let}}
{{/if}}
</ul>
</li>
{{/each}}
{{/let}}
</ul>
</section>
{{/if}}
{{#if (gt proxy.Proxy.Expose.Paths.length 0)}}
<section class="proxy-exposed-paths">
<h3>Exposed paths</h3>
<p>
The following list shows individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation.
</p>
<ul data-test-proxy-exposed-paths>
{{#each proxy.Proxy.Expose.Paths as |path|}}
<li>
{{#let (concat item.Address ':' path.Path) as |combinedAddress| }}
<p class="combined-address">
<span>
{{combinedAddress}}
</span>
<CopyButton
@value={{combinedAddress}}
@name="Address"
/>
</p>
{{/let}}
<ul>
{{#if path.Protocol}}
<li class="protocol">
{{path.Protocol}}
</li>
{{/if}}
{{#if path.ListenerPort}}
<li class="port">
listening on :{{path.ListenerPort}}
</li>
{{/if}}
{{#if path.LocalPathPort}}
<li class="port">
local port :{{path.LocalPathPort}}
</li>
{{/if}}
{{#if path.Path}}
<li class="path">
{{path.Path}}
</li>
{{/if}}
</ul>
</li>
{{/each}}
</ul>
</section>
{{/if}}
</div>
</div>