2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Namespaces'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#app-view class="nspace list" loading=isLoading}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='notification' as |status type subject|}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{partial 'dc/nspaces/notifications'}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='header'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
<h1>
|
|
|
|
Namespaces
|
|
|
|
</h1>
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='actions'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
<a data-test-create href="{{href-to 'dc.nspaces.create'}}" class="type-create">Create</a>
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='content'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<form class="filter-bar">
|
|
|
|
{{freetext-filter searchable=searchable value=s placeholder="Search"}}
|
|
|
|
</form>
|
|
|
|
{{/if}}
|
|
|
|
{{#changeable-set dispatcher=searchable}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='set' as |filtered|}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#tabular-collection
|
|
|
|
items=filtered as |item index|
|
|
|
|
}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='header'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Description</th>
|
|
|
|
{{#if (env 'CONSUL_ACLS_ENABLED')}}
|
|
|
|
<th>Roles & Policies</th>
|
|
|
|
{{/if}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='row'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#if item.DeletedAt}}
|
|
|
|
<td class="no-actions" colspan="3">
|
|
|
|
<p>
|
|
|
|
Deleting {{item.Name}}...
|
|
|
|
</p>
|
|
|
|
</td>
|
|
|
|
{{else}}
|
|
|
|
<td data-test-namespace={{item.Name}}>
|
|
|
|
<a href={{href-to 'dc.nspaces.edit' item.Name}}>{{item.Name}}</a>
|
|
|
|
</td>
|
|
|
|
<td data-test-description>
|
|
|
|
<p>{{item.Description}}</p>
|
|
|
|
</td>
|
|
|
|
{{#if (env 'CONSUL_ACLS_ENABLED')}}
|
|
|
|
<td>
|
|
|
|
{{#each (compact (append item.ACLs.PolicyDefaults item.ACLs.RoleDefaults)) as |item|}}
|
|
|
|
<strong data-test-policy class={{policy/typeof item}}>{{item.Name}}</strong>
|
|
|
|
{{/each}}
|
|
|
|
</td>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='actions' as |index change checked|}}
|
2020-01-22 12:08:29 +00:00
|
|
|
{{#popover-menu expanded=(if (eq checked index) true false) onchange=(action change index) keyboardAccess=false}}
|
|
|
|
{{#block-slot name='trigger'}}
|
|
|
|
More
|
2019-12-17 18:47:37 +00:00
|
|
|
{{/block-slot}}
|
2020-01-22 12:08:29 +00:00
|
|
|
{{#block-slot name='menu' as |confirm send keypressClick|}}
|
|
|
|
<li role="none">
|
|
|
|
<a data-test-edit role="menuitem" tabindex="-1" href={{href-to 'dc.nspaces.edit' item.Name}}>Edit</a>
|
|
|
|
</li>
|
2020-01-24 12:26:28 +00:00
|
|
|
{{#if (not-eq item.Name 'default') }}
|
2020-01-22 12:08:29 +00:00
|
|
|
<li role="none" class="dangerous">
|
|
|
|
<label for={{confirm}} role="menuitem" tabindex="-1" onkeypress={{keypressClick}} data-test-delete>Delete</label>
|
|
|
|
<div role="menu">
|
|
|
|
<div class="confirmation-alert warning">
|
|
|
|
<div>
|
|
|
|
<header>
|
|
|
|
Confirm Delete
|
|
|
|
</header>
|
|
|
|
<p>
|
|
|
|
Are you sure you want to delete this key?
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<ul>
|
|
|
|
<li class="dangerous">
|
|
|
|
<button tabindex="-1" type="button" class="type-delete" onclick={{action send 'delete' item}}>Delete</button>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label for={{confirm}}>Cancel</label>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
2020-01-24 12:26:28 +00:00
|
|
|
{{/if}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{/block-slot}}
|
2020-01-22 12:08:29 +00:00
|
|
|
{{/popover-menu}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{/block-slot}}
|
|
|
|
{{/tabular-collection}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='empty'}}
|
2019-12-17 18:47:37 +00:00
|
|
|
<p>
|
|
|
|
There are no Namespaces.
|
|
|
|
</p>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/changeable-set}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/app-view}}
|