[v11.0.x] BrowseDashboards: Add subpath to URLs on Browse Dashboards page (#85354)
BrowseDashboards: Add subpath to URLs on Browse Dashboards page (#84992)
* BrowseDashboards: Add subpath to URLs on Browse Dashboards page
* comment
* use existing config
* comment
---------
Co-authored-by: joshhunt <josh@trtr.co>
(cherry picked from commit b039995a4e)
Co-authored-by: butkovv <52626407+butkovv@users.noreply.github.com>
This commit is contained in:
co-authored by
butkovv
parent
355fec625b
commit
0c10923304
@@ -30,6 +30,7 @@ export async function listFolders(
|
||||
limit: pageSize,
|
||||
});
|
||||
}
|
||||
const subUrlPrefix = config.appSubUrl ?? '';
|
||||
|
||||
return folders.map((item) => ({
|
||||
kind: 'folder',
|
||||
@@ -37,7 +38,9 @@ export async function listFolders(
|
||||
title: item.title,
|
||||
parentTitle,
|
||||
parentUID,
|
||||
url: isSharedWithMe(item.uid) ? undefined : `/dashboards/f/${item.uid}/`,
|
||||
|
||||
// URLs from the backend come with subUrlPrefix already included, so match that behaviour here
|
||||
url: isSharedWithMe(item.uid) ? undefined : `${subUrlPrefix}/dashboards/f/${item.uid}/`,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user