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|}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#confirmation-dialog confirming=false index=index message="Are you sure you want to delete this Namespace?"}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='action' as |confirm|}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}}
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a data-test-edit href={{href-to 'dc.nspaces.edit' item.Name}}>Edit</a>
|
|
|
|
</li>
|
|
|
|
{{#if (not-eq item.Name 'default')}}
|
|
|
|
<li>
|
|
|
|
<button type="button" class="type-delete" data-test-delete {{action confirm 'delete' item}}>Delete</button>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
</ul>
|
|
|
|
{{/action-group}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='dialog' as |execute cancel message name|}}
|
2019-12-17 18:47:37 +00:00
|
|
|
<p>
|
|
|
|
{{message}}
|
|
|
|
</p>
|
|
|
|
<button type="button" class="type-delete" {{action execute}}>
|
|
|
|
Confirm Delete
|
|
|
|
</button>
|
|
|
|
<button type="button" class="type-cancel" {{action cancel}}>Cancel</button>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/confirmation-dialog}}
|
|
|
|
{{/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}}
|