From b039995a4ea7c07721f36a0ae271abdccd919b15 Mon Sep 17 00:00:00 2001 From: butkovv <52626407+butkovv@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:15:05 +0300 Subject: [PATCH] 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 --- public/app/features/browse-dashboards/api/services.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/features/browse-dashboards/api/services.ts b/public/app/features/browse-dashboards/api/services.ts index f4318793358..3892593ac79 100644 --- a/public/app/features/browse-dashboards/api/services.ts +++ b/public/app/features/browse-dashboards/api/services.ts @@ -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}/`, })); }