2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'Nodes'}}
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-10-06 13:26:44 +00:00
|
|
|
<EventSource @src={{leader}} />
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (hash
|
|
|
|
statuses=(if status (split status ',') undefined)
|
|
|
|
) as |filters|}}
|
2020-11-19 16:05:46 +00:00
|
|
|
{{#let (or sortBy "Status:asc") as |sort|}}
|
2020-10-01 08:33:22 +00:00
|
|
|
<AppView>
|
2020-08-28 13:21:03 +00:00
|
|
|
<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) }}
|
2020-10-14 08:03:39 +00:00
|
|
|
<Consul::Node::SearchBar
|
2020-09-01 18:13:11 +00:00
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
@onsort={{action (mut sortBy) value="target.selected"}}
|
|
|
|
|
|
|
|
@filter={{filters}}
|
|
|
|
@onfilter={{hash
|
|
|
|
status=(action (mut status) value="target.selectedItems")
|
|
|
|
}}
|
|
|
|
/>
|
2020-08-28 13:21:03 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (filter (filter-predicate 'node' filters) items) as |filtered|}}
|
|
|
|
{{#let (sort-by (comparator 'node' sort) filtered) as |sorted|}}
|
2020-08-28 13:21:03 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'node' sorted}} @terms={{search}}>
|
2020-09-01 18:13:11 +00:00
|
|
|
<BlockSlot @name="set" as |searched|>
|
2020-10-14 08:03:39 +00:00
|
|
|
<Consul::Node::List @items={{searched}} @leader={{leader}} />
|
2020-05-27 10:23:21 +00:00
|
|
|
</BlockSlot>
|
2020-08-28 13:21:03 +00:00
|
|
|
<BlockSlot @name="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>
|
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
2020-08-28 13:21:03 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
2020-05-29 15:42:46 +00:00
|
|
|
{{/let}}
|