2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
as |route|>
|
2021-10-07 11:38:04 +00:00
|
|
|
<DataSource @src={{uri '/${partition}/${nspace}/${dc}/coordinates/for-node/${name}'
|
2021-09-15 18:50:11 +00:00
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
name=route.params.name
|
|
|
|
)
|
|
|
|
}} as |tomography|>
|
|
|
|
<DataLoader
|
2022-06-23 13:16:26 +00:00
|
|
|
@src={{uri '/${partition}/${nspace}/${dc}/node/${name}/${peer}'
|
2021-09-15 18:50:11 +00:00
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
name=route.params.name
|
2022-06-23 13:16:26 +00:00
|
|
|
peer=route.params.peer
|
2021-09-15 18:50:11 +00:00
|
|
|
)
|
|
|
|
}}
|
|
|
|
as |loader|>
|
2021-04-06 12:40:40 +00:00
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError
|
|
|
|
@error={{loader.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
2020-07-17 13:42:45 +00:00
|
|
|
|
2021-11-24 18:14:07 +00:00
|
|
|
<BlockSlot @name="disconnected" as |after|>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{#if (eq loader.error.status "404")}}
|
2021-11-24 18:14:07 +00:00
|
|
|
<Notice
|
|
|
|
{{notification
|
|
|
|
sticky=true
|
|
|
|
}}
|
|
|
|
class="notification-update"
|
|
|
|
@type="warning"
|
|
|
|
as |notice|>
|
|
|
|
<notice.Header>
|
2021-04-06 12:40:40 +00:00
|
|
|
<strong>Warning!</strong>
|
2021-11-24 18:14:07 +00:00
|
|
|
</notice.Header>
|
|
|
|
<notice.Body>
|
|
|
|
<p>
|
|
|
|
This node no longer exists in the catalog.
|
|
|
|
</p>
|
|
|
|
</notice.Body>
|
|
|
|
</Notice>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{else if (eq loader.error.status "403")}}
|
2021-11-24 18:14:07 +00:00
|
|
|
<Notice
|
|
|
|
{{notification
|
|
|
|
sticky=true
|
|
|
|
}}
|
|
|
|
class="notification-update"
|
|
|
|
@type="error"
|
|
|
|
as |notice|>
|
|
|
|
<notice.Header>
|
2021-04-06 12:40:40 +00:00
|
|
|
<strong>Error!</strong>
|
2021-11-24 18:14:07 +00:00
|
|
|
</notice.Header>
|
|
|
|
<notice.Body>
|
|
|
|
<p>
|
|
|
|
You no longer have access to this node
|
|
|
|
</p>
|
|
|
|
</notice.Body>
|
|
|
|
</Notice>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{else}}
|
2021-11-24 18:14:07 +00:00
|
|
|
<Notice
|
|
|
|
{{notification
|
|
|
|
sticky=true
|
|
|
|
}}
|
|
|
|
class="notification-update"
|
|
|
|
@type="warning"
|
|
|
|
as |notice|>
|
|
|
|
<notice.Header>
|
2021-04-06 12:40:40 +00:00
|
|
|
<strong>Warning!</strong>
|
2021-11-24 18:14:07 +00:00
|
|
|
</notice.Header>
|
|
|
|
<notice.Body>
|
|
|
|
<p>
|
|
|
|
An error was returned whilst loading this data, refresh to try again.
|
|
|
|
</p>
|
|
|
|
</notice.Body>
|
|
|
|
</Notice>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="loaded">
|
2021-09-15 18:50:11 +00:00
|
|
|
{{#let
|
|
|
|
loader.data
|
|
|
|
tomography.data
|
|
|
|
as |item tomography|}}
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="notification" as |status type|>
|
|
|
|
<Consul::LockSession::Notifications
|
|
|
|
@type={{type}}
|
|
|
|
@status={{status}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
|
|
|
<ol>
|
2022-06-23 13:16:26 +00:00
|
|
|
<li><a data-test-back href={{href-to 'dc.nodes' params=(hash peer=undefined)}}>All Nodes</a></li>
|
2021-04-06 12:40:40 +00:00
|
|
|
</ol>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title={{item.Node}} />
|
2021-04-06 12:40:40 +00:00
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="nav">
|
2022-03-14 16:54:49 +00:00
|
|
|
<TabNav @items={{
|
|
|
|
compact
|
|
|
|
(array
|
|
|
|
(hash
|
|
|
|
label=(t 'routes.dc.nodes.show.healthchecks.title')
|
|
|
|
href=(href-to "dc.nodes.show.healthchecks")
|
|
|
|
selected=(is-href "dc.nodes.show.healthchecks")
|
|
|
|
)
|
|
|
|
(hash
|
|
|
|
label=(t 'routes.dc.nodes.show.services.title')
|
|
|
|
href=(href-to "dc.nodes.show.services")
|
|
|
|
selected=(is-href "dc.nodes.show.services")
|
|
|
|
)
|
|
|
|
(if tomography.distances
|
|
|
|
(hash
|
|
|
|
label=(t 'routes.dc.nodes.show.rtt.title')
|
|
|
|
href=(href-to "dc.nodes.show.rtt")
|
|
|
|
selected=(is-href "dc.nodes.show.rtt")
|
|
|
|
)
|
|
|
|
'')
|
|
|
|
(if (can 'read sessions')
|
|
|
|
(hash
|
|
|
|
label=(t 'routes.dc.nodes.show.sessions.title')
|
|
|
|
href=(href-to "dc.nodes.show.sessions")
|
|
|
|
selected=(is-href "dc.nodes.show.sessions")
|
|
|
|
)
|
|
|
|
'')
|
|
|
|
(hash
|
|
|
|
label=(t 'routes.dc.nodes.show.metadata.title')
|
|
|
|
href=(href-to "dc.nodes.show.metadata")
|
|
|
|
selected=(is-href "dc.nodes.show.metadata")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}}/>
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<CopyButton @value={{item.Address}} @name="Address">{{item.Address}}</CopyButton>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<Outlet
|
|
|
|
@name={{routeName}}
|
2021-09-15 18:50:11 +00:00
|
|
|
@model={{assign
|
|
|
|
(hash
|
|
|
|
item=item
|
|
|
|
tomography=tomography
|
|
|
|
) route.model
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
as |o|>
|
|
|
|
{{outlet}}
|
|
|
|
</Outlet>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2021-09-15 18:50:11 +00:00
|
|
|
{{/let}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
2021-09-15 18:50:11 +00:00
|
|
|
</DataSource>
|
2021-04-06 12:40:40 +00:00
|
|
|
</Route>
|