2022-10-05 10:43:44 +00:00
|
|
|
<Route @name={{routeName}} as |route|>
|
|
|
|
<DataLoader
|
|
|
|
@src={{uri
|
|
|
|
"/${partition}/${nspace}/${dc}/peer/${name}"
|
2022-07-04 10:31:58 +00:00
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
name=route.params.name
|
|
|
|
)
|
|
|
|
}}
|
2022-10-05 10:43:44 +00:00
|
|
|
as |loader|
|
|
|
|
>
|
2022-07-04 10:31:58 +00:00
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
2022-10-05 10:43:44 +00:00
|
|
|
<AppError @error={{loader.error}} @login={{route.model.app.login.open}} />
|
2022-07-04 10:31:58 +00:00
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
2022-10-05 10:43:44 +00:00
|
|
|
{{#let
|
|
|
|
route.params.dc
|
|
|
|
route.params.partition
|
|
|
|
route.params.nspace
|
|
|
|
loader.data
|
|
|
|
as |dc partition nspace item|
|
|
|
|
}}
|
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
|
|
|
<ol>
|
|
|
|
<li><a data-test-back href={{href-to "dc.peers"}}>All Peers</a></li>
|
|
|
|
</ol>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
<route.Title @title={{item.Name}} />
|
|
|
|
</h1>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2022-10-10 12:57:05 +00:00
|
|
|
<Hds::Card::Container
|
|
|
|
@level="base"
|
|
|
|
@hasBorder={{true}}
|
|
|
|
class="mb-3 mt-6"
|
|
|
|
>
|
|
|
|
<div class="h-24 p-6 flex space-x-12 overflow-x-scroll">
|
|
|
|
<div class="shrink-0">
|
|
|
|
<div
|
|
|
|
class="hds-typography-body-200 hds-font-weight-semibold mb-2 text-hds-foreground-primary"
|
|
|
|
>Status</div>
|
|
|
|
<div class="flex items-center">
|
|
|
|
<Peerings::Badge @peering={{item}} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="shrink-0">
|
|
|
|
<div
|
|
|
|
class="hds-typography-body-200 hds-font-weight-semibold mb-2 text-hds-foreground-primary"
|
|
|
|
>Latest heartbeat</div>
|
2022-10-10 13:08:52 +00:00
|
|
|
<div class="flex items-center">
|
|
|
|
{{#if item.heartbeat}}
|
|
|
|
{{#let (smart-date-format item.heartbeat) as |smartDate|}}
|
|
|
|
<FlightIcon
|
|
|
|
@name="activity"
|
|
|
|
class="mr-0.5 text-hds-foreground-faint fill-current"
|
|
|
|
/>
|
|
|
|
{{#if smartDate.isNearDate}}
|
|
|
|
<span
|
|
|
|
{{tooltip smartDate.friendly}}
|
|
|
|
>{{smartDate.relative}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span>{{smartDate.friendly}}</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
{{else}}
|
|
|
|
<span>None yet</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-10-10 12:57:05 +00:00
|
|
|
</div>
|
|
|
|
<div class="shrink-0">
|
|
|
|
<div
|
|
|
|
class="hds-typography-body-200 hds-font-weight-semibold mb-2 text-hds-foregrouny-primary"
|
|
|
|
>Latest receipt</div>
|
2022-10-10 13:08:52 +00:00
|
|
|
<div class="flex items-center">
|
|
|
|
{{#if item.receipt}}
|
|
|
|
{{#let (smart-date-format item.receipt) as |smartDate|}}
|
|
|
|
{{#if smartDate.isNearDate}}
|
|
|
|
<span
|
|
|
|
{{tooltip smartDate.friendly}}
|
|
|
|
>{{smartDate.relative}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span>{{smartDate.friendly}}</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
{{else}}
|
|
|
|
<span>None yet</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-10-10 12:57:05 +00:00
|
|
|
</div>
|
|
|
|
<div class="shrink-0">
|
|
|
|
<div
|
|
|
|
class="hds-typography-body-200 hds-font-weight-semibold mb-2 text-hds-foreground-primary"
|
|
|
|
>Latest send</div>
|
2022-10-10 13:08:52 +00:00
|
|
|
<div class="flex items-center">
|
|
|
|
{{#if item.lastSend}}
|
|
|
|
{{#let (smart-date-format item.lastSend) as |smartDate|}}
|
|
|
|
{{#if smartDate.isNearDate}}
|
|
|
|
<span
|
|
|
|
{{tooltip smartDate.friendly}}
|
|
|
|
>{{smartDate.relative}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span>{{smartDate.friendly}}</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
{{else}}
|
|
|
|
<span>None yet</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-10-10 12:57:05 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Hds::Card::Container>
|
2022-10-05 12:44:28 +00:00
|
|
|
<Peerings::Provider @peer={{item}} as |peering|>
|
|
|
|
<TabNav @items={{peering.data.tabs}} />
|
|
|
|
|
|
|
|
</Peerings::Provider>
|
2022-10-05 10:43:44 +00:00
|
|
|
<Outlet
|
|
|
|
@name={{routeName}}
|
|
|
|
@model={{assign
|
|
|
|
(hash items=item.PeerServerAddresses peer=item)
|
|
|
|
route.model
|
|
|
|
}}
|
|
|
|
as |o|
|
|
|
|
>
|
|
|
|
{{outlet}}
|
|
|
|
</Outlet>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|
2022-07-04 10:31:58 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
2022-10-05 10:43:44 +00:00
|
|
|
</Route>
|