From 8527f986dbb9e8b7cfb40e6217ff85dc75cd9ec9 Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:55:14 +0000 Subject: [PATCH] PanelInspectDrawer: Fix issue where closing inspect drawer on home dashboard redirects to new dashboard (#96711) --- .../features/dashboard-scene/inspect/PanelInspectDrawer.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/features/dashboard-scene/inspect/PanelInspectDrawer.tsx b/public/app/features/dashboard-scene/inspect/PanelInspectDrawer.tsx index 59b38232d74..285ac26b6a0 100644 --- a/public/app/features/dashboard-scene/inspect/PanelInspectDrawer.tsx +++ b/public/app/features/dashboard-scene/inspect/PanelInspectDrawer.tsx @@ -92,6 +92,8 @@ export class PanelInspectDrawer extends SceneObjectBase onClose = () => { const dashboard = getDashboardSceneFor(this); + const meta = dashboard.state.meta; + locationService.push( getDashboardUrl({ uid: dashboard.state.uid, @@ -101,6 +103,7 @@ export class PanelInspectDrawer extends SceneObjectBase inspect: null, inspectTab: null, }, + isHomeDashboard: !meta.url && !meta.slug && !meta.isNew, }) ); };