mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix for dashboard/folder url's when having a sub path in root_url config
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user