Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard: Fix issue with title or folder change has no effect after exiting settings view #34677

Merged
merged 2 commits into from May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -24,6 +24,8 @@ export interface OwnProps {
isFullscreen: boolean;
kioskMode: KioskMode;
hideTimePicker: boolean;
folderTitle?: string;
title: string;
onAddPanel: () => void;
}

Expand Down Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions public/app/features/dashboard/containers/DashboardPage.tsx
Expand Up @@ -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}
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down