open-consul/ui-v2/app/components/consul-service-list/index.hbs
John Cowen 7577f6bfca ui: Test Improvements (#7854)
* ui: Combine all "see/don't see" steps into one step

* Fix up broken tests

* Add some test meta data/titles

* Test out proxies in the service listing

* Remove comments
2020-05-12 17:14:57 +00:00

35 lines
932 B
Handlebars

{{yield}}
{{#if (gt items.length 0)}}
<ListCollection @cellHeight={{73}} @items={{items}} class="consul-service-list" as |item index|>
<a data-test-service-name href={{href-to routeName item.Name}} class={{service/health-checks item}}>
{{item.Name}}
</a>
<ul>
<ConsulKind @item={{item}} as |Kind|>
<li>
<Kind />
</li>
</ConsulKind>
<ConsulExternalSource @item={{item}} as |ExternalSource|>
<li>
<ExternalSource />
</li>
</ConsulExternalSource>
{{#if (not-eq item.InstanceCount 0)}}
<li>
{{format-number item.InstanceCount}} {{pluralize item.InstanceCount 'Instance' without-count=true}}
</li>
{{/if}}
{{#if (get proxies item.Name)}}
<li data-test-proxy class="proxy">
connected with proxy
</li>
{{/if}}
<TagList @item={{item}} as |Tags|>
<li>
<Tags />
</li>
</TagList>
</ul>
</ListCollection>
{{/if}}