2020-01-28 14:25:52 +00:00
|
|
|
{{#if isAuthorized }}
|
2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'Policies'}}
|
2020-01-28 14:25:52 +00:00
|
|
|
{{else}}
|
2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'Access Controls'}}
|
2020-01-28 14:25:52 +00:00
|
|
|
{{/if}}
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (hash
|
2020-11-13 15:55:40 +00:00
|
|
|
kinds=(if kind (split kind ',') undefined)
|
2020-09-01 18:13:11 +00:00
|
|
|
dcs=(if dc (split dc ',') undefined)
|
2020-12-01 15:45:09 +00:00
|
|
|
searchproperties=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
(array 'Name' 'Description')
|
|
|
|
)
|
2020-09-01 18:13:11 +00:00
|
|
|
) as |filters|}}
|
|
|
|
{{#let (or sortBy "Name:asc") as |sort|}}
|
|
|
|
<AppView
|
|
|
|
@authorized={{isAuthorized}}
|
|
|
|
@enabled={{isEnabled}}
|
|
|
|
>
|
2020-10-19 16:31:01 +00:00
|
|
|
<BlockSlot @name="notification" as |status type item error|>
|
|
|
|
<Consul::Policy::Notifications
|
|
|
|
@type={{type}}
|
|
|
|
@status={{status}}
|
|
|
|
@item={{item}}
|
|
|
|
@error={{error}}
|
|
|
|
/>
|
2020-09-01 18:13:11 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
Access Controls
|
|
|
|
</h1>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="nav">
|
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{partial 'dc/acls/nav'}}
|
|
|
|
{{/if}}
|
2020-08-11 17:02:51 +00:00
|
|
|
</BlockSlot>
|
2020-09-01 18:13:11 +00:00
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<a data-test-create href="{{href-to 'dc.acls.policies.create'}}" class="type-create">Create</a>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0) }}
|
2020-10-14 08:03:39 +00:00
|
|
|
<Consul::Policy::SearchBar
|
2020-09-01 18:13:11 +00:00
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
@onsort={{action (mut sortBy) value="target.selected"}}
|
|
|
|
|
|
|
|
@filter={{filters}}
|
|
|
|
@onfilter={{hash
|
2020-12-01 15:45:09 +00:00
|
|
|
searchproperty=(action (mut searchproperty) value="target.selectedItems")
|
2020-09-01 18:13:11 +00:00
|
|
|
dc=(action (mut dc) value="target.selectedItems")
|
2020-11-13 15:55:40 +00:00
|
|
|
kind=(action (mut kind) value="target.selectedItems")
|
2020-09-01 18:13:11 +00:00
|
|
|
}}
|
2020-06-23 09:12:04 +00:00
|
|
|
/>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-09-01 18:13:11 +00:00
|
|
|
<BlockSlot @name="content">
|
2020-12-01 15:45:09 +00:00
|
|
|
<DataCollection
|
|
|
|
@type="role"
|
|
|
|
@sort={{sort}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
2020-10-14 08:03:39 +00:00
|
|
|
<Consul::Policy::List
|
2020-12-01 15:45:09 +00:00
|
|
|
@items={{collection.items}}
|
|
|
|
@ondelete={{route-action 'delete'}}
|
2020-09-01 18:13:11 +00:00
|
|
|
/>
|
2020-12-01 15:45:09 +00:00
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
2020-09-01 18:13:11 +00:00
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
|
|
|
{{#if (gt items.length 0)}}
|
|
|
|
No policies found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Policies
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
{{#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}}
|
|
|
|
</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-12-01 15:45:09 +00:00
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-09-01 18:13:11 +00:00
|
|
|
</AppView>
|
2020-07-29 18:36:09 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|