2020-04-21 14:21:52 +00:00
|
|
|
{{yield}}
|
|
|
|
{{#if (gt items.length 0)}}
|
2020-05-19 16:18:04 +00:00
|
|
|
<ListCollection @items={{items}} class="consul-service-instance-list" as |item index|>
|
2020-04-21 14:21:52 +00:00
|
|
|
<a href={{href-to routeName item.Service.Service item.Node.Node (or item.Service.ID item.Service.Service)}}>
|
|
|
|
{{item.Service.ID}}
|
|
|
|
</a>
|
|
|
|
<ul>
|
|
|
|
<ConsulExternalSource @item={{item.Service}} as |ExternalSource|>
|
|
|
|
<li>
|
|
|
|
<ExternalSource />
|
|
|
|
</li>
|
|
|
|
</ConsulExternalSource>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{#let (reject-by 'ServiceID' '' item.Checks) as |checks|}}
|
|
|
|
{{#let (service/instance-checks checks) as |serviceCheck| }}
|
2020-06-16 16:33:11 +00:00
|
|
|
{{#if (eq serviceCheck.check 'empty') }}
|
|
|
|
<li class={{serviceCheck.check}}>
|
2020-06-16 15:59:31 +00:00
|
|
|
No service checks
|
2020-04-21 14:21:52 +00:00
|
|
|
</li>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{else}}
|
|
|
|
{{#if (eq serviceCheck.count checks.length)}}
|
2020-06-16 16:33:11 +00:00
|
|
|
<li class={{serviceCheck.check}}>
|
2020-06-16 15:59:31 +00:00
|
|
|
All service checks {{serviceCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{else}}
|
2020-06-16 16:33:11 +00:00
|
|
|
<li class={{serviceCheck.check}}>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{serviceCheck.count}}/{{checks.length}} service checks {{serviceCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{#let (filter-by 'ServiceID' '' item.Checks) as |checks|}}
|
|
|
|
{{#let (service/instance-checks checks) as |nodeCheck| }}
|
2020-06-16 16:33:11 +00:00
|
|
|
{{#if (eq nodeCheck.check 'empty') }}
|
|
|
|
<li class={{nodeCheck.check}}>
|
2020-06-16 15:59:31 +00:00
|
|
|
No node checks
|
2020-04-21 14:21:52 +00:00
|
|
|
</li>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{else}}
|
|
|
|
{{#if (eq nodeCheck.count checks.length)}}
|
2020-06-16 16:33:11 +00:00
|
|
|
<li class={{nodeCheck.check}}>
|
|
|
|
All node checks {{nodeCheck.status}}
|
|
|
|
</li>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{else}}
|
2020-06-16 16:33:11 +00:00
|
|
|
<li class={{nodeCheck.check}}>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{nodeCheck.count}}/{{checks.length}} node checks {{nodeCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
2020-04-21 14:21:52 +00:00
|
|
|
{{#if (get proxies item.Service.ID)}}
|
|
|
|
<li class="proxy">
|
|
|
|
connected with proxy
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{#if (gt item.Node.Node.length 0)}}
|
|
|
|
<li class="node">
|
|
|
|
<a href={{href-to 'dc.nodes.show' item.Node.Node}}>{{item.Node.Node}}</a>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
<li class="address" data-test-address>
|
|
|
|
{{#if (not-eq item.Service.Address '')}}
|
|
|
|
{{item.Service.Address}}:{{item.Service.Port}}
|
|
|
|
{{else}}
|
|
|
|
{{item.Node.Address}}:{{item.Service.Port}}
|
|
|
|
{{/if}}
|
|
|
|
</li>
|
2020-05-12 12:02:04 +00:00
|
|
|
<TagList @item={{item.Service}} as |Tags|>
|
|
|
|
<li>
|
|
|
|
<Tags />
|
|
|
|
</li>
|
|
|
|
</TagList>
|
2020-04-21 14:21:52 +00:00
|
|
|
</ul>
|
|
|
|
</ListCollection>
|
|
|
|
{{/if}}
|