mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Add imported/exported tabs to peers.edit
This commit is contained in:
parent
552af5a428
commit
991bc5a6cd
@ -1,8 +1,7 @@
|
|||||||
<Route
|
<Route @name={{routeName}} as |route|>
|
||||||
@name={{routeName}}
|
<DataLoader
|
||||||
as |route|>
|
@src={{uri
|
||||||
<DataLoader @src={{
|
"/${partition}/${nspace}/${dc}/peer/${name}"
|
||||||
uri '/${partition}/${nspace}/${dc}/peer/${name}'
|
|
||||||
(hash
|
(hash
|
||||||
partition=route.params.partition
|
partition=route.params.partition
|
||||||
nspace=route.params.nspace
|
nspace=route.params.nspace
|
||||||
@ -10,59 +9,67 @@ as |route|>
|
|||||||
name=route.params.name
|
name=route.params.name
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
as |loader|>
|
as |loader|
|
||||||
|
>
|
||||||
|
|
||||||
<BlockSlot @name="error">
|
<BlockSlot @name="error">
|
||||||
<AppError
|
<AppError @error={{loader.error}} @login={{route.model.app.login.open}} />
|
||||||
@error={{loader.error}}
|
|
||||||
@login={{route.model.app.login.open}}
|
|
||||||
/>
|
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
|
|
||||||
<BlockSlot @name="loaded">
|
<BlockSlot @name="loaded">
|
||||||
{{#let
|
{{#let
|
||||||
|
route.params.dc
|
||||||
route.params.dc
|
route.params.partition
|
||||||
route.params.partition
|
route.params.nspace
|
||||||
route.params.nspace
|
loader.data
|
||||||
|
as |dc partition nspace item|
|
||||||
loader.data
|
}}
|
||||||
as |dc partition nspace item|}}
|
<AppView>
|
||||||
<AppView>
|
<BlockSlot @name="breadcrumbs">
|
||||||
<BlockSlot @name="breadcrumbs">
|
<ol>
|
||||||
<ol>
|
<li><a data-test-back href={{href-to "dc.peers"}}>All Peers</a></li>
|
||||||
<li><a data-test-back href={{href-to 'dc.peers'}}>All Peers</a></li>
|
</ol>
|
||||||
</ol>
|
</BlockSlot>
|
||||||
</BlockSlot>
|
<BlockSlot @name="header">
|
||||||
<BlockSlot @name="header">
|
<h1>
|
||||||
<h1>
|
<route.Title @title={{item.Name}} />
|
||||||
<route.Title
|
</h1>
|
||||||
@title={{item.Name}}
|
</BlockSlot>
|
||||||
/>
|
<BlockSlot @name="content">
|
||||||
</h1>
|
<TabNav
|
||||||
</BlockSlot>
|
@items={{compact
|
||||||
<BlockSlot @name="content">
|
(array
|
||||||
<TabNav @items={{
|
(hash
|
||||||
compact
|
label="Imported Services"
|
||||||
(array
|
href=(href-to "dc.peers.edit.imported")
|
||||||
(hash
|
selected=(is-href "dc.peers.edit.imported")
|
||||||
label="Addresses"
|
)
|
||||||
href=(href-to "dc.peers.edit.addresses")
|
(hash
|
||||||
selected=(is-href "dc.peers.edit.addresses")
|
label="Exported Services"
|
||||||
)
|
href=(href-to "dc.peers.edit.exported")
|
||||||
)
|
selected=(is-href "dc.peers.edit.exported")
|
||||||
}}/>
|
)
|
||||||
<Outlet
|
(hash
|
||||||
@name={{routeName}}
|
label="Addresses"
|
||||||
@model={{assign (hash
|
href=(href-to "dc.peers.edit.addresses")
|
||||||
items=item.PeerServerAddresses
|
selected=(is-href "dc.peers.edit.addresses")
|
||||||
) route.model}}
|
)
|
||||||
as |o|>
|
)
|
||||||
{{outlet}}
|
}}
|
||||||
</Outlet>
|
/>
|
||||||
</BlockSlot>
|
<Outlet
|
||||||
</AppView>
|
@name={{routeName}}
|
||||||
{{/let}}
|
@model={{assign
|
||||||
|
(hash items=item.PeerServerAddresses peer=item)
|
||||||
|
route.model
|
||||||
|
}}
|
||||||
|
as |o|
|
||||||
|
>
|
||||||
|
{{outlet}}
|
||||||
|
</Outlet>
|
||||||
|
</BlockSlot>
|
||||||
|
</AppView>
|
||||||
|
{{/let}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
</DataLoader>
|
</DataLoader>
|
||||||
</Route>
|
</Route>
|
Loading…
x
Reference in New Issue
Block a user