2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Nodes'}}
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (hash
|
|
|
|
statuses=(if status (split status ',') undefined)
|
|
|
|
) as |filters|}}
|
2020-08-28 13:21:03 +00:00
|
|
|
{{#let (or sortBy "Node:asc") as |sort|}}
|
|
|
|
<AppView @class="node list">
|
|
|
|
<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-09-01 18:13:11 +00:00
|
|
|
<ConsulNodeSearchBar
|
|
|
|
@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|>
|
|
|
|
<ConsulNodeList @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}}
|