mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboards: when saving dashboard redirect if url changes
Redirect if new dashboard created or existing url changes. #7883
This commit is contained in:
parent
aefcff26a6
commit
8009307c16
@ -73,9 +73,8 @@ export class DashboardSrv {
|
|||||||
postSave(clone, data) {
|
postSave(clone, data) {
|
||||||
this.dash.version = data.version;
|
this.dash.version = data.version;
|
||||||
|
|
||||||
var dashboardUrl = '/dashboard/db/' + data.slug;
|
if (data.url !== this.$location.path()) {
|
||||||
if (dashboardUrl !== this.$location.path()) {
|
this.$location.url(data.url);
|
||||||
this.$location.url(dashboardUrl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$rootScope.appEvent('dashboard-saved', this.dash);
|
this.$rootScope.appEvent('dashboard-saved', this.dash);
|
||||||
|
Loading…
Reference in New Issue
Block a user