2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
@title="ACLs"
|
|
|
|
as |route|>
|
|
|
|
{{#let
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
(hash
|
|
|
|
value=(or sortBy "Name:asc")
|
|
|
|
change=(action (mut sortBy) value="target.selected")
|
|
|
|
)
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
(hash
|
|
|
|
kind=(hash
|
|
|
|
value=(if kind (split kind ',') undefined)
|
|
|
|
change=(action (mut kind) value="target.selectedItems")
|
|
|
|
)
|
2021-01-25 18:13:54 +00:00
|
|
|
)
|
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
items
|
2020-12-01 15:45:09 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
as |sort filters items|}}
|
2020-12-01 15:45:09 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="notification" as |status type item error|>
|
|
|
|
<Consul::Acl::Notifications
|
|
|
|
@status={{status}}
|
|
|
|
@type={{type}}
|
|
|
|
@error={{error}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
ACL Tokens <em>{{format-number items.length}} total</em>
|
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
{{#if (can "create acls")}}
|
|
|
|
<a data-test-create href="{{href-to 'dc.acls.create'}}" class="type-create">Create</a>
|
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<Consul::Acl::SearchBar
|
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@sort={{sort}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@filter={{filters}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<DataCollection
|
|
|
|
@type="acl"
|
|
|
|
@sort={{sort.value}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Acl::List
|
|
|
|
@items={{collection.items}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@ondelete={{route-action 'delete'}}
|
|
|
|
@onuse={{route-action 'use'}}
|
|
|
|
@onclone={{route-action 'clone'}}
|
|
|
|
>
|
|
|
|
</Consul::Acl::List>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
|
|
|
<EmptyState
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No ACLs found
|
|
|
|
{{else}}
|
|
|
|
Welcome to ACLs
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No ACLs where found matching that search, or you may not have access to view the ACLs you are searching for.
|
|
|
|
{{else}}
|
|
|
|
There don't seem to be any ACLs yet, or you may not have access to view ACLs yet.
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2020-12-01 15:45:09 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/let}}
|
|
|
|
</Route>
|