2020-12-01 15:45:09 +00:00
|
|
|
<form
|
2020-12-07 09:14:30 +00:00
|
|
|
class="consul-node-search-bar filter-bar"
|
2020-12-01 15:45:09 +00:00
|
|
|
...attributes
|
|
|
|
>
|
|
|
|
<div class="search">
|
|
|
|
<FreetextFilter
|
|
|
|
@onsearch={{action @onsearch}}
|
|
|
|
@value={{@search}}
|
|
|
|
@placeholder="Search"
|
|
|
|
>
|
|
|
|
<PopoverSelect
|
|
|
|
class="type-search-properties"
|
|
|
|
@position="right"
|
|
|
|
@onchange={{action @onfilter.searchproperty}}
|
|
|
|
@multiple={{true}}
|
|
|
|
as |components|>
|
|
|
|
<BlockSlot @name="selected">
|
|
|
|
<span>
|
|
|
|
Search across
|
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="options">
|
|
|
|
{{#let components.Optgroup components.Option as |Optgroup Option|}}
|
|
|
|
<Option @value="Node" @selected={{contains 'Node' @filter.searchproperties}}>Node Name</Option>
|
|
|
|
<Option @value="Address" @selected={{contains 'Address' @filter.searchproperties}}>Address</Option>
|
|
|
|
<Option @value="Meta" @selected={{contains 'Meta' @filter.searchproperties}}>Node Meta</Option>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</FreetextFilter>
|
|
|
|
</div>
|
2020-09-01 18:13:11 +00:00
|
|
|
<div class="filters">
|
|
|
|
<PopoverSelect
|
|
|
|
class="type-status"
|
|
|
|
@position="left"
|
2020-12-01 15:45:09 +00:00
|
|
|
@onchange={{action @onfilter.status}}
|
2020-09-01 18:13:11 +00:00
|
|
|
@multiple={{true}}
|
|
|
|
as |components|>
|
|
|
|
<BlockSlot @name="selected">
|
|
|
|
<span>
|
|
|
|
Health Status
|
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="options">
|
|
|
|
{{#let components.Optgroup components.Option as |Optgroup Option|}}
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option class="value-passing" @value="passing" @selected={{contains 'passing' @filter.statuses}}>Passing</Option>
|
|
|
|
<Option class="value-warning" @value="warning" @selected={{contains 'warning' @filter.statuses}}>Warning</Option>
|
|
|
|
<Option class="value-critical" @value="critical" @selected={{contains 'critical' @filter.statuses}}>Failing</Option>
|
|
|
|
<Option class="value-empty" @value="empty" @selected={{contains 'empty' @filter.statuses}}>No checks</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</div>
|
|
|
|
<div class="sort">
|
|
|
|
<PopoverSelect
|
|
|
|
class="type-sort"
|
|
|
|
data-test-sort-control
|
|
|
|
@position="right"
|
2020-12-01 15:45:09 +00:00
|
|
|
@onchange={{action @onsort}}
|
2020-09-01 18:13:11 +00:00
|
|
|
@multiple={{false}}
|
|
|
|
as |components|>
|
|
|
|
<BlockSlot @name="selected">
|
|
|
|
<span>
|
|
|
|
{{#let (from-entries (array
|
|
|
|
(array "Node:asc" "A to Z")
|
|
|
|
(array "Node:desc" "Z to A")
|
|
|
|
(array "Status:asc" "Unhealthy to Healthy")
|
|
|
|
(array "Status:desc" "Healthy to Unhealthy")
|
|
|
|
))
|
|
|
|
as |selectable|
|
|
|
|
}}
|
2020-12-01 15:45:09 +00:00
|
|
|
{{get selectable @sort}}
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="options">
|
|
|
|
{{#let components.Optgroup components.Option as |Optgroup Option|}}
|
|
|
|
<Optgroup @label="Health Status">
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option @value="Status:asc" @selected={{eq "Status:asc" @sort}}>Unhealthy to Healthy</Option>
|
|
|
|
<Option @value="Status:desc" @selected={{eq "Status:desc" @sort}}>Healthy to Unhealthy</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
</Optgroup>
|
|
|
|
<Optgroup @label="Service Name">
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option @value="Node:asc" @selected={{eq "Node:asc" @sort}}>A to Z</Option>
|
|
|
|
<Option @value="Node:desc" @selected={{eq "Node:desc" @sort}}>Z to A</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
</Optgroup>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</div>
|
|
|
|
</form>
|