2020-11-18 11:11:30 +00:00
|
|
|
{{page-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">
|
2021-01-25 18:13:54 +00:00
|
|
|
{{#let
|
|
|
|
|
|
|
|
(hash
|
|
|
|
value=(or sortBy "Action:asc")
|
|
|
|
change=(action (mut sortBy) value="target.selected")
|
|
|
|
)
|
|
|
|
|
|
|
|
(hash
|
|
|
|
access=(hash
|
|
|
|
value=(if access (split access ',') undefined)
|
|
|
|
change=(action (mut access) value="target.selectedItems")
|
2020-12-02 09:16:55 +00:00
|
|
|
)
|
2021-01-25 18:13:54 +00:00
|
|
|
searchproperty=(hash
|
|
|
|
value=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
searchProperties
|
|
|
|
)
|
|
|
|
change=(action (mut searchproperty) value="target.selectedItems")
|
|
|
|
default=searchProperties
|
|
|
|
)
|
|
|
|
)
|
2020-10-26 09:30:07 +00:00
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
api.data
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
as |sort filters items|}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
Intentions <em>{{format-number items.length}} total</em>
|
|
|
|
</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-10-26 09:30:07 +00:00
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<Consul::Intention::SearchBar
|
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
|
|
|
|
@filter={{filters}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<DataWriter
|
|
|
|
@sink={{concat '/' dc '/' nspace '/intention/'}}
|
|
|
|
@type="intention"
|
|
|
|
@ondelete={{refresh-route}}
|
|
|
|
as |writer|>
|
2020-07-09 09:08:47 +00:00
|
|
|
<BlockSlot @name="content">
|
2021-01-25 18:13:54 +00:00
|
|
|
<DataCollection
|
2020-12-02 09:16:55 +00:00
|
|
|
@type="intention"
|
2021-01-25 18:13:54 +00:00
|
|
|
@sort={{sort.value}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Intention::List
|
|
|
|
@items={{collection.items}}
|
|
|
|
@delete={{writer.delete}}
|
|
|
|
as |list|>
|
|
|
|
<list.CustomResourceNotice />
|
|
|
|
<list.Table />
|
|
|
|
</Consul::Intention::List>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No intentions found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Intentions
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
{{#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}}
|
|
|
|
</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>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
2020-10-26 09:30:07 +00:00
|
|
|
</BlockSlot>
|
2021-01-25 18:13:54 +00:00
|
|
|
</DataWriter>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
2020-07-09 09:08:47 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|