dashfolders: relative links should work when root_path is specified (#10363)

Fixes #10336
This commit is contained in:
Marcus Efraimsson
2017-12-31 12:24:21 +01:00
committed by Torkel Ödegaard
parent d210e766e7
commit 11ae7d5964
5 changed files with 8 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ export class CreateFolderCtrl {
return this.backendSrv.createDashboardFolder(this.title).then(result => {
appEvents.emit('alert-success', ['Folder Created', 'OK']);
var folderUrl = `/dashboards/folder/${result.dashboard.id}/${result.meta.slug}`;
var folderUrl = `dashboards/folder/${result.dashboard.id}/${result.meta.slug}`;
this.$location.url(folderUrl);
});
}

View File

@@ -65,6 +65,6 @@ export class FolderPageLoader {
}
createFolderUrl(folderId: number, type: string, slug: string) {
return `/dashboards/folder/${folderId}/${slug}`;
return `dashboards/folder/${folderId}/${slug}`;
}
}

View File

@@ -67,7 +67,7 @@ export class FolderSettingsCtrl {
onConfirm: () => {
return this.backendSrv.deleteDashboard(this.meta.slug).then(() => {
appEvents.emit('alert-success', ['Folder Deleted', `${this.dashboard.title} has been deleted`]);
this.$location.url('/dashboards');
this.$location.url('dashboards');
});
},
});