mirror of https://github.com/hashicorp/consul
87 lines
2.7 KiB
Handlebars
87 lines
2.7 KiB
Handlebars
{{yield}}
|
|
{{#if (gt items.length 0)}}
|
|
<ListCollection @items={{items}} class="consul-service-instance-list" as |item index|>
|
|
<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>
|
|
{{#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
|
|
</li>
|
|
{{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
|
|
</li>
|
|
{{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}}
|
|
{{#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>
|
|
<TagList @item={{item.Service}} as |Tags|>
|
|
<li>
|
|
<Tags />
|
|
</li>
|
|
</TagList>
|
|
</ul>
|
|
</ListCollection>
|
|
{{/if}} |