2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
as |route|>
|
2021-09-15 18:50:11 +00:00
|
|
|
|
|
|
|
<DataSource @src={{
|
|
|
|
uri '/${partition}/${nspace}/${dc}/leader'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
)
|
|
|
|
}} as |leader|>
|
|
|
|
|
|
|
|
<DataLoader
|
|
|
|
@src={{uri '/${partition}/${nspace}/${dc}/nodes'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
as |api|>
|
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError
|
|
|
|
@error={{api.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
2021-04-06 12:40:40 +00:00
|
|
|
{{#let
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
(hash
|
|
|
|
value=(or sortBy "Status:asc")
|
|
|
|
change=(action (mut sortBy) value="target.selected")
|
2021-01-25 18:13:54 +00:00
|
|
|
)
|
2021-04-06 12:40:40 +00:00
|
|
|
|
|
|
|
(hash
|
|
|
|
status=(hash
|
|
|
|
value=(if status (split status ',') undefined)
|
|
|
|
change=(action (mut status) value="target.selectedItems")
|
|
|
|
)
|
|
|
|
searchproperty=(hash
|
|
|
|
value=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
searchProperties
|
|
|
|
)
|
|
|
|
change=(action (mut searchproperty) value="target.selectedItems")
|
|
|
|
default=searchProperties
|
2021-01-25 18:13:54 +00:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
api.data
|
|
|
|
|
|
|
|
leader.data
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
as |sort filters items leader|}}
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="Nodes" /> <em>{{format-number items.length}} total</em>
|
2021-04-06 12:40:40 +00:00
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<Consul::Node::SearchBar
|
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@sort={{sort}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@filter={{filters}}
|
2020-12-01 15:45:09 +00:00
|
|
|
/>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<DataCollection
|
|
|
|
@type="node"
|
|
|
|
@sort={{sort.value}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Node::List
|
|
|
|
@items={{collection.items}}
|
|
|
|
@leader={{leader}}
|
|
|
|
/>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
2021-12-21 06:49:18 +00:00
|
|
|
<EmptyState
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
2022-04-11 11:49:59 +00:00
|
|
|
{{t 'routes.dc.nodes.index.empty.header'
|
|
|
|
items=items.length
|
|
|
|
}}
|
2021-12-21 06:49:18 +00:00
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
2021-04-06 12:40:40 +00:00
|
|
|
<BlockSlot @name="body">
|
2022-04-11 11:49:59 +00:00
|
|
|
{{t 'routes.dc.nodes.index.empty.body'
|
|
|
|
items=items.length
|
|
|
|
htmlSafe=true
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|
2021-09-15 18:50:11 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
|
|
|
</DataSource>
|
2021-04-06 12:40:40 +00:00
|
|
|
</Route>
|