diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 593e9db6a..c63974fe8 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -261,12 +261,10 @@ storage-bucket: titles: new: New Storage Bucket aws: AWS - global: Global - orgs: Orgs - types: - aws_s3: AWS S3 actions: delete: Delete Storage Bucket + types: + aws_s3: AWS S3 form: scope: label: Scope diff --git a/ui/admin/app/components/form/storage-bucket/index.hbs b/ui/admin/app/components/form/storage-bucket/index.hbs index 18018710f..aec210bde 100644 --- a/ui/admin/app/components/form/storage-bucket/index.hbs +++ b/ui/admin/app/components/form/storage-bucket/index.hbs @@ -11,7 +11,7 @@ as |form| > {{#if B.data.scopeModel.isGlobal}} - + {{else}} {{/if}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/index.hbs b/ui/admin/app/templates/scopes/scope/targets/target/index.hbs index d76840a99..fc3152c1a 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/index.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/index.hbs @@ -56,7 +56,7 @@ diff --git a/ui/admin/tests/acceptance/targets/read-test.js b/ui/admin/tests/acceptance/targets/read-test.js index a4367202c..55b127369 100644 --- a/ui/admin/tests/acceptance/targets/read-test.js +++ b/ui/admin/tests/acceptance/targets/read-test.js @@ -21,7 +21,7 @@ module('Acceptance | targets | read', function (hooks) { setupMirage(hooks); let featuresService; - + const LINK_LIST_SELECTOR = '.link-list-item'; const instances = { scopes: { global: null, @@ -30,6 +30,7 @@ module('Acceptance | targets | read', function (hooks) { }, sshTarget: null, tcpTarget: null, + storageBucket: null, }; const urls = { globalScope: null, @@ -39,6 +40,7 @@ module('Acceptance | targets | read', function (hooks) { sshTarget: null, tcpTarget: null, enableSessionRecording: null, + storageBucket: null, }; hooks.beforeEach(function () { @@ -61,6 +63,9 @@ module('Acceptance | targets | read', function (hooks) { type: TYPE_TARGET_TCP, scope: instances.scopes.project, }); + instances.storageBucket = this.server.create('storage-bucket', { + scope: instances.scopes.global, + }); // Generate route URLs for resources urls.globalScope = `/scopes/global/scopes`; urls.orgScope = `/scopes/${instances.scopes.org.id}/scopes`; @@ -70,6 +75,7 @@ module('Acceptance | targets | read', function (hooks) { urls.tcpTarget = `${urls.targets}/${instances.tcpTarget.id}`; urls.unknownTarget = `${urls.targets}/foo`; urls.enableSessionRecording = `${urls.sshTarget}/enable-session-recording`; + urls.storageBucket = `${urls.projectScope}/storage-buckets/${instances.storageBucket.id}`; authenticateSession({}); }); @@ -214,6 +220,19 @@ module('Acceptance | targets | read', function (hooks) { assert.strictEqual(currentURL(), urls.enableSessionRecording); }); + test('users can click on associated storage bucket card on an ssh target', async function (assert) { + assert.expect(1); + featuresService.enable('ssh-target'); + featuresService.enable('session-recording'); + instances.sshTarget.update({ storageBucketId: instances.storageBucket.id }); + await visit(urls.targets); + + await click(`[href="${urls.sshTarget}"]`); + await click(LINK_LIST_SELECTOR); + + assert.strictEqual(currentURL(), urls.storageBucket); + }); + test('users can click on settings icon in target session-recording sidebar and it takes them to enable session recording', async function (assert) { featuresService.enable('session-recording'); assert.expect(1);