2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
@title={{item.Service.ID}}
|
|
|
|
as |route|>
|
2020-12-17 16:35:01 +00:00
|
|
|
<DataLoader as |loader|>
|
|
|
|
|
|
|
|
<BlockSlot @name="data">
|
|
|
|
<EventSource @src={{item}} @onerror={{action loader.dispatchError}} />
|
|
|
|
{{#if (not loader.error)}}
|
|
|
|
<EventSource @src={{proxy}} />
|
|
|
|
<EventSource @src={{proxyMeta}} />
|
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-12-17 16:35:01 +00:00
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppError
|
|
|
|
@error={{loader.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-12-17 16:35:01 +00:00
|
|
|
|
|
|
|
<BlockSlot @name="disconnected" as |Notification|>
|
|
|
|
{{#if (eq loader.error.status "404")}}
|
|
|
|
<Notification @sticky={{true}}>
|
|
|
|
<p data-notification role="alert" class="warning notification-update">
|
|
|
|
<strong>Warning!</strong>
|
|
|
|
This service has been deregistered and no longer exists in the catalog.
|
|
|
|
</p>
|
|
|
|
</Notification>
|
2021-02-19 16:42:16 +00:00
|
|
|
{{else if (eq loader.error.status "403")}}
|
|
|
|
<Notification @sticky={{true}}>
|
|
|
|
<p data-notification role="alert" class="error notification-update">
|
|
|
|
<strong>Error!</strong>
|
|
|
|
You no longer have access to this service
|
|
|
|
</p>
|
|
|
|
</Notification>
|
2020-12-17 16:35:01 +00:00
|
|
|
{{else}}
|
|
|
|
<Notification @sticky={{true}}>
|
|
|
|
<p data-notification role="alert" class="warning notification-update">
|
|
|
|
<strong>Warning!</strong>
|
|
|
|
An error was returned whilst loading this data, refresh to try again.
|
|
|
|
</p>
|
|
|
|
</Notification>
|
|
|
|
{{/if}}
|
2020-05-07 13:57:15 +00:00
|
|
|
</BlockSlot>
|
2020-12-17 16:35:01 +00:00
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
|
|
|
<ol>
|
2021-01-12 14:53:21 +00:00
|
|
|
<li><a href={{href-to 'dc.services'}}>All Services</a></li>
|
2020-12-17 16:35:01 +00:00
|
|
|
<li><a data-test-back href={{href-to 'dc.services.show'}}>Service ({{item.Service.Service}})</a></li>
|
|
|
|
</ol>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
{{ item.Service.ID }}
|
|
|
|
</h1>
|
|
|
|
<Consul::ExternalSource @item={{item}} />
|
|
|
|
<Consul::Kind @item={{item}} @withInfo={{true}} />
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="nav">
|
|
|
|
<dl>
|
|
|
|
<dt>Service Name</dt>
|
|
|
|
<dd><a href="{{href-to 'dc.services.show' item.Service.Service}}">{{item.Service.Service}}</a></dd>
|
|
|
|
</dl>
|
|
|
|
<dl>
|
|
|
|
<dt>Node Name</dt>
|
|
|
|
<dd><a href="{{href-to 'dc.nodes.show' item.Node.Node}}">{{item.Node.Node}}</a></dd>
|
|
|
|
</dl>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
{{#let (or item.Service.Address item.Node.Address) as |address|}}
|
|
|
|
<CopyButton @value={{address}} @name="Address">{{address}}</CopyButton>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<TabNav @items={{
|
|
|
|
compact
|
|
|
|
(array
|
|
|
|
(hash label="Health Checks" href=(href-to "dc.services.instance.healthchecks") selected=(is-href "dc.services.instance.healthchecks"))
|
|
|
|
(if
|
|
|
|
(eq item.Service.Kind 'mesh-gateway')
|
|
|
|
(hash label="Addresses" href=(href-to "dc.services.instance.addresses") selected=(is-href "dc.services.instance.addresses")) ""
|
|
|
|
)
|
|
|
|
(if proxy
|
|
|
|
(hash label="Upstreams" href=(href-to "dc.services.instance.upstreams") selected=(is-href "dc.services.instance.upstreams"))
|
|
|
|
)
|
|
|
|
(if proxy
|
|
|
|
(hash label="Exposed Paths" href=(href-to "dc.services.instance.exposedpaths") selected=(is-href "dc.services.instance.exposedpaths"))
|
|
|
|
)
|
|
|
|
(hash label="Tags & Meta" href=(href-to "dc.services.instance.metadata") selected=(is-href "dc.services.instance.metadata"))
|
|
|
|
)
|
|
|
|
}}/>
|
|
|
|
<Outlet
|
|
|
|
@name={{routeName}}
|
2021-04-06 12:40:40 +00:00
|
|
|
@model={{route.model}}
|
2020-12-17 16:35:01 +00:00
|
|
|
as |o|>
|
|
|
|
{{outlet}}
|
|
|
|
</Outlet>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2021-04-06 12:40:40 +00:00
|
|
|
</DataLoader>
|
|
|
|
</Route>
|