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| }}
|
|
|
|
{{#if (eq serviceCheck.status 'empty') }}
|
|
|
|
<li class={{serviceCheck.status}}>
|
|
|
|
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)}}
|
|
|
|
{{#if (eq serviceCheck.status 'warning') }}
|
|
|
|
<li class={{serviceCheck.status}}>
|
|
|
|
All service checks with {{serviceCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class={{serviceCheck.status}}>
|
|
|
|
All service checks {{serviceCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<li class={{serviceCheck.status}}>
|
|
|
|
{{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| }}
|
|
|
|
{{#if (eq nodeCheck.status 'empty') }}
|
|
|
|
<li class={{nodeCheck.status}}>
|
|
|
|
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)}}
|
|
|
|
{{#if (eq nodeCheck.status 'warning') }}
|
|
|
|
<li class={{nodeCheck.status}}>
|
|
|
|
All node checks with {{nodeCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class={{nodeCheck.status}}>
|
|
|
|
All node checks {{nodeCheck.status}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<li class={{nodeCheck.status}}>
|
|
|
|
{{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}}
|