fix for dashboard/folder url's when having a sub path in root_url config

This commit is contained in:
Marcus Efraimsson
2018-02-01 16:30:48 +01:00
parent d8d82c1769
commit 3db328f516
8 changed files with 53 additions and 46 deletions

View File

@@ -1,4 +1,5 @@
import { FolderPageLoader } from './folder_page_loader';
import locationUtil from 'app/core/utils/location_util';
export class FolderDashboardsCtrl {
navModel: any;
@@ -13,8 +14,10 @@ export class FolderDashboardsCtrl {
const loader = new FolderPageLoader(this.backendSrv);
loader.load(this, this.uid, 'manage-folder-dashboards').then(folder => {
if ($location.path() !== folder.meta.url) {
$location.path(folder.meta.url).replace();
const url = locationUtil.stripBaseFromUrl(folder.meta.url);
if (url !== $location.path()) {
$location.path(url).replace();
}
});
}