From d8d82a6c003437611ab6e966bf97ed9efc1eb9fc Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Thu, 27 Nov 2025 14:52:47 +0530 Subject: [PATCH] mgr/dashboard: fix multi-cluster route reload logic MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .../src/app/shared/api/multi-cluster.service.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 + }); } } -- 2.47.3