2020-01-28 14:25:52 +00:00
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{title 'Policies'}}
|
|
|
|
{{else}}
|
|
|
|
{{title 'Access Controls'}}
|
|
|
|
{{/if}}
|
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>
|
|
|
|
<BlockSlot @name="content">
|
2018-10-19 15:17:02 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
2020-05-29 15:42:46 +00:00
|
|
|
<SearchBar
|
|
|
|
@value={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
/>
|
2018-10-19 15:17:02 +00:00
|
|
|
{{/if}}
|
2020-05-29 15:42:46 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'policy' items}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-06-23 09:12:04 +00:00
|
|
|
<ConsulPolicyList
|
|
|
|
@items={{sort-by "CreateTime:desc" "Name:asc" filtered}}
|
|
|
|
@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>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|