2020-11-13 15:55:40 +00:00
|
|
|
<form
|
|
|
|
class="consul-intention-search-bar filter-bar"
|
|
|
|
...attributes
|
|
|
|
>
|
2020-12-01 15:45:09 +00:00
|
|
|
<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="SourceName" @selected={{contains 'SourceName' @filter.searchproperties}}>Source Name</Option>
|
|
|
|
<Option @value="DestinationName" @selected={{contains 'DestinationName' @filter.searchproperties}}>Destination Name</Option>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</FreetextFilter>
|
|
|
|
</div>
|
2020-09-01 18:13:11 +00:00
|
|
|
<div class="filters">
|
|
|
|
<PopoverSelect
|
|
|
|
@position="left"
|
2020-12-01 15:45:09 +00:00
|
|
|
@onchange={{action @onfilter.access}}
|
2020-09-01 18:13:11 +00:00
|
|
|
@multiple={{true}}
|
|
|
|
as |components|>
|
|
|
|
<BlockSlot @name="selected">
|
|
|
|
<span>
|
2020-12-01 15:45:09 +00:00
|
|
|
Permission
|
2020-09-01 18:13:11 +00:00
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="options">
|
|
|
|
{{#let components.Optgroup components.Option as |Optgroup Option|}}
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option class="value-allow" @value="allow" @selected={{contains 'allow' @filter.accesses}}>Allow</Option>
|
|
|
|
<Option class="value-deny" @value="deny" @selected={{contains 'deny' @filter.accesses}}>Deny</Option>
|
|
|
|
<Option class="value-" @value="app-aware" @selected={{contains 'app-aware' @filter.accesses}}>App aware</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 "Action:asc" "Allow to Deny")
|
|
|
|
(array "Action:desc" "Deny to Allow")
|
|
|
|
(array "SourceName:asc" "Source: A to Z")
|
|
|
|
(array "SourceName:desc" "Source: Z to A")
|
|
|
|
(array "DestinationName:asc" "Destination: A to Z")
|
|
|
|
(array "DestinationName:desc" "Destination: Z to A")
|
|
|
|
(array "Precedence:asc" "Precedence: Ascending")
|
|
|
|
(array "Precedence:desc" "Precedence: Descending")
|
|
|
|
))
|
|
|
|
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="Permission">
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option @value="Action:asc" @selected={{eq "Action:asc" @sort}}>Allow to Deny</Option>
|
|
|
|
<Option @value="Action:desc" @selected={{eq "Action:desc" @sort}}>Deny to Allow</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
</Optgroup>
|
|
|
|
<Optgroup @label="Source">
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option @value="SourceName:asc" @selected={{eq "SourceName:asc" @sort}}>A to Z</Option>
|
|
|
|
<Option @value="SourceName:desc" @selected={{eq "SourceName:desc" @sort}}>Z to A</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
</Optgroup>
|
|
|
|
<Optgroup @label="Destination">
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option @value="DestinationName:asc" @selected={{eq "DestinationName:asc" @sort}}>A to Z</Option>
|
|
|
|
<Option @value="DestinationName:desc" @selected={{eq "DestinationName:desc" @sort}}>Z to A</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
</Optgroup>
|
|
|
|
<Optgroup @label="Precedence">
|
2020-12-01 15:45:09 +00:00
|
|
|
<Option @value="Precedence:asc" @selected={{eq "Precedence:asc" @sort}}>Ascending</Option>
|
|
|
|
<Option @value="Precedence:desc" @selected={{eq "Precedence:desc" @sort}}>Descending</Option>
|
2020-09-01 18:13:11 +00:00
|
|
|
</Optgroup>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</div>
|
|
|
|
</form>
|