diff --git a/addons/api/mirage/scenarios/ipc.js b/addons/api/mirage/scenarios/ipc.js index 0920fd963..729b9fa25 100644 --- a/addons/api/mirage/scenarios/ipc.js +++ b/addons/api/mirage/scenarios/ipc.js @@ -65,10 +65,10 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'application', - secret: btoa('just-a-random-string') + secret: btoa('just-a-random-string'), }, { credential_library: { @@ -76,16 +76,18 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'ingress', - secret: btoa(JSON.stringify({ - key1: 'value 1', - key2: true, - key3: { - description: 'nested values' - } - })) + secret: btoa( + JSON.stringify({ + key1: 'value 1', + key2: true, + key3: { + description: 'nested values', + }, + }) + ), }, { credential_library: { @@ -93,10 +95,10 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'application', - secret: btoa('just-a-random-string') + secret: btoa('just-a-random-string'), }, { credential_library: { @@ -104,18 +106,20 @@ export default function initializeMockIPC(server) { name: 'Library Name', description: 'Library Description', credential_store_id: 'csvlt_Q1HFGt7Jpm', - type: 'vault' + type: 'vault', }, purpose: 'egress', - secret: btoa(JSON.stringify({ - key1: 'value 1', - key2: true, - key3: { - description: 'nested values' - } - })) + secret: btoa( + JSON.stringify({ + key1: 'value 1', + key2: true, + key3: { + description: 'nested values', + }, + }) + ), }, - ] + ], }; } diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index fc4fa2c65..c5f48f0c8 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -261,3 +261,4 @@ target: add: title: Add Host Sets description: Select host sets to assign to this target. + secret: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ diff --git a/ui/desktop/app/components/hidden-secret/index.hbs b/ui/desktop/app/components/hidden-secret/index.hbs new file mode 100644 index 000000000..6bdd9972e --- /dev/null +++ b/ui/desktop/app/components/hidden-secret/index.hbs @@ -0,0 +1,11 @@ +
+ {{! TODO: The span wrap within a div because later we will add the toggle secret icon/button}} +
+ {{t 'resources.target.host-set.secret'}} +
+ +
\ No newline at end of file diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 4abf9c368..a35ab2cb9 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -452,3 +452,14 @@ $chevron-down: url("data:image/svg+xml;utf-8, + ttl @@ -116,4 +118,4 @@ {{/each}} {{/each}} -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/tests/integration/components/hidden-secret-test.js b/ui/desktop/tests/integration/components/hidden-secret-test.js new file mode 100644 index 000000000..87e33a329 --- /dev/null +++ b/ui/desktop/tests/integration/components/hidden-secret-test.js @@ -0,0 +1,21 @@ +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 | hidden-secret', function (hooks) { + setupRenderingTest(hooks); + + test('it renders with a secret', async function (assert) { + assert.expect(2); + await render(hbs` + + `); + + assert.ok(find('.hidden-secret')); + assert.equal( + find('.hidden-secret > div > span').textContent.trim(), + '■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■' + ); + }); +});