2020-01-28 14:25:52 +00:00
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{title 'Roles'}}
|
|
|
|
{{else}}
|
|
|
|
{{title 'Access Controls'}}
|
|
|
|
{{/if}}
|
2020-07-29 14:55:38 +00:00
|
|
|
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (or sortBy "Name:asc") as |sort|}}
|
2020-04-08 17:03:18 +00:00
|
|
|
<AppView
|
|
|
|
@class="role 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/roles/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.roles.create'}}" class="type-create">Create</a>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-07-29 14:55:38 +00:00
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0) }}
|
2020-09-01 18:13:11 +00:00
|
|
|
<ConsulRoleSearchBar
|
|
|
|
@search={{search}}
|
2020-05-29 15:42:46 +00:00
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
@onsort={{action (mut sortBy) value="target.selected"}}
|
|
|
|
/>
|
2020-07-29 14:55:38 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (sort-by (comparator 'role' sort) items) as |sorted|}}
|
2020-07-29 14:55:38 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'role' sorted}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-06-23 09:12:04 +00:00
|
|
|
<ConsulRoleList
|
2020-07-29 14:55:38 +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 roles found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Roles
|
|
|
|
{{/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 roles where found matching that search, or you may not have access to view the roles you are searching for.
|
|
|
|
{{else}}
|
|
|
|
There don't seem to be any roles, or you may not have access to view roles 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/role" rel="noopener noreferrer" target="_blank">Documentation on roles</a>
|
|
|
|
</li>
|
|
|
|
<li class="learn-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_API_URL'}}/acl/roles.html" 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 14:55:38 +00:00
|
|
|
{{/let}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
2020-07-29 14:55:38 +00:00
|
|
|
</AppView>
|
|
|
|
{{/let}}
|