open-consul/ui-v2/app/components/consul-upstream-instance-list/index.hbs
Kenia e67af2b292
ui: Support ingress gateways upstreams with multiple addresses (#8185)
* Upgrade consul-api-double to version 3.1.2

* Display multiple addresses for ingress gateway upstreams
2020-06-25 09:50:39 -04:00

53 lines
1.1 KiB
Handlebars

<ul data-test-proxy-upstreams>
{{#each items as |item|}}
<li>
<div>
<p data-test-destination-name>
{{item.DestinationName}}
</p>
</div>
<div>
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
{{#if (not-eq item.DestinationType 'prepared_query')}}
<dl class="nspace">
<dt>
<Tooltip>
Namespace
</Tooltip>
</dt>
<dd>
{{or item.DestinationNamespace 'default'}}
</dd>
</dl>
{{/if}}
{{/if}}
{{#if (and (not-eq item.Datacenter dc) (not-eq item.Datacenter ""))}}
<dl class="datacenter">
<dt>
<Tooltip>
Datacenter
</Tooltip>
</dt>
<dd>
{{item.Datacenter}}
</dd>
</dl>
{{/if}}
{{#if (gt item.LocalBindPort 0)}}
{{#let (concat (or item.LocalBindAddress '127.0.0.1') ':' item.LocalBindPort) as |combinedAddress|}}
<dl>
<dt>
<CopyButton
@value={{combinedAddress}}
@name="Address"
/>
</dt>
<dd>{{combinedAddress}}</dd>
</dl>
{{/let}}
{{/if}}
</div>
</li>
{{/each}}
</ul>