mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Fixes issue with title or folder change has no effect after exiting settings view (#34677) (#34786)
* Dashboard: Fixes issue with title or folder change has no effect after existing settings view
* Updates snapshot
(cherry picked from commit 6394a60a08
)
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
parent
631b2f08a8
commit
3acfa1b8d0
@ -24,6 +24,8 @@ export interface OwnProps {
|
||||
isFullscreen: boolean;
|
||||
kioskMode: KioskMode;
|
||||
hideTimePicker: boolean;
|
||||
folderTitle?: string;
|
||||
title: string;
|
||||
onAddPanel: () => void;
|
||||
}
|
||||
|
||||
@ -245,14 +247,14 @@ class DashNav extends PureComponent<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { dashboard, isFullscreen } = this.props;
|
||||
const { isFullscreen, title, folderTitle } = this.props;
|
||||
const onGoBack = isFullscreen ? this.onClose : undefined;
|
||||
|
||||
return (
|
||||
<PageToolbar
|
||||
pageIcon={isFullscreen ? undefined : 'apps'}
|
||||
title={dashboard.title}
|
||||
parent={dashboard.meta.folderTitle}
|
||||
title={title}
|
||||
parent={folderTitle}
|
||||
onClickTitle={this.onDashboardNameClick}
|
||||
onClickParent={this.onFolderNameClick}
|
||||
onGoBack={onGoBack}
|
||||
|
@ -310,6 +310,8 @@ export class UnthemedDashboardPage extends PureComponent<Props, State> {
|
||||
<div aria-label={selectors.pages.Dashboard.DashNav.nav}>
|
||||
<DashNav
|
||||
dashboard={dashboard}
|
||||
title={dashboard.title}
|
||||
folderTitle={dashboard.meta.folderTitle}
|
||||
isFullscreen={!!viewPanel}
|
||||
onAddPanel={this.onAddPanel}
|
||||
kioskMode={kioskMode}
|
||||
|
@ -116,6 +116,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1`
|
||||
isFullscreen={false}
|
||||
kioskMode="off"
|
||||
onAddPanel={[Function]}
|
||||
title="My dashboard"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -495,6 +496,7 @@ exports[`DashboardPage When dashboard has editview url state should render setti
|
||||
isFullscreen={false}
|
||||
kioskMode="off"
|
||||
onAddPanel={[Function]}
|
||||
title="My dashboard"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user