Dashboard: Go to explore now works even after discarding dashboard changes (#24149)

* Explore: Fix issue with going to explore

* removed console log
This commit is contained in:
Torkel Ödegaard 2020-05-04 14:11:03 +02:00 committed by GitHub
parent 215f2e005b
commit 5f621a736a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
});
};
}