2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Intentions'}}
|
2020-07-09 09:08:47 +00:00
|
|
|
<DataLoader @src={{concat '/' nspace '/' dc '/intentions'}} as |api|>
|
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError @error={{api.error}} />
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let api.data as |items|}}
|
|
|
|
{{#let (hash
|
|
|
|
accesses=(if access (split access ',') undefined)
|
|
|
|
) as |filters|}}
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (or sortBy "Action:asc") as |sort|}}
|
2020-07-09 09:08:47 +00:00
|
|
|
<AppView @class="intention list">
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2020-09-01 18:13:11 +00:00
|
|
|
Intentions <em>{{format-number items.length}} total</em>
|
2020-07-09 09:08:47 +00:00
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<a data-test-create href="{{href-to 'dc.intentions.create'}}" class="type-create">Create</a>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<ConsulIntentionSearchBar
|
|
|
|
@search={{search}}
|
2020-07-09 09:08:47 +00:00
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
@onsort={{action (mut sortBy) value="target.selected"}}
|
|
|
|
|
|
|
|
@filter={{filters}}
|
|
|
|
@onfilter={{hash
|
|
|
|
access=(action (mut access) value="target.selectedItems")
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
2020-07-09 09:08:47 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (filter (filter-predicate 'intention' filters) items) as |filtered|}}
|
|
|
|
{{#let (sort-by (comparator 'intention' sort) filtered) as |sorted|}}
|
2020-07-28 15:06:32 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'intention' sorted}} @terms={{search}}>
|
2020-09-01 18:13:11 +00:00
|
|
|
<BlockSlot @name="content" as |searched|>
|
2020-07-09 09:08:47 +00:00
|
|
|
<ConsulIntentionList
|
2020-09-01 18:13:11 +00:00
|
|
|
@items={{searched}}
|
2020-07-09 09:08:47 +00:00
|
|
|
@ondelete={{refresh-route}}
|
|
|
|
>
|
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#if (gt items.length 0)}}
|
2020-07-09 09:08:47 +00:00
|
|
|
No intentions found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Intentions
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#if (gt items.length 0)}}
|
2020-07-09 09:08:47 +00:00
|
|
|
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}}
|
|
|
|
</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>
|
|
|
|
</ConsulIntentionList>
|
2020-05-27 10:23:21 +00:00
|
|
|
</BlockSlot>
|
2020-07-09 09:08:47 +00:00
|
|
|
</ChangeableSet>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-07-09 09:08:47 +00:00
|
|
|
</AppView>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
2020-07-09 09:08:47 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|