From 91fc73bf82c472bd30d0bb00e381e1091e620afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 13 Mar 2019 13:51:22 +0100 Subject: [PATCH] Fixed issue with alert links in alert list panel causing panel not found errors, fixes #15680 --- .../app/features/dashboard/containers/DashboardPage.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 1a970d3edc0..76676b4bc57 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -92,11 +92,12 @@ export class DashboardPage extends PureComponent { componentWillUnmount() { if (this.props.dashboard) { this.props.cleanUpDashboard(); + this.setPanelFullscreenClass(false); } } componentDidUpdate(prevProps: Props) { - const { dashboard, editview, urlEdit, urlFullscreen, urlPanelId } = this.props; + const { dashboard, editview, urlEdit, urlFullscreen, urlPanelId, urlUid } = this.props; if (!dashboard) { return; @@ -107,6 +108,12 @@ export class DashboardPage extends PureComponent { document.title = dashboard.title + ' - Grafana'; } + // Due to the angular -> react url bridge we can ge an update here with new uid before the container unmounts + // Can remove this condition after we switch to react router + if (prevProps.urlUid !== urlUid) { + return; + } + // handle animation states when opening dashboard settings if (!prevProps.editview && editview) { this.setState({ isSettingsOpening: true });