mirror of https://github.com/status-im/consul.git
82 lines
3.4 KiB
Handlebars
82 lines
3.4 KiB
Handlebars
|
{{#app-view class="acl list" loading=isLoading}}
|
||
|
{{#block-slot 'header'}}
|
||
|
<h1>
|
||
|
ACL Tokens
|
||
|
</h1>
|
||
|
{{/block-slot}}
|
||
|
{{#block-slot 'actions'}}
|
||
|
<a href="{{href-to 'dc.acls.create'}}" class="type-create">Create</a>
|
||
|
{{/block-slot}}
|
||
|
{{#block-slot 'toolbar'}}
|
||
|
{{#if (gt items.length 0) }}
|
||
|
{{acl-filter filters=typeFilters search=filters.s type=filters.type onchange=(action 'filter')}}
|
||
|
{{/if}}
|
||
|
{{/block-slot}}
|
||
|
{{#block-slot 'content'}}
|
||
|
{{#if (gt filtered.length 0)}}
|
||
|
{{#tabular-collection
|
||
|
items=filtered as |item index|
|
||
|
}}
|
||
|
{{#block-slot 'header'}}
|
||
|
<th>Name</th>
|
||
|
<th>Type</th>
|
||
|
{{/block-slot}}
|
||
|
{{#block-slot 'row'}}
|
||
|
<td data-test-acl="{{item.Name}}">
|
||
|
<a href={{href-to 'dc.acls.edit' item.ID}}>{{item.Name}}</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
{{#if (eq item.Type 'management')}}
|
||
|
<strong>{{item.Type}}</strong>
|
||
|
{{else}}
|
||
|
<span>{{item.Type}}</span>
|
||
|
{{/if}}
|
||
|
</td>
|
||
|
{{/block-slot}}
|
||
|
{{#block-slot 'actions' as |index change checked|}}
|
||
|
{{#confirmation-dialog confirming=false index=index}}
|
||
|
{{#block-slot 'action' as |confirm|}}
|
||
|
{{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}}
|
||
|
<ul>
|
||
|
<li>
|
||
|
<a href={{href-to 'dc.acls.edit' item.ID}}>Edit</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a onclick={{queue (action confirm 'use' item) (action change)}}>Use</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a onclick={{action 'sendClone' item}}>Clone</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a onclick={{action confirm 'delete' item}}>Delete</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
{{/action-group}}
|
||
|
{{/block-slot}}
|
||
|
{{#block-slot 'dialog' as |execute cancel message name|}}
|
||
|
<p>
|
||
|
{{#if (eq name 'delete')}}
|
||
|
Are you sure you want to delete this ACL token?
|
||
|
{{ else if (eq name 'use')}}
|
||
|
Are you sure you want to use this ACL token?
|
||
|
{{/if}}
|
||
|
</p>
|
||
|
<button type="button" class="type-delete" {{action execute}}>
|
||
|
{{#if (eq name 'delete')}}
|
||
|
Confirm Delete
|
||
|
{{ else if (eq name 'use')}}
|
||
|
Confirm Use
|
||
|
{{/if}}
|
||
|
</button>
|
||
|
<button type="button" class="type-cancel" {{action cancel}}>Cancel</button>
|
||
|
{{/block-slot}}
|
||
|
{{/confirmation-dialog}}
|
||
|
{{/block-slot}}
|
||
|
{{/tabular-collection}}
|
||
|
{{else}}
|
||
|
<p>
|
||
|
There are no ACLs.
|
||
|
</p>
|
||
|
{{/if}}
|
||
|
{{/block-slot}}
|
||
|
{{/app-view}}
|