mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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>
This commit is contained in:
parent
29c76b98d4
commit
b039995a4e
@ -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}/`,
|
||||
}));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user