2020-01-28 14:25:52 +00:00
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{title 'Policies'}}
|
|
|
|
{{else}}
|
|
|
|
{{title 'Access Controls'}}
|
|
|
|
{{/if}}
|
2020-07-29 18:36:09 +00:00
|
|
|
|
|
|
|
{{#let (selectable-key-values
|
|
|
|
(array "Name:asc" "A to Z")
|
|
|
|
(array "Name:desc" "Z to A")
|
|
|
|
selected=sortBy
|
|
|
|
)
|
|
|
|
as |sort|
|
|
|
|
}}
|
|
|
|
|
2020-04-08 17:03:18 +00:00
|
|
|
<AppView
|
|
|
|
@class="policy list"
|
|
|
|
@loading={{isLoading}}
|
|
|
|
@authorized={{isAuthorized}}
|
|
|
|
@enabled={{isEnabled}}
|
|
|
|
>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="notification" as |status type|>
|
2020-01-22 12:08:29 +00:00
|
|
|
{{partial 'dc/acls/policies/notifications'}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
2020-01-22 12:08:29 +00:00
|
|
|
<h1>
|
|
|
|
Access Controls
|
|
|
|
</h1>
|
2020-05-07 13:57:15 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="nav">
|
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{partial 'dc/acls/nav'}}
|
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="disabled">
|
2020-01-22 12:08:29 +00:00
|
|
|
{{partial 'dc/acls/disabled'}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="authorization">
|
2020-01-22 12:08:29 +00:00
|
|
|
{{partial 'dc/acls/authorization'}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
2020-01-22 12:08:29 +00:00
|
|
|
<a data-test-create href="{{href-to 'dc.acls.policies.create'}}" class="type-create">Create</a>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-07-29 18:36:09 +00:00
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0) }}
|
2020-05-29 15:42:46 +00:00
|
|
|
<SearchBar
|
|
|
|
@value={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2020-07-29 18:36:09 +00:00
|
|
|
@secondary="sort"
|
|
|
|
@selected={{sort.selected}}
|
|
|
|
@options={{sort.items}}
|
|
|
|
@onchange={{action (mut sortBy) value='target.selected.key'}}
|
2020-05-29 15:42:46 +00:00
|
|
|
/>
|
2020-07-29 18:36:09 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
{{#let (sort-by (comparator 'policy' sort.selected.key) items) as |sorted|}}
|
|
|
|
<ChangeableSet @dispatcher={{searchable 'policy' sorted}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-06-23 09:12:04 +00:00
|
|
|
<ConsulPolicyList
|
2020-07-29 18:36:09 +00:00
|
|
|
@items={{filtered}}
|
2020-06-23 09:12:04 +00:00
|
|
|
@ondelete={{action send '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 policies found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Policies
|
|
|
|
{{/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 policies where found matching that search, or you may not have access to view the policies you are searching for.
|
|
|
|
{{else}}
|
|
|
|
There don't seem to be any policies, or you may not have access to view policies 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/acl/policy" rel="noopener noreferrer" target="_blank">Documentation on policies</a>
|
|
|
|
</li>
|
|
|
|
<li class="learn-link">
|
|
|
|
<a href="{{env 'CONSUL_LEARN_URL'}}/consul/security-networking/managing-acl-policies" rel="noopener noreferrer" target="_blank">Read the guide</a>
|
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
2020-07-29 18:36:09 +00:00
|
|
|
{{/let}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-07-29 18:36:09 +00:00
|
|
|
</AppView>
|
|
|
|
{{/let}}
|