From f002e146739efb97cfe2650e750d98e95131babe Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Fri, 16 Feb 2024 02:19:43 -0800 Subject: [PATCH] [Admin UI] Adopt HDS::Copy::Snippet (#2141) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 💡 Adopt HDS copy snippet Adopt HDS copy snippet and delete usage of Copyable custom component within Admin UI. --- .../accounts/account/header/index.hbs | 8 +-- .../auth-methods/auth-method/header/index.hbs | 8 +-- .../managed-group/header/index.hbs | 8 +-- ui/admin/app/components/copyable/index.hbs | 35 ---------- ui/admin/app/components/copyable/index.js | 68 ------------------- .../credential-store/header/index.hbs | 8 +-- .../components/groups/group/header/index.hbs | 8 +-- .../host-catalog/header/index.hbs | 8 +-- .../host-sets/host-set/header/index.hbs | 8 +-- .../host-set/hosts/host/header/index.hbs | 8 +-- .../host-catalog/hosts/host/header/index.hbs | 8 +-- .../components/roles/role/header/index.hbs | 8 +-- .../targets/target/header/index.hbs | 8 +-- .../components/users/user/header/index.hbs | 8 +-- ui/admin/app/styles/app.scss | 49 ------------- .../app/templates/authentication-error.hbs | 8 +-- ui/admin/app/templates/onboarding/success.hbs | 8 +-- .../accounts/account/set-password.hbs | 8 +-- .../auth-method/accounts/index.hbs | 22 +++--- .../auth-method/managed-groups/index.hbs | 22 +++--- .../managed-groups/managed-group/members.hbs | 11 ++- .../scopes/scope/auth-methods/index.hbs | 11 ++- .../credential-library/index.hbs | 8 +-- .../credentials/credential/index.hbs | 8 +-- ui/admin/app/templates/scopes/scope/edit.hbs | 8 +-- .../scopes/scope/groups/group/members.hbs | 11 ++- .../templates/scopes/scope/groups/index.hbs | 11 ++- .../host-catalog/hosts/index.hbs | 11 ++- .../templates/scopes/scope/roles/index.hbs | 11 ++- .../scopes/scope/roles/role/grants.hbs | 8 +-- .../scopes/scope/roles/role/principals.hbs | 19 ++---- .../channels-by-connection/channel.hbs | 33 ++++----- .../channels-by-connection/index.hbs | 33 ++++----- .../templates/scopes/scope/sessions/index.hbs | 11 ++- .../scopes/scope/storage-buckets/index.hbs | 11 ++- .../storage-buckets/storage-bucket/index.hbs | 8 +-- .../templates/scopes/scope/targets/index.hbs | 22 +++--- .../target/brokered-credential-sources.hbs | 11 ++- .../scope/targets/target/host-sources.hbs | 11 ++- ...njected-application-credential-sources.hbs | 11 ++- .../templates/scopes/scope/users/index.hbs | 11 ++- .../scopes/scope/users/user/accounts.hbs | 11 ++- .../templates/scopes/scope/workers/index.hbs | 11 ++- .../scopes/scope/workers/worker/index.hbs | 8 +-- ui/admin/ember-cli-build.js | 7 -- ui/admin/package.json | 1 - .../acceptance/onboarding/success-test.js | 7 +- .../integration/components/copyable-test.js | 25 ------- 48 files changed, 135 insertions(+), 530 deletions(-) delete mode 100644 ui/admin/app/components/copyable/index.hbs delete mode 100644 ui/admin/app/components/copyable/index.js delete mode 100644 ui/admin/tests/integration/components/copyable-test.js diff --git a/ui/admin/app/components/auth-methods/auth-method/accounts/account/header/index.hbs b/ui/admin/app/components/auth-methods/auth-method/accounts/account/header/index.hbs index c795a27da..bf3a86514 100644 --- a/ui/admin/app/components/auth-methods/auth-method/accounts/account/header/index.hbs +++ b/ui/admin/app/components/auth-methods/auth-method/accounts/account/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.account.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/auth-methods/auth-method/header/index.hbs b/ui/admin/app/components/auth-methods/auth-method/header/index.hbs index 9ec053c89..90d8c7722 100644 --- a/ui/admin/app/components/auth-methods/auth-method/header/index.hbs +++ b/ui/admin/app/components/auth-methods/auth-method/header/index.hbs @@ -13,10 +13,4 @@

{{t 'resources.auth-method.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/header/index.hbs b/ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/header/index.hbs index ff358d721..94bea1f50 100644 --- a/ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/header/index.hbs +++ b/ui/admin/app/components/auth-methods/auth-method/managed-groups/managed-group/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.managed-group.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/copyable/index.hbs b/ui/admin/app/components/copyable/index.hbs deleted file mode 100644 index 46f7584cc..000000000 --- a/ui/admin/app/components/copyable/index.hbs +++ /dev/null @@ -1,35 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: MPL-2.0 -}} - - - - {{#if this.copied}} - - {{yield}} - - {{else}} - - {{yield}} - - {{/if}} - - {{#if this.isClipboardLibrarySupported}} - - {{this.actionText}} - - {{/if}} - \ No newline at end of file diff --git a/ui/admin/app/components/copyable/index.js b/ui/admin/app/components/copyable/index.js deleted file mode 100644 index 440aba1ec..000000000 --- a/ui/admin/app/components/copyable/index.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: MPL-2.0 - */ - -import Component from '@glimmer/component'; -import ClipboardJS from 'clipboard'; -import { action } from '@ember/object'; -import { generateComponentID } from 'rose/utilities/component-auto-id'; -import { tracked } from '@glimmer/tracking'; -import { later } from '@ember/runloop'; - -export default class CopyableComponent extends Component { - // =attributes - - id = generateComponentID(); - copyableButtonId = `copyable-button-${this.id}`; - - actionIcon = 'flight-icons/svg/clipboard-copy-16'; - successIcon = 'flight-icons/svg/clipboard-checked-16'; - actionText = this.args.buttonText; - successText = this.args.acknowledgeText; - - @tracked copied = false; - - clipboard = null; - - confirmCopy() { - this.copied = true; - later(() => (this.copied = false), 1000); - } - - /** - * Checks for ClipboardJS support. - * @return {boolean} - */ - get isClipboardLibrarySupported() { - return ClipboardJS.isSupported(); - } - - // =actions - - /** - * Initialize ClipboardJS library and register for it's events. - */ - @action - register() { - this.tearDown(); - /* istanbul ignore next */ - this.clipboard = new ClipboardJS(`#${this.copyableButtonId}`, { - text: () => this.args.text, - }); - /* istanbul ignore next */ - this.clipboard.on('success', (clipboardEvent) => { - clipboardEvent.clearSelection(); - this.confirmCopy(); - }); - } - - /** - * Destroy ClipboardJS library instance and cancel icon timer. - */ - @action - tearDown() { - this.clipboard?.destroy(); - this.clipboard = null; - } -} diff --git a/ui/admin/app/components/credential-stores/credential-store/header/index.hbs b/ui/admin/app/components/credential-stores/credential-store/header/index.hbs index 9f7a8a086..1da6b3fae 100644 --- a/ui/admin/app/components/credential-stores/credential-store/header/index.hbs +++ b/ui/admin/app/components/credential-stores/credential-store/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.credential-store.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/groups/group/header/index.hbs b/ui/admin/app/components/groups/group/header/index.hbs index e91a0c495..62e693cbd 100644 --- a/ui/admin/app/components/groups/group/header/index.hbs +++ b/ui/admin/app/components/groups/group/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.group.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/host-catalogs/host-catalog/header/index.hbs b/ui/admin/app/components/host-catalogs/host-catalog/header/index.hbs index bcab3486d..6779286e3 100644 --- a/ui/admin/app/components/host-catalogs/host-catalog/header/index.hbs +++ b/ui/admin/app/components/host-catalogs/host-catalog/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.host-catalog.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/header/index.hbs b/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/header/index.hbs index 66f3102cc..82761ce88 100644 --- a/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/header/index.hbs +++ b/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.host-set.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/hosts/host/header/index.hbs b/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/hosts/host/header/index.hbs index 91490ddb5..f7b2bd330 100644 --- a/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/hosts/host/header/index.hbs +++ b/ui/admin/app/components/host-catalogs/host-catalog/host-sets/host-set/hosts/host/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.host.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/host-catalogs/host-catalog/hosts/host/header/index.hbs b/ui/admin/app/components/host-catalogs/host-catalog/hosts/host/header/index.hbs index 91490ddb5..f7b2bd330 100644 --- a/ui/admin/app/components/host-catalogs/host-catalog/hosts/host/header/index.hbs +++ b/ui/admin/app/components/host-catalogs/host-catalog/hosts/host/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.host.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/roles/role/header/index.hbs b/ui/admin/app/components/roles/role/header/index.hbs index 6559610b6..a156cf1ac 100644 --- a/ui/admin/app/components/roles/role/header/index.hbs +++ b/ui/admin/app/components/roles/role/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.role.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/targets/target/header/index.hbs b/ui/admin/app/components/targets/target/header/index.hbs index 68c6ee8cf..a99f10ff2 100644 --- a/ui/admin/app/components/targets/target/header/index.hbs +++ b/ui/admin/app/components/targets/target/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.target.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/components/users/user/header/index.hbs b/ui/admin/app/components/users/user/header/index.hbs index 6fd4434de..f353a58ed 100644 --- a/ui/admin/app/components/users/user/header/index.hbs +++ b/ui/admin/app/components/users/user/header/index.hbs @@ -8,10 +8,4 @@

{{t 'resources.user.description'}}

- - {{@model.id}} - \ No newline at end of file + \ No newline at end of file diff --git a/ui/admin/app/styles/app.scss b/ui/admin/app/styles/app.scss index 27f7e2563..a8de2774e 100644 --- a/ui/admin/app/styles/app.scss +++ b/ui/admin/app/styles/app.scss @@ -174,33 +174,6 @@ } } -.copyable { - white-space: nowrap; - - .copyable-button { - margin: 0; - padding: 0 sizing.rems(xxs); - position: relative; - top: -2px; - } - - mark { - animation: fade-background 0.75s linear; - background-color: transparent; - color: inherit; - - @keyframes fade-background { - 0% { - background-color: var(--action-subtler-1); - } - - 100% { - background-color: transparent; - } - } - } -} - [class*='session-status-'] { color: var(--ui-gray-subtler-2); } @@ -284,29 +257,7 @@ } .create-resources-item-controller-copyable { - display: flex; - flex-direction: column; - flex-wrap: wrap; - justify-content: center; - border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-2); - border-radius: sizing.rems(xxxs); - color: var(--action); - height: (sizing.rems(xs) * 5); margin: sizing.rems(xxs) 0 sizing.rems(l) 0; - - .copyable { - display: flex; - justify-content: space-between; - padding: sizing.rems(s); - - span { - display: flex; - } - } - - .copyable-button { - top: 0; // This is to override a negative top declared above - } } .image-container > svg { diff --git a/ui/admin/app/templates/authentication-error.hbs b/ui/admin/app/templates/authentication-error.hbs index 929b6aa57..937639dc2 100644 --- a/ui/admin/app/templates/authentication-error.hbs +++ b/ui/admin/app/templates/authentication-error.hbs @@ -10,13 +10,7 @@ {{t 'auth.descriptions.flow-error'}}
- - {{t 'actions.copy-error-detail-to-clipboard'}} - +
\ No newline at end of file diff --git a/ui/admin/app/templates/onboarding/success.hbs b/ui/admin/app/templates/onboarding/success.hbs index 3366afad6..5387cedf1 100644 --- a/ui/admin/app/templates/onboarding/success.hbs +++ b/ui/admin/app/templates/onboarding/success.hbs @@ -54,13 +54,7 @@ 'onboarding.success.descriptions.controller' }}
- - {{this.model.clusterUrl}} - +
diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs index 63b90f01a..33dd16ca2 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password.hbs @@ -18,13 +18,7 @@

