63 lines
1.8 KiB
Handlebars
63 lines
1.8 KiB
Handlebars
{{page-title 'Nodes'}}
|
|
<EventSource @src={{items}} />
|
|
<EventSource @src={{leader}} />
|
|
{{#let (hash
|
|
statuses=(if status (split status ',') undefined)
|
|
searchproperties=(if (not-eq searchproperty undefined)
|
|
(split searchproperty ',')
|
|
(array 'Node' 'Address' 'Meta')
|
|
)
|
|
) as |filters|}}
|
|
{{#let (or sortBy "Status:asc") as |sort|}}
|
|
<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"}}
|
|
|
|
@sort={{sort}}
|
|
@onsort={{action (mut sortBy) value="target.selected"}}
|
|
|
|
@filter={{filters}}
|
|
@onfilter={{hash
|
|
searchproperty=(action (mut searchproperty) value="target.selectedItems")
|
|
status=(action (mut status) value="target.selectedItems")
|
|
}}
|
|
/>
|
|
{{/if}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="content">
|
|
<DataCollection
|
|
@type="node"
|
|
@sort={{sort}}
|
|
@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}}
|
|
{{/let}} |