Commit 8009307c by Marcus Efraimsson

dashboards: when saving dashboard redirect if url changes

Redirect if new dashboard created or existing url changes.
#7883
parent aefcff26
......@@ -73,9 +73,8 @@ export class DashboardSrv {
postSave(clone, data) {
this.dash.version = data.version;
var dashboardUrl = '/dashboard/db/' + data.slug;
if (dashboardUrl !== this.$location.path()) {
this.$location.url(dashboardUrl);
if (data.url !== this.$location.path()) {
this.$location.url(data.url);
}
this.$rootScope.appEvent('dashboard-saved', this.dash);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment