diff --git a/changelog/30181.txt b/changelog/30181.txt new file mode 100644 index 0000000000..56fca339ab --- /dev/null +++ b/changelog/30181.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: remove ember-svg-jar dependency +``` diff --git a/ui/app/controllers/vault/cluster/access/mfa/methods/create.js b/ui/app/controllers/vault/cluster/access/mfa/methods/create.js index 806f92365f..acc8104e62 100644 --- a/ui/app/controllers/vault/cluster/access/mfa/methods/create.js +++ b/ui/app/controllers/vault/cluster/access/mfa/methods/create.js @@ -19,9 +19,9 @@ export default class MfaMethodCreateController extends Controller { queryParams = ['type']; methods = [ { name: 'TOTP', icon: 'history' }, - { name: 'Duo', icon: 'duo' }, + { name: 'Duo', icon: 'duo-color' }, { name: 'Okta', icon: 'okta-color' }, - { name: 'PingID', icon: 'pingid' }, + { name: 'PingID', icon: 'ping-identity-color' }, ]; @tracked type = null; diff --git a/ui/app/models/mfa-method.js b/ui/app/models/mfa-method.js index 30539913da..7598de2a51 100644 --- a/ui/app/models/mfa-method.js +++ b/ui/app/models/mfa-method.js @@ -172,6 +172,10 @@ export default class MfaMethod extends Model { switch (this.type) { case 'totp': return 'history'; + case 'pingid': + return 'ping-identity-color'; + case 'duo': + return 'duo-color'; default: return this.type; } diff --git a/ui/app/styles/components/init-illustration.scss b/ui/app/styles/components/init-illustration.scss deleted file mode 100644 index b3d6727902..0000000000 --- a/ui/app/styles/components/init-illustration.scss +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -.init-box { - position: relative; - z-index: 10; -} -.init-illustration { - bottom: 0; - right: 0; - overflow: hidden; - position: absolute; - height: 200px; - width: 200px; -} -.init-illustration svg { - position: absolute; - right: -50px; - bottom: -50px; - opacity: 0.8; -} diff --git a/ui/app/styles/core.scss b/ui/app/styles/core.scss index 665a64913b..6e5355d372 100644 --- a/ui/app/styles/core.scss +++ b/ui/app/styles/core.scss @@ -69,7 +69,6 @@ @use 'components/form-section'; @use 'components/global-flash'; @use 'components/icon'; -@use 'components/init-illustration'; @use 'components/info-table-row'; @use 'components/kmip-role-edit'; @use 'components/known-secondaries-card.scss'; diff --git a/ui/app/templates/components/mfa/method-list-item.hbs b/ui/app/templates/components/mfa/method-list-item.hbs index 939ed83b8a..949c910bad 100644 --- a/ui/app/templates/components/mfa/method-list-item.hbs +++ b/ui/app/templates/components/mfa/method-list-item.hbs @@ -11,7 +11,7 @@
- +
{{@model.name}} diff --git a/ui/app/templates/vault/cluster/init.hbs b/ui/app/templates/vault/cluster/init.hbs index a2cdd30be2..66a59c1c74 100644 --- a/ui/app/templates/vault/cluster/init.hbs +++ b/ui/app/templates/vault/cluster/init.hbs @@ -209,9 +209,6 @@ type="submit" disabled={{this.loading}} /> -
- {{svg-jar "initialize"}} -
{{/if}} diff --git a/ui/ember-cli-build.js b/ui/ember-cli-build.js index 6aa8780568..e446b3a1f6 100644 --- a/ui/ember-cli-build.js +++ b/ui/ember-cli-build.js @@ -22,11 +22,6 @@ const appConfig = { babel: { plugins: [require.resolve('ember-concurrency/async-arrow-task-transform')], }, - svgJar: { - optimizer: {}, - sourceDirs: ['public'], - rootURL: '/ui/', - }, fingerprint: { exclude: ['images/'], }, diff --git a/ui/lib/core/addon/components/icon.hbs b/ui/lib/core/addon/components/icon.hbs index c7d9edfc8f..5a699ac40c 100644 --- a/ui/lib/core/addon/components/icon.hbs +++ b/ui/lib/core/addon/components/icon.hbs @@ -3,10 +3,4 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{#if this.isHdsIcon}} - -{{else}} - -{{/if}} \ No newline at end of file + \ No newline at end of file diff --git a/ui/lib/core/addon/components/icon.js b/ui/lib/core/addon/components/icon.js index 2ed0ab1d4e..e64dccd6c3 100644 --- a/ui/lib/core/addon/components/icon.js +++ b/ui/lib/core/addon/components/icon.js @@ -5,8 +5,6 @@ import Component from '@glimmer/component'; import { assert } from '@ember/debug'; -import flightIconMap from '@hashicorp/flight-icons/catalog.json'; -const flightIconNames = flightIconMap.assets.map((asset) => asset.iconName).uniq(); /** * @module Icon @@ -23,23 +21,14 @@ const flightIconNames = flightIconMap.assets.map((asset) => asset.iconName).uniq * */ +// TODO - deprecate and remove this after migrating all `` instances to `` export default class IconComponent extends Component { constructor(owner, args) { super(owner, args); - assert('Icon component size argument must be either "16" or "24"', ['16', '24'].includes(this.size)); - assert('Icon name argument must be provided', this.args.name); - } - get size() { - return this.args.size || '16'; - } + const { name, size = '16' } = args; - // favor HDS icon set and fall back to structure icons if not found - get isHdsIcon() { - return this.args.name ? flightIconNames.includes(this.args.name) : false; - } - - get hsIconClass() { - return this.size === '24' ? 'hs-icon-xlm' : 'hs-icon-l'; + assert('Icon component size argument must be either "16" or "24"', ['16', '24'].includes(size)); + assert('Icon name argument must be provided', name); } } diff --git a/ui/lib/core/icon-mappings.js b/ui/lib/core/icon-mappings.js deleted file mode 100644 index e709a895f2..0000000000 --- a/ui/lib/core/icon-mappings.js +++ /dev/null @@ -1,229 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -// icons that exist in the public folder which are not part of the Structure set -// values represent match to icon in Flight set with null representing no match -export const localIconMap = { - hashicorp: null, - loop: 'sync', - reply: 'corner-up-left', - console: 'terminal-screen', - pki: 'file-text', - replication: 'replication-direct', - 'perf-replication': 'replication-perf', - 'status-indicator': 'circle-dot', - tour: null, - approle: 'cpu', - cert: 'certificate', - consul: null, - gcpkms: 'gcp-color', - kmip: 'unlock', - kv: 'key-values', - ldap: 'user', - okta: 'okta-color', - radius: 'user', - ssh: 'terminal-screen', - totp: 'history', - duo: null, - pingid: null, - transit: 'swap-horizontal', - userpass: 'identity-user', - stopwatch: 'clock', - 'vault-logo': null, - auth: 'user', - 'android-sync': 'sync-reverse', -}; -// complete list of Structure icons mapped to their Flight counterpart -// null values represent no direct correlation to icon in Flight set -// Flight icon lookup @ https://flight-hashicorp.vercel.app/ -export const structureIconMap = { - 'alert-circle-fill': 'alert-circle-fill', - 'alert-circle-outline': 'alert-circle', - 'alert-triangle': 'alert-triangle-fill', - 'arrow-down': 'arrow-down', - 'arrow-left': 'arrow-left', - 'arrow-right': 'arrow-right', - 'arrow-up': 'arrow-up', - bolt: 'zap', - 'box-check-fill': 'check-square-fill', - 'box-outline': 'square', - broadcast: 'radio', - bug: 'bug', - calendar: 'calendar', - 'cancel-circle-fill': 'x-circle-fill', - 'cancel-circle-outline': 'x-circle', - 'cancel-plain': 'x', - 'cancel-square-fill': 'x-square-fill', - 'cancel-square-outline': 'x-square', - 'caret-down': null, - 'caret-up': null, - 'check-circle-fill': 'check-circle-fill', - 'check-circle-outline': 'check-circle', - 'check-plain': 'check', - 'chevron-down': 'chevron-down', - 'chevron-left': 'chevron-left', - 'chevron-right': 'chevron-right', - 'chevron-up': 'chevron-up', - 'clock-fill': null, - 'clock-outline': 'clock', - 'cloud-fail': 'cloud-x', - code: 'code', - console: 'terminal', - 'copy-action': 'clipboard-copy', - 'copy-success': 'clipboard-checked', - database: 'database', - delay: 'delay', - 'deny-alt': null, - 'deny-default': null, - disabled: 'skip', - docs: 'docs-link', - dot: 'circle-fill', - download: 'download', - edit: 'pencil-tool', - 'envelope-sealed-fill': null, - 'envelope-sealed-outline': 'mail', - 'envelope-unsealed--outline': 'mail-open', - 'envelope-unsealed-fill': null, - exit: 'external-link', - 'expand-less': 'minimize', - 'expand-more': 'maximize', - 'file-error': 'file-x', - 'file-fill': 'file-text', - 'file-outline': 'file', - 'file-success': 'file-check', - filter: 'filter', - flag: 'flag', - 'folder-fill': 'folder-fill', - 'folder-outline': 'folder', - gateway: 'gateway', - 'gift-fill': null, - 'gift-outline': 'gift', - 'git-branch': 'git-branch', - 'git-commit': 'git-commit', - 'git-pull-request': 'git-pull-request', - 'git-repository': 'git-repo', - guide: 'guide', - health: 'activity', - 'help-circle-fill': null, - 'help-circle-outline': 'help', - history: 'history', - 'info-circle-fill': null, - 'info-circle-outline': 'info', - key: 'key', - layers: 'layers', - leader: 'star-circle', - learn: 'learn-link', - link: 'link', - loading: '', - 'lock-closed-fill': 'lock-fill', - 'lock-closed-outline': 'lock', - 'lock-closed': 'lock-fill', - 'lock-disabled': 'lock-disabled', - 'lock-open-outline': 'unlock', - 'lock-open': 'unlock', - 'logo-aws-color': 'aws-color', - 'logo-aws-monochrome': 'aws', - 'logo-alicloud-color': 'alibaba-color', - 'logo-alicloud-monochrome': 'alibaba', - 'logo-auth0-color': 'auth0-color', - 'logo-auth0-monochrome': 'auth0', - 'logo-azure-color': 'azure-color', - 'logo-azure-monochrome': 'azure', - 'logo-azure-dev-ops-color': 'azure-devops-color', - 'logo-azure-dev-ops-monochrome': 'azure-devops', - 'logo-bitbucket-color': 'bitbucket-color', - 'logo-bitbucket-monochrome': 'bitbucket', - 'logo-f5-color': 'f5-color', - 'logo-f5-monochrome': 'f5', - 'logo-gcp-color': 'gcp-color', - 'logo-gcp-monochrome': 'gcp', - 'logo-github-color': 'github-color', - 'logo-github-monochrome': 'github', - 'logo-gitlab-color': 'gitlab-color', - 'logo-gitlab-monochrome': 'gitlab', - 'logo-google-color': 'google-color', - 'logo-google-monochrome': 'google', - 'logo-kubernetes-color': 'kubernetes-color', - 'logo-kubernetes-monochrome': 'kubernetes', - 'logo-microsoft-color': 'microsoft-color', - 'logo-microsoft-monochrome': 'microsoft', - 'logo-okta-color': 'okta-color', - 'logo-okta-monochrome': 'okta', - 'logo-oracle-color': 'oracle-color', - 'logo-oracle-monochrome': 'oracle', - 'logo-slack-color': 'slack-color', - 'logo-slack-monochrome': 'slack', - 'logo-vmware-color': 'vmware-color', - 'logo-vmware-monochrome': 'vmware', - menu: 'menu', - mesh: 'mesh', - 'message-fill': 'message-square-fill', - 'message-outline': 'message-square-fill', - message: 'message-square-fill', - 'minus-circle-fill': null, - 'minus-circle-outline': 'minus-circle', - 'minus-plain': 'minus', - 'minus-square-fill': 'minus-square', - module: 'module', - 'more-horizontal': 'more-horizontal', - 'more-vertical': 'more-vertical', - network: 'network', - 'notification-disabled': 'notification-disabled', - 'notification-fill': 'notification-fill', - 'notification-outline': 'bell', - outline: 'outline', - 'page-outline': 'outline', - path: 'path', - 'play-fill': 'play-circle', - 'play-outline': 'play-circle', - 'play-plain': 'play', - 'plus-circle-fill': null, - 'plus-circle-outline': 'plus-circle', - 'plus-plain': 'plus', - 'plus-square-fill': 'plus-square', - provider: 'provider', - 'public-default': 'globe', - 'public-locked': 'globe-private', - queue: 'queue', - 'radio-button-checked': 'circle-dot', - 'radio-button-unchecked': 'circle', - random: 'random', - redirect: 'redirect', - 'refresh-alert': 'refresh-alert', - 'refresh-default': 'reload', - remix: 'shuffle', - ribbon: 'award', - run: '', - search: 'search', - server: 'server', - settings: 'settings', - sort: 'sort-desc', - 'source-file': 'file-source', - 'star-fill': 'star-fill', - 'star-outline': 'star', - 'sub-left': 'corner-down-left', - 'sub-right': 'corner-down-right', - support: 'support', - 'swap-horizontal': 'swap-horizontal', - 'swap-vertical': 'swap-vertical', - syncing: 'syncing', - tag: 'tag', - tokens: 'token', - trash: 'trash', - tune: 'sliders', - 'unfold-less': 'unfold-close', - 'unfold-more': 'unfold-open', - upload: 'upload', - 'user-add': 'user-plus', - 'user-organization': 'org', - 'user-plain': 'user', - 'user-square-fill': 'user-circle-fill', - 'user-square-outline': 'user-circle', - 'user-team': 'users', - 'visibility-hide': 'eye-off', - 'visibility-show': 'eye', - webhook: 'webhook', - partner: 'users', -}; diff --git a/ui/lib/core/package.json b/ui/lib/core/package.json index aaeccb44ea..97b9f76aac 100644 --- a/ui/lib/core/package.json +++ b/ui/lib/core/package.json @@ -21,7 +21,6 @@ "@ember/render-modifiers": "*", "ember-power-select": "*", "ember-router-helpers": "*", - "ember-svg-jar": "*", "ember-truth-helpers": "*", "escape-string-regexp": "*", "@hashicorp/flight-icons": "*", diff --git a/ui/package.json b/ui/package.json index 9421f62462..68cbea4cfe 100644 --- a/ui/package.json +++ b/ui/package.json @@ -34,9 +34,10 @@ "test:enos": "concurrently --kill-others-on-fail -P -c \"auto\" -n lint:js,lint:hbs,lint:types,enos \"yarn:lint:js:quiet\" \"yarn:lint:hbs:quiet\" \"yarn:lint:types\" \"node scripts/enos-test-ember.js {@}\" --", "test:oss": "yarn run test -f='!enterprise'", "test:ent": "node scripts/start-vault.js -f='enterprise'", - "test:quick": "node scripts/start-vault.js --split=8 --preserve-test-name --parallel", - "test:quick-oss": "node scripts/start-vault.js -f='!enterprise' --split=8 --preserve-test-name --parallel", + "test:quick": "node scripts/start-vault.js --split=8 --preserve-test-name --parallel=1", + "test:quick-oss": "node scripts/start-vault.js -f='!enterprise' --split=8 --preserve-test-name --parallel=1", "test:filter": "node scripts/start-vault.js --server -f='!enterprise'", + "test:server": "node scripts/start-vault.js --server", "test:dev": "node scripts/start-vault.js", "vault": "VAULT_REDIRECT_ADDR=http://127.0.0.1:8200 vault server -log-level=error -dev -dev-root-token-id=root -dev-ha -dev-transactional", "vault:cluster": "VAULT_REDIRECT_ADDR=http://127.0.0.1:8202 vault server -log-level=error -dev -dev-root-token-id=root -dev-listen-address=127.0.0.1:8202 -dev-ha -dev-transactional" @@ -127,7 +128,6 @@ "ember-sinon-qunit": "^7.4.0", "ember-source": "~5.8.0", "ember-style-modifier": "^4.1.0", - "ember-svg-jar": "2.6.0", "ember-template-lint": "^6.0.0", "ember-template-lint-plugin-prettier": "^5.0.0", "ember-test-selectors": "6.0.0", @@ -220,7 +220,7 @@ }, "dependencies": { "@babel/core": "^7.26.10", - "@hashicorp/design-system-components": "~4.18.0", + "@hashicorp/design-system-components": "~4.18.1", "@hashicorp/vault-client-typescript": "portal:./api-client", "@hashicorp/vault-reporting": "portal:./vault-reporting", "ember-auto-import": "^2.7.2", diff --git a/ui/public/android-sync.svg b/ui/public/android-sync.svg deleted file mode 100644 index 251025e48d..0000000000 --- a/ui/public/android-sync.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/public/console.svg b/ui/public/console.svg deleted file mode 100644 index 9c43c0cffe..0000000000 --- a/ui/public/console.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/public/duo.svg b/ui/public/duo.svg deleted file mode 100644 index 72a97e5d13..0000000000 --- a/ui/public/duo.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/ui/public/file-error.svg b/ui/public/file-error.svg deleted file mode 100644 index 97f8e13104..0000000000 --- a/ui/public/file-error.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/public/file-success.svg b/ui/public/file-success.svg deleted file mode 100644 index 779273d51e..0000000000 --- a/ui/public/file-success.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/public/hashicorp.svg b/ui/public/hashicorp.svg deleted file mode 100644 index 1553261814..0000000000 --- a/ui/public/hashicorp.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/ui/public/initialize.svg b/ui/public/initialize.svg deleted file mode 100644 index d8cc987b60..0000000000 --- a/ui/public/initialize.svg +++ /dev/null @@ -1,963 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/public/loop.svg b/ui/public/loop.svg deleted file mode 100644 index 290bbb7095..0000000000 --- a/ui/public/loop.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/ui/public/okta.svg b/ui/public/okta.svg deleted file mode 100644 index 6b6e8906e4..0000000000 --- a/ui/public/okta.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/public/perf-replication.svg b/ui/public/perf-replication.svg deleted file mode 100644 index e6730929ee..0000000000 --- a/ui/public/perf-replication.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/ui/public/pingid.svg b/ui/public/pingid.svg deleted file mode 100644 index 99b33fefc3..0000000000 --- a/ui/public/pingid.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/ui/public/replication.svg b/ui/public/replication.svg deleted file mode 100644 index 3d9fc032c7..0000000000 --- a/ui/public/replication.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/ui/public/reply.svg b/ui/public/reply.svg deleted file mode 100644 index dcdf541e19..0000000000 --- a/ui/public/reply.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/ui/public/stopwatch.svg b/ui/public/stopwatch.svg deleted file mode 100644 index 10d4b40b0f..0000000000 --- a/ui/public/stopwatch.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/public/tour.svg b/ui/public/tour.svg deleted file mode 100644 index e864d782d1..0000000000 --- a/ui/public/tour.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/ui/public/vault-logo.svg b/ui/public/vault-logo.svg deleted file mode 100644 index 6a7ec531e3..0000000000 --- a/ui/public/vault-logo.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/ui/tests/integration/components/icon-test.js b/ui/tests/integration/components/icon-test.js index d57bc6c172..7268bc5b9a 100644 --- a/ui/tests/integration/components/icon-test.js +++ b/ui/tests/integration/components/icon-test.js @@ -12,26 +12,6 @@ import waitForError from 'vault/tests/helpers/wait-for-error'; module('Integration | Component | icon', function (hooks) { setupRenderingTest(hooks); - test('it renders', async function (assert) { - await render(hbs``); - assert.dom('.i-con').exists('renders'); - - // non-flight icon - await render(hbs``); - assert.dom('.vault-logo').exists('inlines the SVG'); - assert.dom('.hs-icon').hasClass('hs-icon-l', 'Default hs class applied'); - - await render(hbs`