From 2664575a4aefebe2487934369e420e47f7a531e8 Mon Sep 17 00:00:00 2001 From: GitStart <1501599+gitstart@users.noreply.github.com> Date: Fri, 30 Sep 2022 04:18:50 -0300 Subject: [PATCH] Dashboard Edited/Saved notifications leak into other views (#55540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nitesh Singh Co-authored-by: gitstart Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com> Co-authored-by: RubensRafael Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com> Co-authored-by: Thiago Nascimbeni Co-authored-by: gitstart Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral Co-authored-by: gitstart Co-authored-by: Nitesh Singh Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com> Co-authored-by: RubensRafael Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com> Co-authored-by: Thiago Nascimbeni Co-authored-by: gitstart Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral --- public/app/features/dashboard/state/actions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/features/dashboard/state/actions.ts b/public/app/features/dashboard/state/actions.ts index ff2f03de9d0..ff718ddf6a9 100644 --- a/public/app/features/dashboard/state/actions.ts +++ b/public/app/features/dashboard/state/actions.ts @@ -2,6 +2,7 @@ import { TimeZone } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createSuccessNotification } from 'app/core/copy/appNotification'; +import { dashboardWatcher } from 'app/features/live/dashboard/dashboardWatcher'; import { updateTimeZoneForSession, updateWeekStartForSession } from 'app/features/profile/state/reducers'; import { DashboardAcl, DashboardAclUpdateDTO, NewDashboardAclItem, PermissionLevel, ThunkResult } from 'app/types'; @@ -124,6 +125,7 @@ export const cleanUpDashboardAndVariables = (): ThunkResult => (dispatch, getTimeSrv().stopAutoRefresh(); dispatch(cleanUpDashboard()); + dashboardWatcher.leave(); }; export const updateTimeZoneDashboard =