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-08-26 14:24:30 +00:00
|
|
|
{{#if item.ProxyInstance}}
|
2020-06-24 13:54:16 +00:00
|
|
|
<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)}}
|
2020-09-22 17:20:44 +00:00
|
|
|
<dl class="port">
|
2020-07-01 14:27:29 +00:00
|
|
|
<dt>
|
2020-09-22 17:20:44 +00:00
|
|
|
Port
|
|
|
|
</dt>
|
|
|
|
<dd data-test-service-port={{item.Port}}>
|
2020-07-01 14:27:29 +00:00
|
|
|
<CopyButton
|
|
|
|
@value={{item.Port}}
|
|
|
|
@name="Port"
|
|
|
|
/>
|
2020-09-22 17:20:44 +00:00
|
|
|
:{{item.Port}}
|
|
|
|
</dd>
|
2020-07-01 14:27:29 +00:00
|
|
|
</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}}
|