2020-01-28 14:25:52 +00:00
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{title 'Roles'}}
|
|
|
|
{{else}}
|
|
|
|
{{title 'Access Controls'}}
|
|
|
|
{{/if}}
|
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>
|
|
|
|
<BlockSlot @name="content">
|
2019-05-01 18:09:29 +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"}}
|
|
|
|
/>
|
2019-05-01 18:09:29 +00:00
|
|
|
{{/if}}
|
2020-05-29 15:42:46 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'role' items}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-06-23 09:12:04 +00:00
|
|
|
<ConsulRoleList
|
|
|
|
@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 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>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|