diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index eaad618a7..c4d47c686 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -454,7 +454,6 @@ storage-bucket: help_org: This storage bucket will be available for use with targets within this org. provider: label: Provider - help: Boundary currently only supports Amazon S3 storage. endpoint_url: label: Endpoint URL help: Cannot be changed later. @@ -706,7 +705,7 @@ target: help: The local proxy port on which to listen by default when a session is started on a client. sidebar: label: Session Recording - help: Record SSH sessions on this target and save them to an Amazon S3 bucket. + help: Record SSH sessions on this target and save them to a storage bucket. link: Session Recording settings questions: delete-host-sources: diff --git a/ui/admin/app/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index.js b/ui/admin/app/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index.js index 8706e63d9..fd774c8ff 100644 --- a/ui/admin/app/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index.js +++ b/ui/admin/app/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index.js @@ -62,7 +62,7 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne try { await sessionRecording.reapplyStoragePolicy(); } catch (e) { - await this.router.replaceWith('scopes.scope.session-recordings'); + this.router.replaceWith('scopes.scope.session-recordings'); this.router.refresh(); throw new Error(e); } @@ -79,7 +79,7 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne @notifySuccess('notifications.delete-success') async delete(sessionRecording) { await sessionRecording.destroyRecord(); - await this.router.replaceWith('scopes.scope.session-recordings'); + this.router.replaceWith('scopes.scope.session-recordings'); this.router.refresh(); } } diff --git a/ui/admin/app/routes/scopes/scope/session-recordings/index.js b/ui/admin/app/routes/scopes/scope/session-recordings/index.js index 1b3bcf23b..3e918da80 100644 --- a/ui/admin/app/routes/scopes/scope/session-recordings/index.js +++ b/ui/admin/app/routes/scopes/scope/session-recordings/index.js @@ -96,7 +96,10 @@ export default class ScopesScopeSessionRecordingsIndexRoute extends Route { if (!this.allSessionRecordings) { await this.getAllSessionRecordings(scope_id); } - doSessionRecordingsExist = Boolean(this.allSessionRecordings.length); + doSessionRecordingsExist = await this.getDoSessionRecordingsExist( + scope_id, + totalItems, + ); doStorageBucketsExist = await this.getDoStorageBucketsExist(scope_id); return { @@ -125,6 +128,30 @@ export default class ScopesScopeSessionRecordingsIndexRoute extends Route { ); } + /** + * Sets doSessionRecordingsExist to true if there are any session recordings. + * @param {string} scope_id + * @param {number} totalItems + * @returns {Promise} + */ + async getDoSessionRecordingsExist(scope_id, totalItems) { + if (totalItems > 0) { + return true; + } + const options = { pushToStore: false, peekIndexedDB: true }; + const sessionRecordings = await this.store.query( + 'session-recording', + { + scope_id, + page: 1, + pageSize: 1, + recursive: true, + }, + options, + ); + return sessionRecordings.length > 0; + } + /** * Returns true if any storage buckets exist. * @param {string} scope_id