696aeb7840
* ui: Styling fixes (#7885) * Move cellHeight to ListCollection js file * Fix composite row border-top-color onHover state * Add empty health check icon to CompositeRow styling * ui: Slightly refactor %composite-rows and reuse ConsulServiceList component (#7886) * ui: Move individual component types into a single %composite-list plus 1. Removes all out separate CSS components (that match HTML components) to favour not having those separate for the moemnt at least 2. Reuses <ConsulServiceList /> component for Terminating Gateways > Linked Services * ui: Tweak breadcrumb spacing for '/' separator * Fix up the tests i.e. services per tab so we can call them all services * ui: Misc discovery chain fixes (#7892) 1. Look for a default splitter before looking for a default resolver in order to route to. 2. Delay adding svg listeners until afterRender (fixes split tooltip) 3. Make router id's consistent for highlighting default routers in when clicking the graph * ui: If an error occurs on the server, surface it in the notification (#7893) * ui: Delete old unused CSS (#7909) This commit deletes CSS that we no longer use and we definitely will not ever use. We also dedup all of our imports here as it turns out SASS doesn't dedupe imports. Strangely this increases out CSS weight by ~1kb instead of reducing but we'd rather keep things deduped as that was the intention * ui: Redesign - Exposed Paths (#7912) * Add new exposed paths icons to codebase * Redesign Exposed Paths and create copy-button hover on Composite Row * Refactor FeedbackDialog and CopyButton * Change this.element to use `{{ref }}` now we don't have an element We changed this to a tagless component with an eye to moving this to a glimmer component, without spotting that this would also remove the `this.element` property. This adds an equivalent using the ref modifier. Co-authored-by: John Cowen <jcowen@hashicorp.com> * ui: Remove box-shadow and pointer cursor from metada list hover effect (#7914) Co-authored-by: Kenia <19161242+kaxcode@users.noreply.github.com>
90 lines
3.1 KiB
Handlebars
90 lines
3.1 KiB
Handlebars
{{#if isAuthorized }}
|
|
{{#if create}}
|
|
{{title 'New Token'}}
|
|
{{else}}
|
|
{{title 'Edit Token'}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{title 'Access Controls'}}
|
|
{{/if}}
|
|
<AppView
|
|
@class={{concat "token " (if isAuthorized "edit" "list")}}
|
|
@loading={{isLoading}}
|
|
@authorized={{isAuthorized}}
|
|
@enabled={{isEnabled}}
|
|
>
|
|
<BlockSlot @name="notification" as |status type item error|>
|
|
{{partial 'dc/acls/tokens/notifications'}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="disabled">
|
|
{{partial 'dc/acls/disabled'}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="authorization">
|
|
{{partial 'dc/acls/authorization'}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="breadcrumbs">
|
|
<ol>
|
|
<li><a data-test-back href={{href-to 'dc.acls.tokens'}}>All Tokens</a></li>
|
|
</ol>
|
|
</BlockSlot>
|
|
<BlockSlot @name="header">
|
|
<h1>
|
|
{{#if isAuthorized }}
|
|
{{#if create }}
|
|
New Token
|
|
{{else}}
|
|
Edit Token
|
|
{{/if}}
|
|
{{else}}
|
|
Access Controls
|
|
{{/if}}
|
|
</h1>
|
|
</BlockSlot>
|
|
<BlockSlot @name="actions">
|
|
{{#if (not create)}}
|
|
{{#if (not-eq item.AccessorID token.AccessorID)}}
|
|
<ConfirmationDialog @message="Are you sure you want to use this ACL token?">
|
|
<BlockSlot @name="action" as |confirm|>
|
|
<button data-test-use type="button" {{ action confirm 'use' item }}>Use</button>
|
|
</BlockSlot>
|
|
<BlockSlot @name="dialog" as |execute cancel message|>
|
|
<p>
|
|
{{message}}
|
|
</p>
|
|
<button type="button" class="type-delete" {{action execute}}>Confirm Use</button>
|
|
<button type="button" class="type-cancel" {{action cancel}}>Cancel</button>
|
|
</BlockSlot>
|
|
</ConfirmationDialog>
|
|
{{/if}}
|
|
{{#if (not (token/is-legacy item))}}
|
|
<button data-test-clone type="button" {{ action "clone" item }}>Duplicate</button>
|
|
{{/if}}
|
|
{{/if}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="content">
|
|
{{#if (token/is-legacy item)}}
|
|
<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_DOCS_URL'}}/guides/acl-migrate-tokens.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
|
|
{{/if}}
|
|
{{#if (not create) }}
|
|
<div>
|
|
<dl>
|
|
<dt>AccessorID</dt>
|
|
<dd>
|
|
<CopyButton @value={{item.AccessorID}} @name="AccessorID" /> {{item.AccessorID}}
|
|
</dd>
|
|
<dt>Token</dt>
|
|
<dd>
|
|
<CopyButton @value={{item.SecretID}} @name="Token" /> <SecretButton>{{item.SecretID}}</SecretButton>
|
|
</dd>
|
|
{{#if (and (not (token/is-legacy item)) (not create))}}
|
|
<dt>Scope</dt>
|
|
<dd>
|
|
{{if item.Local 'local' 'global' }}
|
|
</dd>
|
|
{{/if}}
|
|
</dl>
|
|
</div>
|
|
{{/if}}
|
|
{{ partial 'dc/acls/tokens/form'}}
|
|
</BlockSlot>
|
|
</AppView> |