diff --git a/changelog/12976.txt b/changelog/12976.txt new file mode 100644 index 000000000..1dea358d9 --- /dev/null +++ b/changelog/12976.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Adds flight icons to UI +``` \ No newline at end of file diff --git a/ui/.storybook/config.js b/ui/.storybook/config.js index 3a9556ab2..23f4116d6 100644 --- a/ui/.storybook/config.js +++ b/ui/.storybook/config.js @@ -1,6 +1,7 @@ import { configure, addParameters, addDecorator } from '@storybook/ember'; import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; import theme from './theme.js'; +import flightIconSprite from '@hashicorp/flight-icons/svg-sprite/svg-sprite-module'; function loadStories() { // automatically import all files ending in *.stories.js @@ -18,6 +19,9 @@ addParameters({ addDecorator(storyFn => { const { template, context } = storyFn(); + // flight icon sprite must be inserted into dom for icon lookup via use element + document.getElementById('root').insertAdjacentHTML('afterbegin', flightIconSprite.trim()); + // This adds styling to the Canvas tab. const styles = { style: { diff --git a/ui/app/components/regex-validator.hbs b/ui/app/components/regex-validator.hbs index 18c5cf64f..4b38e7a67 100644 --- a/ui/app/components/regex-validator.hbs +++ b/ui/app/components/regex-validator.hbs @@ -57,7 +57,7 @@ {{else}}
-
{{/if}} diff --git a/ui/app/components/status-menu.js b/ui/app/components/status-menu.js index 59bfc2bcf..8aa4e182e 100644 --- a/ui/app/components/status-menu.js +++ b/ui/app/components/status-menu.js @@ -11,10 +11,9 @@ export default Component.extend({ type: 'cluster', itemTag: null, glyphName: computed('type', function() { - const glyphs = { - cluster: 'status-indicator', - user: 'user-square-outline', - }; - return glyphs[this.type]; + return { + cluster: 'circle-dot', + user: 'user', + }[this.type]; }), }); diff --git a/ui/app/components/toolbar-secret-link.js b/ui/app/components/toolbar-secret-link.js index 00395ccab..08318b86f 100644 --- a/ui/app/components/toolbar-secret-link.js +++ b/ui/app/components/toolbar-secret-link.js @@ -23,7 +23,7 @@ import { computed } from '@ember/object'; export default OuterHTML.extend({ glyph: computed('type', function() { if (this.type == 'add') { - return 'plus-plain'; + return 'plus'; } else { return 'chevron-right'; } diff --git a/ui/app/models/transit-key.js b/ui/app/models/transit-key.js index ffb203c74..09c6f47de 100644 --- a/ui/app/models/transit-key.js +++ b/ui/app/models/transit-key.js @@ -8,12 +8,12 @@ const ACTION_VALUES = { encrypt: { isSupported: 'supportsEncryption', description: 'Looks up wrapping properties for the given token', - glyph: 'lock-closed', + glyph: 'lock-fill', }, decrypt: { isSupported: 'supportsDecryption', description: 'Decrypts the provided ciphertext using this key', - glyph: 'envelope-unsealed--outline', + glyph: 'mail-open', }, datakey: { isSupported: 'supportsEncryption', @@ -23,20 +23,28 @@ const ACTION_VALUES = { rewrap: { isSupported: 'supportsEncryption', description: 'Rewraps the ciphertext using the latest version of the named key', - glyph: 'refresh-default', + glyph: 'reload', }, sign: { isSupported: 'supportsSigning', description: 'Get the cryptographic signature of the given data', - glyph: 'edit', + glyph: 'pencil-tool', + }, + hmac: { + isSupported: true, + description: 'Generate a data digest using a hash algorithm', + glyph: 'shuffle', }, - hmac: { isSupported: true, description: 'Generate a data digest using a hash algorithm', glyph: 'remix' }, verify: { isSupported: true, description: 'Validate the provided signature for the given data', - glyph: 'check-circle-outline', + glyph: 'check-circle', + }, + export: { + isSupported: 'exportable', + description: 'Get the named key', + glyph: 'external-link', }, - export: { isSupported: 'exportable', description: 'Get the named key', glyph: 'exit' }, }; export default Model.extend({ diff --git a/ui/app/styles/components/console-ui-panel.scss b/ui/app/styles/components/console-ui-panel.scss index 170af92de..1542dcaec 100644 --- a/ui/app/styles/components/console-ui-panel.scss +++ b/ui/app/styles/components/console-ui-panel.scss @@ -106,7 +106,7 @@ margin-left: calc(#{$console-spacing} - 0.33rem); position: relative; - .hs-icon { + svg { position: absolute; left: 0; top: 0; diff --git a/ui/app/styles/components/hs-icon.scss b/ui/app/styles/components/icon.scss similarity index 84% rename from ui/app/styles/components/hs-icon.scss rename to ui/app/styles/components/icon.scss index 80507831e..e60da0533 100644 --- a/ui/app/styles/components/hs-icon.scss +++ b/ui/app/styles/components/icon.scss @@ -43,3 +43,10 @@ width: 32px; height: 32px; } + +.flight-icon { + &.flight-icon-display-inline { + vertical-align: middle; + margin: 0px 4px; + } +} diff --git a/ui/app/styles/core.scss b/ui/app/styles/core.scss index bce462cd3..7e07524df 100644 --- a/ui/app/styles/core.scss +++ b/ui/app/styles/core.scss @@ -120,4 +120,4 @@ @import './components/vlt-table'; // bulma-free-zone -@import './components/hs-icon'; +@import './components/icon'; diff --git a/ui/app/templates/components/alert-popup.hbs b/ui/app/templates/components/alert-popup.hbs index c6d73c1fa..389c1eeaa 100644 --- a/ui/app/templates/components/alert-popup.hbs +++ b/ui/app/templates/components/alert-popup.hbs @@ -3,16 +3,12 @@
{{type.text}} diff --git a/ui/app/templates/components/cluster-info.hbs b/ui/app/templates/components/cluster-info.hbs index c404841d7..17e3ff1ca 100644 --- a/ui/app/templates/components/cluster-info.hbs +++ b/ui/app/templates/components/cluster-info.hbs @@ -27,7 +27,7 @@
Enable - +
@@ -66,14 +66,14 @@
Unsealed - +
{{else}}
Unsealed - +
{{/if}} @@ -81,7 +81,7 @@
Sealed - +
{{/if}} diff --git a/ui/app/templates/components/console/command-input.hbs b/ui/app/templates/components/console/command-input.hbs index ab4be479e..4d666b350 100644 --- a/ui/app/templates/components/console/command-input.hbs +++ b/ui/app/templates/components/console/command-input.hbs @@ -7,7 +7,10 @@ - +
diff --git a/ui/app/templates/components/console/log-command.hbs b/ui/app/templates/components/console/log-command.hbs index cc446877d..87700e2e2 100644 --- a/ui/app/templates/components/console/log-command.hbs +++ b/ui/app/templates/components/console/log-command.hbs @@ -1,2 +1,2 @@ {{!-- using Icon here instead of Chevron because two nested tagless components results in a rendered line break between the tags breaking the layout in the
 --}}
-
+
{{content}}
diff --git a/ui/app/templates/components/console/log-error-with-html.hbs b/ui/app/templates/components/console/log-error-with-html.hbs index 45e0c4540..bff73bf39 100644 --- a/ui/app/templates/components/console/log-error-with-html.hbs +++ b/ui/app/templates/components/console/log-error-with-html.hbs @@ -1,5 +1,5 @@ {{! template-lint-disable no-triple-curlies}}
-
diff --git a/ui/app/templates/components/console/log-error.hbs b/ui/app/templates/components/console/log-error.hbs index 11cd2647b..60a2dad42 100644 --- a/ui/app/templates/components/console/log-error.hbs +++ b/ui/app/templates/components/console/log-error.hbs @@ -1,4 +1,4 @@
-
diff --git a/ui/app/templates/components/console/log-help.hbs b/ui/app/templates/components/console/log-help.hbs index 6d9aa8419..09e6c3cb1 100644 --- a/ui/app/templates/components/console/log-help.hbs +++ b/ui/app/templates/components/console/log-help.hbs @@ -1,5 +1,5 @@
-
{{/each}} diff --git a/ui/app/templates/components/wizard-section.hbs b/ui/app/templates/components/wizard-section.hbs index 987143242..20f2166f4 100644 --- a/ui/app/templates/components/wizard-section.hbs +++ b/ui/app/templates/components/wizard-section.hbs @@ -1,7 +1,7 @@

{{#if headerIcon}} -

@@ -14,7 +14,7 @@ {{/if}} {{#if docText}} - {{/if}}
diff --git a/ui/app/templates/components/wizard/ad-engine.hbs b/ui/app/templates/components/wizard/ad-engine.hbs index 027e078c7..492b51a4e 100644 --- a/ui/app/templates/components/wizard/ad-engine.hbs +++ b/ui/app/templates/components/wizard/ad-engine.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/alicloud-engine.hbs b/ui/app/templates/components/wizard/alicloud-engine.hbs index 41e25e764..bf23863f1 100644 --- a/ui/app/templates/components/wizard/alicloud-engine.hbs +++ b/ui/app/templates/components/wizard/alicloud-engine.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/alicloud-method.hbs b/ui/app/templates/components/wizard/alicloud-method.hbs index 0f4c92c23..383f059ca 100644 --- a/ui/app/templates/components/wizard/alicloud-method.hbs +++ b/ui/app/templates/components/wizard/alicloud-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/approle-method.hbs b/ui/app/templates/components/wizard/approle-method.hbs index c47898c68..a058962dc 100644 --- a/ui/app/templates/components/wizard/approle-method.hbs +++ b/ui/app/templates/components/wizard/approle-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/auth-details.hbs b/ui/app/templates/components/wizard/auth-details.hbs index d0514a48e..061fc631e 100644 --- a/ui/app/templates/components/wizard/auth-details.hbs +++ b/ui/app/templates/components/wizard/auth-details.hbs @@ -12,7 +12,7 @@ @class="wizard-details" > {{#if selectedFeatures}} - + + About {{estimatedTime}} minutes + {{/if}} diff --git a/ui/app/templates/components/wizard/gcp-engine.hbs b/ui/app/templates/components/wizard/gcp-engine.hbs index e61ced1f4..89cf14d8d 100644 --- a/ui/app/templates/components/wizard/gcp-engine.hbs +++ b/ui/app/templates/components/wizard/gcp-engine.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/gcp-method.hbs b/ui/app/templates/components/wizard/gcp-method.hbs index 36869babc..625b7c957 100644 --- a/ui/app/templates/components/wizard/gcp-method.hbs +++ b/ui/app/templates/components/wizard/gcp-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/gcpkms-engine.hbs b/ui/app/templates/components/wizard/gcpkms-engine.hbs index 18fc84819..6004b65e7 100644 --- a/ui/app/templates/components/wizard/gcpkms-engine.hbs +++ b/ui/app/templates/components/wizard/gcpkms-engine.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/kmip-engine.hbs b/ui/app/templates/components/wizard/kmip-engine.hbs index aed2bc6a7..3c743c6f4 100644 --- a/ui/app/templates/components/wizard/kmip-engine.hbs +++ b/ui/app/templates/components/wizard/kmip-engine.hbs @@ -1,4 +1,4 @@ -

The KMIP secrets engine allows Vault to act as a KMIP server provider and handle the lifecycle of KMIP managed diff --git a/ui/app/templates/components/wizard/kubernetes-method.hbs b/ui/app/templates/components/wizard/kubernetes-method.hbs index fe39cec59..2fa1cc349 100644 --- a/ui/app/templates/components/wizard/kubernetes-method.hbs +++ b/ui/app/templates/components/wizard/kubernetes-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/kv-engine.hbs b/ui/app/templates/components/wizard/kv-engine.hbs index c03a8d17c..ed73c82b8 100644 --- a/ui/app/templates/components/wizard/kv-engine.hbs +++ b/ui/app/templates/components/wizard/kv-engine.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/ldap-method.hbs b/ui/app/templates/components/wizard/ldap-method.hbs index 1855694d5..356720b04 100644 --- a/ui/app/templates/components/wizard/ldap-method.hbs +++ b/ui/app/templates/components/wizard/ldap-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/okta-method.hbs b/ui/app/templates/components/wizard/okta-method.hbs index 1440bebe5..b61ec473a 100644 --- a/ui/app/templates/components/wizard/okta-method.hbs +++ b/ui/app/templates/components/wizard/okta-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/pki-engine.hbs b/ui/app/templates/components/wizard/pki-engine.hbs index 73a9d2129..f847aa46e 100644 --- a/ui/app/templates/components/wizard/pki-engine.hbs +++ b/ui/app/templates/components/wizard/pki-engine.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/radius-method.hbs b/ui/app/templates/components/wizard/radius-method.hbs index 6df40fab1..cb0d5b9ff 100644 --- a/ui/app/templates/components/wizard/radius-method.hbs +++ b/ui/app/templates/components/wizard/radius-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/components/wizard/replication-setup.hbs b/ui/app/templates/components/wizard/replication-setup.hbs index 449ac22b0..1e9b1944e 100644 --- a/ui/app/templates/components/wizard/replication-setup.hbs +++ b/ui/app/templates/components/wizard/replication-setup.hbs @@ -10,11 +10,12 @@

- - diff --git a/ui/app/templates/components/wizard/secrets-display.hbs b/ui/app/templates/components/wizard/secrets-display.hbs index fa895b5f5..a907ca56e 100644 --- a/ui/app/templates/components/wizard/secrets-display.hbs +++ b/ui/app/templates/components/wizard/secrets-display.hbs @@ -26,11 +26,11 @@ > {{#if @isSupported}} {{/if}}
diff --git a/ui/app/templates/components/wizard/tutorial-error.hbs b/ui/app/templates/components/wizard/tutorial-error.hbs index 12291f863..fa5d1974b 100644 --- a/ui/app/templates/components/wizard/tutorial-error.hbs +++ b/ui/app/templates/components/wizard/tutorial-error.hbs @@ -7,7 +7,7 @@

Want a tour? Our helpful guide will introduce you to the Vault Web UI.

diff --git a/ui/app/templates/components/wizard/tutorial-paused.hbs b/ui/app/templates/components/wizard/tutorial-paused.hbs index b8f912384..1088b3f99 100644 --- a/ui/app/templates/components/wizard/tutorial-paused.hbs +++ b/ui/app/templates/components/wizard/tutorial-paused.hbs @@ -5,7 +5,7 @@ @hidePopup={{true}} >

Feel free to explore Vault. Click below to get back to the guide or close this window.

diff --git a/ui/app/templates/components/wizard/userpass-method.hbs b/ui/app/templates/components/wizard/userpass-method.hbs index df11cf564..d10bc573a 100644 --- a/ui/app/templates/components/wizard/userpass-method.hbs +++ b/ui/app/templates/components/wizard/userpass-method.hbs @@ -1,6 +1,6 @@ diff --git a/ui/app/templates/vault.hbs b/ui/app/templates/vault.hbs index e9e36f179..f30203ba9 100644 --- a/ui/app/templates/vault.hbs +++ b/ui/app/templates/vault.hbs @@ -3,10 +3,10 @@
@@ -32,7 +32,7 @@ {{#if (eq env "development") }}
- Local development + Local development
{{/if}} diff --git a/ui/app/templates/vault/cluster.hbs b/ui/app/templates/vault/cluster.hbs index ab20e6f0a..0e2deb1e8 100644 --- a/ui/app/templates/vault/cluster.hbs +++ b/ui/app/templates/vault/cluster.hbs @@ -3,7 +3,7 @@ as |Nav|> - + @@ -89,7 +89,7 @@ {{/if}} {{else}} - + {{/if}}
@@ -33,25 +33,21 @@ {{else if valueIsBoolean}} {{#if value}}
diff --git a/ui/lib/core/addon/templates/components/modal.hbs b/ui/lib/core/addon/templates/components/modal.hbs index de836e797..ef491ffd0 100644 --- a/ui/lib/core/addon/templates/components/modal.hbs +++ b/ui/lib/core/addon/templates/components/modal.hbs @@ -6,10 +6,9 @@
diff --git a/ui/lib/core/addon/templates/components/popup-menu.hbs b/ui/lib/core/addon/templates/components/popup-menu.hbs index 2c8821824..6ac776950 100644 --- a/ui/lib/core/addon/templates/components/popup-menu.hbs +++ b/ui/lib/core/addon/templates/components/popup-menu.hbs @@ -1,7 +1,7 @@ {{#basic-dropdown class="popup-menu" horizontalPosition="auto-right" verticalPosition="below" onOpen=onOpen as |d|}} {{#d.trigger tagName="button" class=(concat "popup-menu-trigger button is-ghost" (if d.isOpen " is-active")) data-test-popup-menu-trigger=true}} diff --git a/ui/lib/core/addon/templates/components/replication-dashboard.hbs b/ui/lib/core/addon/templates/components/replication-dashboard.hbs index feeb6222b..5bb4c6ab5 100644 --- a/ui/lib/core/addon/templates/components/replication-dashboard.hbs +++ b/ui/lib/core/addon/templates/components/replication-dashboard.hbs @@ -21,7 +21,11 @@ {{/unless}}

{{summaryState}} {{#if (get (cluster-states summaryState) "isOk")}} - + {{/if}}

diff --git a/ui/lib/core/addon/templates/components/replication-mode-summary.hbs b/ui/lib/core/addon/templates/components/replication-mode-summary.hbs index 014897c33..7a9c79f9d 100644 --- a/ui/lib/core/addon/templates/components/replication-mode-summary.hbs +++ b/ui/lib/core/addon/templates/components/replication-mode-summary.hbs @@ -34,10 +34,7 @@ {{#if replicationEnabled}} {{#if (cluster-states modeState)}} - {{else if syncProgress}} @@ -46,8 +43,8 @@ {{/if}} {{else}} {{/if}} diff --git a/ui/lib/core/addon/templates/components/replication-secondary-card.hbs b/ui/lib/core/addon/templates/components/replication-secondary-card.hbs index 22cebdb79..d906e0800 100644 --- a/ui/lib/core/addon/templates/components/replication-secondary-card.hbs +++ b/ui/lib/core/addon/templates/components/replication-secondary-card.hbs @@ -53,7 +53,7 @@ {{#if inSyncState}} - +
@@ -87,7 +87,7 @@ {{/if}} diff --git a/ui/lib/core/addon/templates/components/search-select-placeholder.hbs b/ui/lib/core/addon/templates/components/search-select-placeholder.hbs index 6a5c308c8..e13e318b8 100644 --- a/ui/lib/core/addon/templates/components/search-select-placeholder.hbs +++ b/ui/lib/core/addon/templates/components/search-select-placeholder.hbs @@ -1,6 +1,6 @@

Search -

diff --git a/ui/lib/core/addon/templates/components/search-select.hbs b/ui/lib/core/addon/templates/components/search-select.hbs index 6cccd18d2..787a0d3f5 100644 --- a/ui/lib/core/addon/templates/components/search-select.hbs +++ b/ui/lib/core/addon/templates/components/search-select.hbs @@ -67,7 +67,7 @@
diff --git a/ui/lib/core/addon/templates/components/string-list.hbs b/ui/lib/core/addon/templates/components/string-list.hbs index 536778e72..1e3eb4880 100644 --- a/ui/lib/core/addon/templates/components/string-list.hbs +++ b/ui/lib/core/addon/templates/components/string-list.hbs @@ -39,7 +39,7 @@ data-test-string-list-button="delete" {{action "removeInput" index}} > - + {{/if}}
diff --git a/ui/lib/core/addon/templates/components/toggle-button.hbs b/ui/lib/core/addon/templates/components/toggle-button.hbs index 529a4b317..9894156de 100644 --- a/ui/lib/core/addon/templates/components/toggle-button.hbs +++ b/ui/lib/core/addon/templates/components/toggle-button.hbs @@ -1,5 +1,5 @@ {{#if isOpen}} - {{openLabel}} + {{openLabel}} {{else}} - {{closedLabel}} + {{closedLabel}} {{/if}} diff --git a/ui/lib/core/addon/templates/components/toolbar-link.hbs b/ui/lib/core/addon/templates/components/toolbar-link.hbs index 50d3e7995..c00a50f43 100644 --- a/ui/lib/core/addon/templates/components/toolbar-link.hbs +++ b/ui/lib/core/addon/templates/components/toolbar-link.hbs @@ -19,7 +19,7 @@ - {{yield}} + {{yield}} @@ -30,7 +30,7 @@ {{else}} - {{yield}} + {{yield}} {{/if}} {{/let}} diff --git a/ui/lib/core/addon/templates/components/ttl-form.hbs b/ui/lib/core/addon/templates/components/ttl-form.hbs index 391023d47..38fd76eb1 100644 --- a/ui/lib/core/addon/templates/components/ttl-form.hbs +++ b/ui/lib/core/addon/templates/components/ttl-form.hbs @@ -26,12 +26,7 @@ {{#if errorMessage}}
-
{{errorMessage}} diff --git a/ui/lib/core/addon/templates/components/ttl-picker2.hbs b/ui/lib/core/addon/templates/components/ttl-picker2.hbs index 5bb299fb3..252d74924 100644 --- a/ui/lib/core/addon/templates/components/ttl-picker2.hbs +++ b/ui/lib/core/addon/templates/components/ttl-picker2.hbs @@ -12,7 +12,7 @@ {{#if description}} - +
@@ -53,10 +53,8 @@
diff --git a/ui/lib/core/icon-mappings.js b/ui/lib/core/icon-mappings.js new file mode 100644 index 000000000..021cbb30b --- /dev/null +++ b/ui/lib/core/icon-mappings.js @@ -0,0 +1,222 @@ +// 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', + 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 38f8f4cb1..b0ddc13f6 100644 --- a/ui/lib/core/package.json +++ b/ui/lib/core/package.json @@ -24,6 +24,8 @@ "ember-svg-jar": "*", "ember-truth-helpers": "*", "ember-wormhole": "^0.5.5", - "escape-string-regexp": "*" + "escape-string-regexp": "*", + "@hashicorp/ember-flight-icons": "*", + "@hashicorp/flight-icons": "*" } } diff --git a/ui/lib/core/stories/icon.md b/ui/lib/core/stories/icon.md index 52cf72045..56187c9dd 100644 --- a/ui/lib/core/stories/icon.md +++ b/ui/lib/core/stories/icon.md @@ -3,17 +3,19 @@ ## Icon `Icon` components are glyphs used to indicate important information. +Flight icon documentation at https://flight-hashicorp.vercel.app/ + **Params** | Param | Type | Default | Description | | --- | --- | --- | --- | -| glyph | String | | The name of the SVG to render inline. | -| [size] | String | 'm' | The size of the Icon, can be one of 's', 'm', 'l', 'xlm', 'xl', 'xxl'. The default is 'm'. | +| name | string | null | The name of the SVG to render inline. | +| [size] | string | 16 | size for flight icon, can be 16 or 24 | **Example** ```js - + ``` **See** diff --git a/ui/lib/core/stories/icon.stories.js b/ui/lib/core/stories/icon.stories.js index eed77a9f7..929e042ee 100644 --- a/ui/lib/core/stories/icon.stories.js +++ b/ui/lib/core/stories/icon.stories.js @@ -3,6 +3,7 @@ import { storiesOf } from '@storybook/ember'; import notes from './icon.md'; import icons from '../../../node_modules/@hashicorp/structure-icons/dist/index.js'; import { withKnobs, select } from '@storybook/addon-knobs'; +import { structureIconMap, localIconMap } from '../icon-mappings'; storiesOf('Icon', module) .addParameters({ options: { showPanel: true } }) @@ -11,31 +12,96 @@ storiesOf('Icon', module) 'Icon', () => ({ template: hbs` -
Icons from HashiCorp Structure
+
HashiCorp Flight Icons
+ https://flight-hashicorp.vercel.app/ + +
+ HashiCorp Structure Icons with Flight Mappings +
- - + + + + {{#each types as |type|}} + {{#let (get structureIconMap type) as |flightIcon|}} + + + {{/let}} {{/each}}
Glyph titleGlyphStructure Icon NameStructure GlyphFlight Icon NameFlight Glyph>
-
{{humanize type}}
+ {{type}}
- + + {{#if flightIcon}} + {{flightIcon}} + {{else}} + — + {{/if}} + + {{#if flightIcon}} + + {{else}} + — + {{/if}} +
+ +
+ Local Icons with Flight Mappings +
+ + + + + + + + + + + {{#each-in localIconMap as |localIcon flightIcon|}} + + + + + + + {{/each-in}} + +
Local Icon NameGlyphFlight Icon NameFlight Glyph
+ {{localIcon}} + + + + {{#if flightIcon}} + {{flightIcon}} + {{else}} + — + {{/if}} + + {{#if flightIcon}} + + {{else}} + — + {{/if}} +
`, context: { types: icons, - size: select('Size', ['s', 'm', 'l', 'xl', 'xxl'], 'm'), + structureIconMap, + localIconMap, + size: select('Size', ['16', '24'], '16'), }, }), { notes } diff --git a/ui/lib/core/stories/toolbar/toolbar-filters.md b/ui/lib/core/stories/toolbar/toolbar-filters.md index 6f95cc3d1..5c8e8be4b 100644 --- a/ui/lib/core/stories/toolbar/toolbar-filters.md +++ b/ui/lib/core/stories/toolbar/toolbar-filters.md @@ -1,9 +1,10 @@ - + ## ToolbarFilters `ToolbarFilters` components are containers for Toolbar filters and toggles. It should only be used inside of `Toolbar`. +**Params** **Example** ```js @@ -11,7 +12,7 @@ It should only be used inside of `Toolbar`.
- +
@@ -20,6 +21,6 @@ It should only be used inside of `Toolbar`. **See** - [Uses of ToolbarFilters](https://github.com/hashicorp/vault/search?l=Handlebars&q=ToolbarFilters+OR+toolbar-filters) -- [ToolbarFilters Source Code](https://github.com/hashicorp/vault/blob/master/ui/app/components/toolbar-filters.js) +- [ToolbarFilters Source Code](https://github.com/hashicorp/vault/blob/master/ui/lib/core/addon/components/toolbar-filters.js) --- diff --git a/ui/lib/core/stories/toolbar/toolbar-filters.stories.js b/ui/lib/core/stories/toolbar/toolbar-filters.stories.js index a790bd6b1..f9165161c 100644 --- a/ui/lib/core/stories/toolbar/toolbar-filters.stories.js +++ b/ui/lib/core/stories/toolbar/toolbar-filters.stories.js @@ -15,7 +15,7 @@ storiesOf('Toolbar', module)
- +
diff --git a/ui/lib/core/stories/toolbar/toolbar.stories.js b/ui/lib/core/stories/toolbar/toolbar.stories.js index 18bdc7299..72ef73462 100644 --- a/ui/lib/core/stories/toolbar/toolbar.stories.js +++ b/ui/lib/core/stories/toolbar/toolbar.stories.js @@ -17,7 +17,7 @@ storiesOf('Toolbar', module)
- +
diff --git a/ui/lib/kmip/addon/templates/components/header-scope.hbs b/ui/lib/kmip/addon/templates/components/header-scope.hbs index 24191dc92..4261ffdc1 100644 --- a/ui/lib/kmip/addon/templates/components/header-scope.hbs +++ b/ui/lib/kmip/addon/templates/components/header-scope.hbs @@ -5,8 +5,8 @@

{{this.secretMountPath.currentPath}} diff --git a/ui/lib/kmip/addon/templates/components/operation-field-display.hbs b/ui/lib/kmip/addon/templates/components/operation-field-display.hbs index b41f2d074..735b52182 100644 --- a/ui/lib/kmip/addon/templates/components/operation-field-display.hbs +++ b/ui/lib/kmip/addon/templates/components/operation-field-display.hbs @@ -12,7 +12,7 @@

diff --git a/ui/lib/replication/addon/templates/components/path-filter-config-list.hbs b/ui/lib/replication/addon/templates/components/path-filter-config-list.hbs index 15ddfe8f7..80f1709b7 100644 --- a/ui/lib/replication/addon/templates/components/path-filter-config-list.hbs +++ b/ui/lib/replication/addon/templates/components/path-filter-config-list.hbs @@ -9,10 +9,10 @@ >
+ />
Include everything @@ -43,10 +43,10 @@ >
+ />
Allow @@ -77,8 +77,8 @@ >
diff --git a/ui/lib/replication/addon/templates/components/replication-primary-card.hbs b/ui/lib/replication/addon/templates/components/replication-primary-card.hbs index 413df111d..94e48914d 100644 --- a/ui/lib/replication/addon/templates/components/replication-primary-card.hbs +++ b/ui/lib/replication/addon/templates/components/replication-primary-card.hbs @@ -14,7 +14,7 @@ unknown {{/if}} {{#if (and glyph (not hasError))}} - + {{/if}}
diff --git a/ui/lib/replication/addon/templates/components/replication-summary.hbs b/ui/lib/replication/addon/templates/components/replication-summary.hbs index 1a4ae7b05..2bb5bf912 100644 --- a/ui/lib/replication/addon/templates/components/replication-summary.hbs +++ b/ui/lib/replication/addon/templates/components/replication-summary.hbs @@ -36,7 +36,7 @@ {{#if initialReplicationMode}} {{#if (eq initialReplicationMode 'dr')}}

-

@@ -44,7 +44,7 @@

{{else if (eq initialReplicationMode 'performance')}}

-

{{#unless (has-feature "Performance Replication")}} @@ -70,7 +70,7 @@