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

44 lines
1.3 KiB
Handlebars

<div id="upstreams" class="tab-section">
<div role="tabpanel">
{{#if (gt item.Proxy.Upstreams.length 0) }}
<TabularCollection
data-test-upstreams
@items={{item.Proxy.Upstreams}} as |item index|
>
<BlockSlot @name="header">
<th>Upstream</th>
<th>Datacenter</th>
<th>Type</th>
<th>Local Bind Address</th>
</BlockSlot>
<BlockSlot @name="row">
<td>
<a data-test-destination-name>
{{item.DestinationName}}
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
{{#if (not-eq item.DestinationType 'prepared_query')}}
{{! TODO: slugify }}
<em class={{concat 'nspace-' (or item.DestinationNamespace 'default')}}>{{or item.DestinationNamespace 'default'}}</em>
{{/if}}
{{/if}}
</a>
</td>
<td data-test-destination-datacenter>
{{item.Datacenter}}
</td>
<td data-test-destination-type>
{{item.DestinationType}}
</td>
<td data-test-local-bind-address>
{{item.LocalBindAddress}}:{{item.LocalBindPort}}
</td>
</BlockSlot>
</TabularCollection>
{{else}}
<p>
There are no upstreams.
</p>
{{/if}}
</div>
</div>