2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
@title="Nodes"
|
|
|
|
as |route|>
|
|
|
|
<EventSource @src={{items}} />
|
|
|
|
<EventSource @src={{leader}} />
|
|
|
|
{{#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-04-06 12:40:40 +00:00
|
|
|
items
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
as |sort filters items|}}
|
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
Nodes <em>{{format-number items.length}} total</em>
|
|
|
|
</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>
|
|
|
|
<EmptyState>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
There don't seem to be any registered nodes, or you may not have access to view nodes yet.
|
|
|
|
</p>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|
|
|
|
</Route>
|