github.com/outbrain/consul@v1.4.5/ui-v2/app/templates/dc/acls/tokens/edit.hbs (about) 1 {{#app-view class=(concat 'token ' (if (or isAuthorized isEnabled) 'edit' 'list')) loading=isLoading authorized=isAuthorized enabled=isEnabled}} 2 {{#block-slot 'notification' as |status type|}} 3 {{partial 'dc/acls/tokens/notifications'}} 4 {{/block-slot}} 5 {{#block-slot 'disabled'}} 6 {{partial 'dc/acls/disabled'}} 7 {{/block-slot}} 8 {{#block-slot 'authorization'}} 9 {{partial 'dc/acls/authorization'}} 10 {{/block-slot}} 11 {{#block-slot 'breadcrumbs'}} 12 <ol> 13 <li><a data-test-back href={{href-to 'dc.acls.tokens'}}>All Tokens</a></li> 14 </ol> 15 {{/block-slot}} 16 {{#block-slot 'header'}} 17 <h1> 18 {{#if isAuthorized }} 19 {{#if create }} 20 New Token 21 {{else}} 22 Edit Token 23 {{/if}} 24 {{else}} 25 Access Controls 26 {{/if}} 27 </h1> 28 {{/block-slot}} 29 {{#block-slot 'actions'}} 30 {{#if (not create)}} 31 {{#if (not-eq item.AccessorID token.AccessorID)}} 32 {{#confirmation-dialog message='Are you sure you want to use this ACL token?'}} 33 {{#block-slot 'action' as |confirm|}} 34 <button data-test-use type="button" {{ action confirm 'use' item }}>Use</button> 35 {{/block-slot}} 36 {{#block-slot 'dialog' as |execute cancel message|}} 37 <p> 38 {{message}} 39 </p> 40 <button type="button" class="type-delete" {{action execute}}>Confirm Use</button> 41 <button type="button" class="type-cancel" {{action cancel}}>Cancel</button> 42 {{/block-slot}} 43 {{/confirmation-dialog}} 44 {{/if}} 45 {{#if (not (token/is-legacy item))}} 46 <button type="button" {{ action "clone" item }}>Duplicate</button> 47 {{/if}} 48 {{/if}} 49 {{/block-slot}} 50 {{#block-slot 'content'}} 51 {{#if (token/is-legacy item)}} 52 <p class="notice info"><strong>Update.</strong> We have upgraded our ACL system by allowing you to create reusable policies which you can then apply to tokens. Don't worry, even though this token was written in the old style, it is still valid. However, we do recommend upgrading your old tokens to the new style. Learn how in our <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl-migrate-tokens.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p> 53 {{/if}} 54 {{#if (not create) }} 55 <div> 56 <dl> 57 <dt>AccessorID</dt> 58 <dd> 59 {{copy-button-feedback title="Copy AccessorID to the clipboard" copy=item.AccessorID name="AccessorID"}} {{item.AccessorID}} 60 </dd> 61 <dt>Token</dt> 62 <dd> 63 {{copy-button-feedback title="Copy SecretID to the clipboard" copy=item.SecretID name="Token"}} {{#secret-button}}{{item.SecretID}}{{/secret-button}} 64 </dd> 65 {{#if (and (not (token/is-legacy item)) (not create))}} 66 <dt>Scope</dt> 67 <dd> 68 {{if item.Local 'local' 'global' }} 69 </dd> 70 {{/if}} 71 </dl> 72 </div> 73 {{/if}} 74 {{ partial 'dc/acls/tokens/form'}} 75 {{/block-slot}} 76 {{/app-view}}