mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DashboardScene: Only update/replace location for normal dashboard route (#84747)
This commit is contained in:
parent
97156bb759
commit
862305d5ce
@ -80,14 +80,16 @@ export class DashboardScenePageStateManager extends StateManagerBase<DashboardSc
|
||||
break;
|
||||
default:
|
||||
rsp = await dashboardLoaderSrv.loadDashboard('db', '', uid);
|
||||
|
||||
if (route === DashboardRoutes.Embedded) {
|
||||
rsp.meta.isEmbedded = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (rsp.meta.url && route !== DashboardRoutes.Embedded) {
|
||||
if (rsp.meta.url && route === DashboardRoutes.Normal) {
|
||||
const dashboardUrl = locationUtil.stripBaseFromUrl(rsp.meta.url);
|
||||
const currentPath = locationService.getLocation().pathname;
|
||||
|
||||
if (dashboardUrl !== currentPath) {
|
||||
// Spread current location to persist search params used for navigation
|
||||
locationService.replace({
|
||||
|
@ -96,6 +96,7 @@ export enum DashboardRoutes {
|
||||
Scripted = 'scripted-dashboard',
|
||||
Public = 'public-dashboard',
|
||||
Embedded = 'embedded-dashboard',
|
||||
Report = 'report-dashboard',
|
||||
}
|
||||
|
||||
export enum DashboardInitPhase {
|
||||
|
Loading…
Reference in New Issue
Block a user