2020-05-29 15:42:46 +00:00
|
|
|
{{#let (filter-by "Action" "deny" intentions) as |denied|}}
|
|
|
|
{{#let (selectable-key-values
|
|
|
|
(array "" (concat "All (" intentions.length ")"))
|
|
|
|
(array "allow" (concat "Allow (" (sub intentions.length denied.length) ")"))
|
|
|
|
(array "deny" (concat "Deny (" denied.length ")"))
|
|
|
|
selected=filterBy
|
|
|
|
)
|
|
|
|
as |filter|
|
|
|
|
}}
|
2020-04-16 14:15:45 +00:00
|
|
|
<div id="intentions" class="tab-section">
|
|
|
|
<div role="tabpanel">
|
|
|
|
{{#if (gt intentions.length 0) }}
|
|
|
|
<input type="checkbox" id="toolbar-toggle" />
|
2020-05-29 15:42:46 +00:00
|
|
|
<SearchBar
|
|
|
|
@value={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
@selected={{filter.selected}}
|
|
|
|
@options={{filter.items}}
|
|
|
|
@onchange={{action (mut filterBy) value='target.value'}}
|
|
|
|
/>
|
2020-04-16 14:15:45 +00:00
|
|
|
{{/if}}
|
2020-05-29 15:42:46 +00:00
|
|
|
<ChangeableSet
|
|
|
|
@dispatcher={{
|
|
|
|
searchable
|
|
|
|
'intention'
|
|
|
|
(if (eq filter.selected.key "") intentions (filter-by "Action" filter.selected.key intentions))
|
|
|
|
}}
|
|
|
|
@terms={{search}}
|
|
|
|
>
|
2020-04-16 14:15:45 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
|
|
|
<ConsulIntentionList
|
|
|
|
@items={{filtered}}
|
|
|
|
@ondelete={{action "route" "delete"}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="empty">
|
|
|
|
<p>
|
|
|
|
There are no intentions for this service.
|
|
|
|
</p>
|
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-29 15:42:46 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|