fix: 🐛 refresh action in session recording (#3229)

This commit is contained in:
Dharini authored and GitHub committed 2026-04-22 10:54:50 -07:00
1 parent 337963bff8
commit 4f9086642b
7 files changed
+40 -5

No files matched your search

@@ -17,6 +17,7 @@ export default class ScopesScopeSessionRecordingsIndexController extends Control
@service store;
@service intl;
@service db;
@service router;
// =attributes
@@ -235,10 +236,9 @@ export default class ScopesScopeSessionRecordingsIndexController extends Control
* Refreshes the all data for the current page
*/
@action
refresh() {
this.router.refresh('scopes.scope.session-recordings');
async refresh() {
await this.currentRoute.refreshAll();
}
/**
* Sets sort values and sets page to 1
* @param {string} sortBy
@@ -181,8 +181,8 @@ export default class ScopesScopeSessionsIndexController extends Controller {
* Refreshes the all data for the current page
*/
@action
refresh() {
this.router.refresh('scopes.scope.sessions');
async refresh() {
await this.currentRoute.refreshAll();
}
/**
@@ -5,6 +5,7 @@
import Route from '@ember/routing/route';
import { service } from '@ember/service';
import { action } from '@ember/object';
import { restartableTask, timeout } from 'ember-concurrency';
import {
STATE_SESSION_RECORDING_STARTED,
@@ -203,12 +204,18 @@ export default class ScopesScopeSessionRecordingsIndexRoute extends Route {
// =actions
@action
async refreshAll() {
return super.refresh(...arguments);
}
/**
* Loads initial filter options in controller so it happens outside of model hook
* @param controller
*/
setupController(controller) {
super.setupController(...arguments);
controller.currentRoute = this;
controller.loadItems.perform();
}
}
@@ -6,6 +6,7 @@
import Route from '@ember/routing/route';
import { service } from '@ember/service';
import { restartableTask, timeout } from 'ember-concurrency';
import { action } from '@ember/object';
export default class ScopesScopeSessionsIndexRoute extends Route {
// =services
@@ -255,6 +256,12 @@ export default class ScopesScopeSessionsIndexRoute extends Route {
*/
setupController(controller) {
super.setupController(...arguments);
controller.currentRoute = this;
controller.loadItems.perform();
}
@action
async refreshAll() {
return super.refresh(...arguments);
}
}