mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard scenes: Fix view panel breadcrum when going to edit from view single panel (#87411)
Fix view panel breadcrum when going to edit from view panel
This commit is contained in:
parent
37af1ae58e
commit
c6975e06d2
@ -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<DashboardSceneState> {
|
||||
pageNav = {
|
||||
text: 'View panel',
|
||||
parentItem: pageNav,
|
||||
url: getViewPanelUrl(viewPanelScene.state.panelRef.resolve()),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user