open-consul/ui-v2/app/templates/dc/services/-upstreams.hbs
John Cowen 6bf6002ab0
ui: Move slots to use attributes over positional params (#7032)
* Change all instances of yield/block-slots to use attributes over positional arguments

* Remove the ability to use yield/block-slots with positional params
2020-01-15 09:15:54 +00:00

40 lines
1.1 KiB
Handlebars

{{#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}}