chore: 🤖 toggle translation based on state (#2106)
This commit is contained in:
1 parent
db50bfc9df
commit
24fdd926f1
3 files changed
+20
-14
No files matched your search
@@ -954,6 +954,7 @@ policy:
|
||||
messages:
|
||||
detach: Successfully detached
|
||||
reapply: Successfully reapplied
|
||||
later: Policy will be reapplied after the recording has completed
|
||||
none:
|
||||
title: No storage policies yet
|
||||
description: A Storage Policy defines how long Session Recordings must be kept and when they should be deleted. We recommend checking your data retention policies for compliance requirements.
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
import orderBy from 'lodash/orderBy';
|
||||
|
||||
export default class ScopesScopeSessionRecordingsRoute extends Route {
|
||||
@@ -70,16 +68,4 @@ export default class ScopesScopeSessionRecordingsRoute extends Route {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reapplies storage policy dates to session recording
|
||||
* @param {SessionRecordingModel}
|
||||
*/
|
||||
@action
|
||||
@notifyError(({ message }) => message, { catch: true })
|
||||
@notifySuccess('resources.policy.messages.reapply')
|
||||
async reapplyStoragepolicy(sessionRecording) {
|
||||
await sessionRecording.reapplyStoragePolicy();
|
||||
super.refresh(...arguments);
|
||||
}
|
||||
}
|
||||
+19
@@ -5,6 +5,9 @@
|
||||
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
import { STATE_SESSION_RECORDING_AVAILABLE } from 'api/models/session-recording';
|
||||
|
||||
export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConnectionRoute extends Route {
|
||||
// =services
|
||||
@@ -48,4 +51,20 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne
|
||||
storageBucket,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Reapplies storage policy dates to session recording
|
||||
* @param {SessionRecordingModel}
|
||||
*/
|
||||
@action
|
||||
@notifyError(({ message }) => message, { catch: true })
|
||||
@notifySuccess(({ state }) =>
|
||||
state === STATE_SESSION_RECORDING_AVAILABLE
|
||||
? 'resources.policy.messages.reapply'
|
||||
: 'resources.policy.messages.later',
|
||||
)
|
||||
async reapplyStoragepolicy(sessionRecording) {
|
||||
await sessionRecording.reapplyStoragePolicy();
|
||||
super.refresh(...arguments);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user