diff --git a/public/app/features/dashboard-scene/scene/DashboardScene.tsx b/public/app/features/dashboard-scene/scene/DashboardScene.tsx index 3358f3f696c..c267b3cc5b5 100644 --- a/public/app/features/dashboard-scene/scene/DashboardScene.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardScene.tsx @@ -44,7 +44,7 @@ import { historySrv } from '../settings/version-history'; import { DashboardModelCompatibilityWrapper } from '../utils/DashboardModelCompatibilityWrapper'; import { dashboardSceneGraph, getLibraryVizPanelFromVizPanel } from '../utils/dashboardSceneGraph'; import { djb2Hash } from '../utils/djb2Hash'; -import { getDashboardUrl } from '../utils/urlBuilders'; +import { getDashboardUrl, getViewPanelUrl } from '../utils/urlBuilders'; import { NEW_PANEL_HEIGHT, NEW_PANEL_WIDTH, @@ -418,6 +418,7 @@ export class DashboardScene extends SceneObjectBase { pageNav = { text: 'View panel', parentItem: pageNav, + url: getViewPanelUrl(viewPanelScene.state.panelRef.resolve()), }; } diff --git a/public/app/features/dashboard-scene/utils/urlBuilders.ts b/public/app/features/dashboard-scene/utils/urlBuilders.ts index fc334be29fb..a7b328bab72 100644 --- a/public/app/features/dashboard-scene/utils/urlBuilders.ts +++ b/public/app/features/dashboard-scene/utils/urlBuilders.ts @@ -83,7 +83,10 @@ export function getDashboardUrl(options: DashboardUrlOptions) { } export function getViewPanelUrl(vizPanel: VizPanel) { - return locationUtil.getUrlForPartial(locationService.getLocation(), { viewPanel: vizPanel.state.key }); + return locationUtil.getUrlForPartial(locationService.getLocation(), { + viewPanel: vizPanel.state.key, + editPanel: undefined, + }); } export function getEditPanelUrl(panelId: number) {