{{t 'resources.account.title'}}

{{t 'resources.account.messages.set-password.description'}}

- - {{@model.id}} - +
diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs index ce4206b15..ad2e2e494 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs @@ -69,13 +69,10 @@ - - {{B.data.id}} - + @@ -154,13 +151,10 @@ - - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs index 29bb2563b..8c343829c 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/index.hbs @@ -51,13 +51,10 @@ {{B.data.description}} - - {{B.data.id}} - + @@ -91,13 +88,10 @@ {{B.data.description}} - - {{B.data.id}} - + {{truncate-list 'actions.more' B.data.group_names 3}} diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs index 3c2aa6451..b90a8aece 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/members.hbs @@ -61,13 +61,10 @@ {{B.data.full_name}} - - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs index f86fe2b52..53e9d0fbc 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs @@ -146,13 +146,10 @@ /> - - {{B.data.id}} - + {{#if B.data.isPrimary}} diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.hbs index d00c75d42..3feedaa4f 100644 --- a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.hbs +++ b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credential-libraries/credential-library/index.hbs @@ -15,13 +15,7 @@

{{t 'resources.credential-library.description'}}

- - {{@model.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credentials/credential/index.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credentials/credential/index.hbs index c506c3e98..eedd4f12c 100644 --- a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credentials/credential/index.hbs +++ b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/credentials/credential/index.hbs @@ -15,13 +15,7 @@

{{t 'resources.credential.description'}}

- - {{@model.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/edit.hbs b/ui/admin/app/templates/scopes/scope/edit.hbs index 66c77e7c6..75796eb80 100644 --- a/ui/admin/app/templates/scopes/scope/edit.hbs +++ b/ui/admin/app/templates/scopes/scope/edit.hbs @@ -41,13 +41,7 @@

{{t 'resources.project.description'}}

{{/if}} - - {{@model.id}} - + {{#if (can 'read model' @model)}} diff --git a/ui/admin/app/templates/scopes/scope/groups/group/members.hbs b/ui/admin/app/templates/scopes/scope/groups/group/members.hbs index a73f523c8..cee9590d1 100644 --- a/ui/admin/app/templates/scopes/scope/groups/group/members.hbs +++ b/ui/admin/app/templates/scopes/scope/groups/group/members.hbs @@ -54,13 +54,10 @@
- - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/groups/index.hbs b/ui/admin/app/templates/scopes/scope/groups/index.hbs index c08bb2e0d..4e20eaf77 100644 --- a/ui/admin/app/templates/scopes/scope/groups/index.hbs +++ b/ui/admin/app/templates/scopes/scope/groups/index.hbs @@ -52,13 +52,10 @@

{{B.data.description}}

- - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs index c98274cb4..bf260305a 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs @@ -52,13 +52,10 @@ - - {{B.data.id}} - + {{B.data.address}} diff --git a/ui/admin/app/templates/scopes/scope/roles/index.hbs b/ui/admin/app/templates/scopes/scope/roles/index.hbs index 96981c53c..b2b85ec67 100644 --- a/ui/admin/app/templates/scopes/scope/roles/index.hbs +++ b/ui/admin/app/templates/scopes/scope/roles/index.hbs @@ -54,13 +54,10 @@

{{B.data.description}}

- - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/roles/role/grants.hbs b/ui/admin/app/templates/scopes/scope/roles/role/grants.hbs index 01b601ba9..dad5a01d4 100644 --- a/ui/admin/app/templates/scopes/scope/roles/role/grants.hbs +++ b/ui/admin/app/templates/scopes/scope/roles/role/grants.hbs @@ -21,13 +21,7 @@

{{t 'resources.role.grant.description'}}

- - {{@model.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs b/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs index 277ba7626..1326bd7d6 100644 --- a/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs +++ b/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs @@ -21,13 +21,7 @@

{{t 'resources.role.principal.description'}}

- - {{@model.role.id}} - + @@ -65,13 +59,10 @@ {{/if}} - - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs b/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs index 1dd6a983f..f2e575646 100644 --- a/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs +++ b/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs @@ -26,13 +26,10 @@ @model.channelRecording }} - - {{@model.channelRecording.id}} - + @@ -142,13 +139,10 @@ @color='boundary' @text={{t 'resources.session-recording.title'}} > - - {{@model.sessionRecording.id}} - + {{! Connection Recording ID }} - - {{@model.channelRecording.connection_recording.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/index.hbs b/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/index.hbs index 0a73c4ee4..99f890895 100644 --- a/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/index.hbs +++ b/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/index.hbs @@ -88,13 +88,10 @@ connection }}

- - {{connection.id}} - + {{#if connection.channel_recordings}}
- - {{B.data.id}} - + {{#if (can 'play channel-recording' B.data)}} @@ -350,13 +344,10 @@ @color='boundary' @text={{t 'resources.session-recording.title'}} > - - {{@model.sessionRecording.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/sessions/index.hbs b/ui/admin/app/templates/scopes/scope/sessions/index.hbs index f1bbbac79..336996e99 100644 --- a/ui/admin/app/templates/scopes/scope/sessions/index.hbs +++ b/ui/admin/app/templates/scopes/scope/sessions/index.hbs @@ -90,13 +90,10 @@ @name='flight-icons/svg/entry-point-16' @size='medium' /> - - {{B.data.session.id}} - + {{B.data.user.id}} diff --git a/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs b/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs index 26bcbe190..17a2f95ee 100644 --- a/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs +++ b/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs @@ -58,13 +58,10 @@ {{/if}} - - {{B.data.id}} - + {{#if B.data.isAWS}} diff --git a/ui/admin/app/templates/scopes/scope/storage-buckets/storage-bucket/index.hbs b/ui/admin/app/templates/scopes/scope/storage-buckets/storage-bucket/index.hbs index 2b6622a8a..27f032ad6 100644 --- a/ui/admin/app/templates/scopes/scope/storage-buckets/storage-bucket/index.hbs +++ b/ui/admin/app/templates/scopes/scope/storage-buckets/storage-bucket/index.hbs @@ -13,13 +13,7 @@ {{t 'resources.storage-bucket.title'}} - - {{@model.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/targets/index.hbs b/ui/admin/app/templates/scopes/scope/targets/index.hbs index d8edd6f43..387fa55fa 100644 --- a/ui/admin/app/templates/scopes/scope/targets/index.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/index.hbs @@ -66,13 +66,10 @@ {{/if}} - - {{B.data.id}} - + {{else}} @@ -99,13 +96,10 @@ {{/if}} - - {{B.data.id}} - + {{/if}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs index a9fdadd6c..35cd35803 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/brokered-credential-sources.hbs @@ -69,13 +69,10 @@ - - {{B.data.id}} - + {{#if (can 'removeCredentialSources target' @model)}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs index d35f9cc65..2ae467ea9 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs @@ -59,13 +59,10 @@ - - {{B.data.model.id}} - + {{#if (can 'removeHostSources target' @model)}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/injected-application-credential-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/injected-application-credential-sources.hbs index 02b18e01f..3ccf86fb5 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/injected-application-credential-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/injected-application-credential-sources.hbs @@ -73,13 +73,10 @@ - - {{B.data.id}} - + {{#if (can 'removeCredentialSources target' @model)}} diff --git a/ui/admin/app/templates/scopes/scope/users/index.hbs b/ui/admin/app/templates/scopes/scope/users/index.hbs index 6b4e6d157..f0d2c65de 100644 --- a/ui/admin/app/templates/scopes/scope/users/index.hbs +++ b/ui/admin/app/templates/scopes/scope/users/index.hbs @@ -57,13 +57,10 @@

{{B.data.description}}

- - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs b/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs index c9f9fd4cc..e14168b00 100644 --- a/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs +++ b/ui/admin/app/templates/scopes/scope/users/user/accounts.hbs @@ -60,13 +60,10 @@ /> - - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/workers/index.hbs b/ui/admin/app/templates/scopes/scope/workers/index.hbs index e7ba19c0a..9c9f1e01e 100644 --- a/ui/admin/app/templates/scopes/scope/workers/index.hbs +++ b/ui/admin/app/templates/scopes/scope/workers/index.hbs @@ -136,13 +136,10 @@ {{B.data.release_version}} {{B.data.address}} - - {{B.data.id}} - + diff --git a/ui/admin/app/templates/scopes/scope/workers/worker/index.hbs b/ui/admin/app/templates/scopes/scope/workers/worker/index.hbs index c0b699607..7115662c7 100644 --- a/ui/admin/app/templates/scopes/scope/workers/worker/index.hbs +++ b/ui/admin/app/templates/scopes/scope/workers/worker/index.hbs @@ -15,13 +15,7 @@

{{t 'resources.worker.description'}}

- - {{@model.id}} - + diff --git a/ui/admin/ember-cli-build.js b/ui/admin/ember-cli-build.js index 92e93617f..9b3d0244f 100644 --- a/ui/admin/ember-cli-build.js +++ b/ui/admin/ember-cli-build.js @@ -39,13 +39,6 @@ module.exports = function (defaults) { }, }); - // Only import when in development or test mode - if (app.env.match(/(development)|(test)/i)) { - app.import('node_modules/clipboard/dist/clipboard.js'); - } else { - app.import('node_modules/clipboard/dist/clipboard.min.js'); - } - // Use `app.import` to add additional libraries to the generated // output files. // diff --git a/ui/admin/package.json b/ui/admin/package.json index caf29c1aa..8767f3494 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -63,7 +63,6 @@ "@playwright/test": "^1.30.0", "babel-loader": "^8.2.5", "broccoli-asset-rev": "^3.0.0", - "clipboard": "^2.0.8", "concurrently": "^8.0.1", "core": "*", "doctoc": "^2.2.0", diff --git a/ui/admin/tests/acceptance/onboarding/success-test.js b/ui/admin/tests/acceptance/onboarding/success-test.js index 4ac7bbcbd..77006fcb2 100644 --- a/ui/admin/tests/acceptance/onboarding/success-test.js +++ b/ui/admin/tests/acceptance/onboarding/success-test.js @@ -32,8 +32,11 @@ module('Acceptance | onboarding | success', function (hooks) { test('check the controller url is copyable', async function (assert) { const origin = window.location.origin; await visit(urls.success); - assert.dom('.copyable-content').isVisible(); - assert.strictEqual(find('.copyable-content').textContent.trim(), origin); + assert.dom('.hds-copy-snippet__text').isVisible(); + assert.strictEqual( + find('.hds-copy-snippet__text').textContent.trim(), + origin, + ); }); test('fill the onboarding form and redirect user to target detail when done is clicked', async function (assert) { diff --git a/ui/admin/tests/integration/components/copyable-test.js b/ui/admin/tests/integration/components/copyable-test.js deleted file mode 100644 index fb060d51f..000000000 --- a/ui/admin/tests/integration/components/copyable-test.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: MPL-2.0 - */ - -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | copyable', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - this.set('actionText', 'text'); - - await render( - hbs`{{this.actionText}}`, - ); - - assert.ok(find('.copyable')); - assert.strictEqual(find('.copyable-content').textContent.trim(), 'text'); - assert.strictEqual(find('.copyable-button').textContent.trim(), 'Copy me'); - }); -});