2020-04-21 14:21:52 +00:00
|
|
|
{{#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-06-17 09:25:54 +00:00
|
|
|
<BlockSlot @name="header">
|
2020-07-01 14:27:29 +00:00
|
|
|
{{#if (eq routeName "dc.services.show")}}
|
|
|
|
<a data-test-service-name href={{href-to routeName item.Service}}>
|
|
|
|
{{item.ID}}
|
|
|
|
</a>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{else}}
|
2020-07-01 14:27:29 +00:00
|
|
|
<a data-test-service-name href={{href-to routeName item.Service.Service item.Node.Node (or item.Service.ID item.Service.Service)}}>
|
|
|
|
{{item.Service.ID}}
|
|
|
|
</a>
|
2020-06-16 15:59:31 +00:00
|
|
|
{{/if}}
|
2020-07-01 14:27:29 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="details">
|
|
|
|
{{#if checks}}
|
|
|
|
<ConsulExternalSource @item={{item}} />
|
|
|
|
<ConsulInstanceChecks @type="service" @items={{get checks item.Service}} />
|
2020-06-16 15:59:31 +00:00
|
|
|
{{else}}
|
2020-07-01 14:27:29 +00:00
|
|
|
<ConsulExternalSource @item={{item.Service}} />
|
2020-07-20 23:45:25 +00:00
|
|
|
<ConsulInstanceChecks @type="service" @items={{filter-by 'ServiceID' '' item.Checks}} />
|
|
|
|
<ConsulInstanceChecks @type="node" @items={{reject-by 'ServiceID' '' item.Checks}} />
|
2020-06-16 15:59:31 +00:00
|
|
|
{{/if}}
|
2020-06-24 13:54:16 +00:00
|
|
|
{{#if (get proxies item.Service.ID)}}
|
|
|
|
<dl class="proxy">
|
|
|
|
<dt>
|
|
|
|
<Tooltip>
|
|
|
|
Proxy
|
|
|
|
</Tooltip>
|
|
|
|
</dt>
|
|
|
|
<dd data-test-proxy>
|
2020-06-17 09:25:54 +00:00
|
|
|
connected with proxy
|
2020-06-24 13:54:16 +00:00
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
{{/if}}
|
|
|
|
{{#if (gt item.Node.Node.length 0)}}
|
|
|
|
<dl class="node">
|
|
|
|
<dt>
|
|
|
|
<Tooltip>
|
|
|
|
Node
|
|
|
|
</Tooltip>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2020-04-21 14:21:52 +00:00
|
|
|
<a href={{href-to 'dc.nodes.show' item.Node.Node}}>{{item.Node.Node}}</a>
|
2020-06-24 13:54:16 +00:00
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
{{/if}}
|
2020-07-01 14:27:29 +00:00
|
|
|
{{#if item.Service.Port}}
|
2020-06-24 13:54:16 +00:00
|
|
|
<dl class="address" data-test-address>
|
|
|
|
<dt>
|
|
|
|
<Tooltip>
|
|
|
|
IP Address and Port
|
|
|
|
</Tooltip>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2020-06-17 09:25:54 +00:00
|
|
|
{{#if (not-eq item.Service.Address '')}}
|
|
|
|
{{item.Service.Address}}:{{item.Service.Port}}
|
|
|
|
{{else}}
|
|
|
|
{{item.Node.Address}}:{{item.Service.Port}}
|
|
|
|
{{/if}}
|
2020-06-24 13:54:16 +00:00
|
|
|
</dd>
|
|
|
|
</dl>
|
2020-07-01 14:27:29 +00:00
|
|
|
{{/if}}
|
|
|
|
{{#if (and checks item.Port)}}
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
|
|
<CopyButton
|
|
|
|
@value={{item.Port}}
|
|
|
|
@name="Port"
|
|
|
|
/>
|
|
|
|
</dt>
|
|
|
|
<dd data-test-service-port={{item.Port}}>:{{item.Port}}</dd>
|
|
|
|
</dl>
|
|
|
|
{{/if}}
|
|
|
|
{{#if checks}}
|
|
|
|
<TagList @item={{item}} />
|
|
|
|
{{else}}
|
2020-06-24 13:54:16 +00:00
|
|
|
<TagList @item={{item.Service}} />
|
2020-07-01 14:27:29 +00:00
|
|
|
{{/if}}
|
2020-06-17 09:25:54 +00:00
|
|
|
</BlockSlot>
|
2020-04-21 14:21:52 +00:00
|
|
|
</ListCollection>
|
|
|
|
{{/if}}
|