From 4e435c29171762c82c5fa00475f7dc3b6b713ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 4 May 2020 14:11:03 +0200 Subject: [PATCH] Dashboard: Go to explore now works even after discarding dashboard changes (#24149) * Explore: Fix issue with going to explore * removed console log (cherry picked from commit 5f621a736a99ac54d95e8ecc2ae672beb93b29b1) --- public/app/features/dashboard/services/ChangeTracker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/features/dashboard/services/ChangeTracker.ts b/public/app/features/dashboard/services/ChangeTracker.ts index 16d1832355b..0cec93b1796 100644 --- a/public/app/features/dashboard/services/ChangeTracker.ts +++ b/public/app/features/dashboard/services/ChangeTracker.ts @@ -6,7 +6,6 @@ import { GrafanaRootScope } from 'app/routes/GrafanaCtrl'; import { AppEventConsumer, CoreEvents } from 'app/types'; import { appEvents } from 'app/core/app_events'; import { UnsavedChangesModal } from '../components/SaveDashboard/UnsavedChangesModal'; -import { getLocationSrv } from '@grafana/runtime'; export class ChangeTracker { current: any; @@ -188,8 +187,9 @@ export class ChangeTracker { gotoNext = () => { const baseLen = this.$location.absUrl().length - this.$location.url().length; const nextUrl = this.next.substring(baseLen); - getLocationSrv().update({ - path: nextUrl, + + this.$timeout(() => { + this.$location.url(nextUrl); }); }; }