2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Intentions'}}
|
2020-05-29 15:42:46 +00:00
|
|
|
{{#let (filter-by "Action" "deny" items) as |denied|}}
|
|
|
|
{{#let (selectable-key-values
|
|
|
|
(array "" (concat "All (" items.length ")"))
|
|
|
|
(array "allow" (concat "Allow (" (sub items.length denied.length) ")"))
|
|
|
|
(array "deny" (concat "Deny (" denied.length ")"))
|
|
|
|
selected=filterBy
|
|
|
|
)
|
|
|
|
as |filter|
|
|
|
|
}}
|
2020-02-19 19:26:38 +00:00
|
|
|
<AppView @class="intention list">
|
|
|
|
<BlockSlot @name="notification" as |status type|>
|
2018-08-29 18:14:31 +00:00
|
|
|
{{partial 'dc/intentions/notifications'}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
2018-05-22 15:03:45 +00:00
|
|
|
<h1>
|
2019-02-21 13:57:13 +00:00
|
|
|
Intentions <em>{{format-number items.length}} total</em>
|
2018-05-22 15:03:45 +00:00
|
|
|
</h1>
|
2018-09-21 09:18:32 +00:00
|
|
|
<label for="toolbar-toggle"></label>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
2018-07-04 16:23:33 +00:00
|
|
|
<a data-test-create href="{{href-to 'dc.intentions.create'}}" class="type-create">Create</a>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
2018-05-22 15:03:45 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
2020-05-29 15:42:46 +00:00
|
|
|
<SearchBar
|
|
|
|
data-test-intention-filter="true"
|
|
|
|
@value={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
@selected={{filter.selected}}
|
|
|
|
@options={{filter.items}}
|
|
|
|
@onchange={{action (mut filterBy) value='target.value'}}
|
|
|
|
/>
|
2018-05-22 15:03:45 +00:00
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-05-29 15:42:46 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'intention' (if (eq filter.selected.key "") items (filter-by "Action" filter.selected.key items))}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-04-01 08:55:49 +00:00
|
|
|
<ConsulIntentionList
|
|
|
|
@items={{filtered}}
|
|
|
|
@ondelete={{action "route" "delete"}}
|
|
|
|
/>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="empty">
|
2020-05-27 10:23:21 +00:00
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
2020-05-29 15:42:46 +00:00
|
|
|
<h2>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No intentions found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Intentions
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
2020-05-27 10:23:21 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
2020-05-29 15:42:46 +00:00
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No intentions where found matching that search, or you may not have access to view the intentions you are searching for.
|
|
|
|
{{else}}
|
|
|
|
There don't seem to be any intentions, or you may not have access to view intentions yet.
|
|
|
|
{{/if}}
|
2020-05-27 10:23:21 +00:00
|
|
|
</p>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<li class="docs-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_URL'}}/commands/intention" rel="noopener noreferrer" target="_blank">Documentation on intentions</a>
|
|
|
|
</li>
|
|
|
|
<li class="learn-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_LEARN_URL'}}/consul/getting-started/connect" rel="noopener noreferrer" target="_blank">Read the guide</a>
|
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
|
|
|
</BlockSlot>
|
2020-05-29 15:42:46 +00:00
|
|
|
</AppView>
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|