Merge pull request #14100 from grafana/fix-save-redirect-issue

fix for save dashboard redirect issue
This commit is contained in:
Marcus Efraimsson
2018-11-16 04:03:47 -08:00
committed by GitHub

View File

@@ -77,6 +77,10 @@ export class DashboardSrv {
postSave(clone, data) {
this.dash.version = data.version;
// important that these happens before location redirect below
this.$rootScope.appEvent('dashboard-saved', this.dash);
this.$rootScope.appEvent('alert-success', ['Dashboard saved']);
const newUrl = locationUtil.stripBaseFromUrl(data.url);
const currentPath = this.$location.path();
@@ -84,9 +88,6 @@ export class DashboardSrv {
this.$location.url(newUrl).replace();
}
this.$rootScope.appEvent('dashboard-saved', this.dash);
this.$rootScope.appEvent('alert-success', ['Dashboard saved']);
return this.dash;
}