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

40 lines
1.1 KiB
Handlebars
Raw Normal View History

{{#if (gt item.Proxy.Upstreams.length 0) }}
{{#tabular-collection
data-test-upstreams
items=item.Proxy.Upstreams as |item index|
}}
{{#block-slot name='header'}}
<th>Upstream</th>
<th>Datacenter</th>
<th>Type</th>
<th>Local Bind Address</th>
{{/block-slot}}
{{#block-slot 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>
{{/block-slot}}
{{/tabular-collection}}
{{else}}
<p>
There are no upstreams.
</p>
{{/if}}