From: Aashish Sharma Date: Thu, 27 Nov 2025 09:22:47 +0000 (+0530) Subject: mgr/dashboard: fix multi-cluster route reload logic X-Git-Tag: testing/wip-vshankar-testing-20251204.133709-debug^2~6^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d8d82a6c003437611ab6e966bf97ed9efc1eb9fc;p=ceph-ci.git mgr/dashboard: fix multi-cluster route reload logic Issue: Route was being force-reloaded using a two-step navigation hack causing unnecessary redirects and side effects. Fix: Replaced the hack with Angular’s native same-URL reload using onSameUrlNavigation: 'reload' for a clean, stable route refresh. Fixes: https://tracker.ceph.com/issues/74008 Signed-off-by: Aashish Sharma --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts index e17c1a741aa..0864ff5a9c1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts @@ -186,14 +186,9 @@ export class MultiClusterService { this.refresh(); this.refreshTokenStatus(); this.summaryService.refresh(); - if (currentRoute.includes('dashboard')) { - this.router.navigateByUrl('/pool', { skipLocationChange: true }).then(() => { - this.router.navigate([currentRoute]); - }); - } else { - this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => { - this.router.navigate([currentRoute]); - }); - } + this.router.navigate([currentRoute], { + onSameUrlNavigation: 'reload', + skipLocationChange: false + }); } }