github.com/outbrain/consul@v1.4.5/ui-v2/app/templates/dc/acls/index.hbs (about) 1 {{#app-view class="acl list" loading=isLoading}} 2 {{#block-slot 'notification' as |status type|}} 3 {{partial 'dc/acls/notifications'}} 4 {{/block-slot}} 5 {{#block-slot 'header'}} 6 <h1> 7 ACL Tokens 8 </h1> 9 <label for="toolbar-toggle"></label> 10 {{/block-slot}} 11 {{#block-slot 'actions'}} 12 <a data-test-create href="{{href-to 'dc.acls.create'}}" class="type-create">Create</a> 13 {{/block-slot}} 14 {{#block-slot 'toolbar'}} 15 {{#if (gt items.length 0) }} 16 {{acl-filter filters=typeFilters search=filters.s type=filters.type onchange=(action 'filter')}} 17 {{/if}} 18 {{/block-slot}} 19 {{#block-slot 'content'}} 20 {{#if (gt filtered.length 0)}} 21 {{#tabular-collection 22 items=(sort-by 'Name:asc' filtered) as |item index| 23 }} 24 {{#block-slot 'header'}} 25 <th>Name</th> 26 <th>Type</th> 27 {{/block-slot}} 28 {{#block-slot 'row'}} 29 <td data-test-acl="{{item.Name}}"> 30 <a href={{href-to 'dc.acls.edit' item.ID}}>{{item.Name}}</a> 31 </td> 32 <td> 33 {{#if (eq item.Type 'management')}} 34 <strong>{{item.Type}}</strong> 35 {{else}} 36 <span>{{item.Type}}</span> 37 {{/if}} 38 </td> 39 {{/block-slot}} 40 {{#block-slot 'actions' as |index change checked|}} 41 {{#confirmation-dialog confirming=false index=index}} 42 {{#block-slot 'action' as |confirm|}} 43 {{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}} 44 <ul> 45 <li> 46 <a data-test-edit href={{href-to 'dc.acls.edit' item.ID}}>Edit</a> 47 </li> 48 {{#if (eq item.ID token.SecretID) }} 49 <li> 50 <a data-test-logout onclick={{queue (action confirm 'logout' item) (action change)}}>Stop using</a> 51 </li> 52 {{else}} 53 54 <li> 55 <a data-test-use onclick={{queue (action confirm 'use' item) (action change)}}>Use</a> 56 </li> 57 {{/if}} 58 <li> 59 <a data-test-clone onclick={{action 'sendClone' item}}>Clone</a> 60 </li> 61 {{# if (not-eq item.ID 'anonymous') }} 62 <li> 63 <a data-test-delete onclick={{action confirm 'delete' item}}>Delete</a> 64 </li> 65 {{/if}} 66 </ul> 67 {{/action-group}} 68 {{/block-slot}} 69 {{#block-slot 'dialog' as |execute cancel message name|}} 70 <p> 71 {{#if (eq name 'delete')}} 72 Are you sure you want to delete this ACL token? 73 {{else if (eq name 'logout')}} 74 Are you sure you want to stop using this ACL token? This will log you out. 75 {{ else if (eq name 'use')}} 76 Are you sure you want to use this ACL token? 77 {{/if}} 78 </p> 79 <button type="button" class="type-delete" {{action execute}}> 80 {{#if (eq name 'delete')}} 81 Confirm Delete 82 {{else if (eq name 'logout')}} 83 Confirm Logout 84 {{ else if (eq name 'use')}} 85 Confirm Use 86 {{/if}} 87 </button> 88 <button type="button" class="type-cancel" {{action cancel}}>Cancel</button> 89 {{/block-slot}} 90 {{/confirmation-dialog}} 91 {{/block-slot}} 92 {{/tabular-collection}} 93 {{else}} 94 <p> 95 There are no ACLs. 96 </p> 97 {{/if}} 98 {{/block-slot}} 99 {{/app-view}}