Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4ea5a35
Add /children endpoint
aocenas Jun 18, 2025
fe84c8c
Update folder client
aocenas Jun 19, 2025
a9c2f4c
Add comment
aocenas Jun 19, 2025
d867638
Add feature toggle
aocenas Jun 20, 2025
187e977
Add new version of useFoldersQuery
aocenas Jun 20, 2025
db5b914
Merge branch 'main' into aocenas/folders/migrate-api
Clarity-89 Jun 26, 2025
c70aaff
Error handling
Clarity-89 Jun 26, 2025
8e8ad40
Format
Clarity-89 Jun 26, 2025
2a00788
Rename feature toggle
aocenas Jul 1, 2025
c7f3908
Remove options and move root folder constant
aocenas Jul 1, 2025
eed14cd
Merge remote-tracking branch 'origin/aocenas/folders/migrate-api' int…
aocenas Jul 1, 2025
34bc654
Fix feature toggle merge
aocenas Jul 1, 2025
48af59b
Merge branch 'main' into aocenas/folders/migrate-api
aocenas Jul 1, 2025
d1d959d
Add feature toggle again
aocenas Jul 1, 2025
421958b
Rename useFoldersQuery files
aocenas Jul 1, 2025
d529ed1
Update API spec
aocenas Jul 1, 2025
ea906e8
Fix test
aocenas Jul 1, 2025
634cd2a
Add test
aocenas Jul 2, 2025
b86b98d
Migrate delete folder button
aocenas Jul 3, 2025
845bbe6
useGetFolderQueryFacade
aocenas Jul 3, 2025
a873b99
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Jul 3, 2025
e7b4f3e
Use getFolder facade hook
aocenas Jul 4, 2025
06f0baa
Recreate legacy getFolder from the APIs
aocenas Jul 9, 2025
802fa46
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Jul 9, 2025
7b30613
Fix imports
aocenas Jul 9, 2025
bd65f06
Add comment
aocenas Jul 9, 2025
2f5b2c9
Merge branch 'main' into aocenas/folders/migrate-api-2
Clarity-89 Jul 10, 2025
c8423b4
Rename function
aocenas Jul 10, 2025
dc229e0
Simulate virtual folders in the API client
aocenas Jul 14, 2025
320f469
Translations
aocenas Jul 14, 2025
7c6dbdd
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Jul 14, 2025
9ba694d
Update test
aocenas Jul 14, 2025
18b12c7
Move the hook out of the index file
aocenas Jul 15, 2025
8fdb275
Fix undefined in test
aocenas Jul 16, 2025
24e5b2b
Better status combining
aocenas Jul 16, 2025
152612b
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Jul 17, 2025
c8b3dd7
Use real access api for virtual folders
aocenas Jul 18, 2025
641c091
Add basic test for the hook
aocenas Jul 18, 2025
d715ddb
Remove commented import
aocenas Jul 21, 2025
d1b2fb9
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Jul 21, 2025
558db2e
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Jul 30, 2025
d55b439
Remove the access control api and use legacy api for it
aocenas Jul 31, 2025
11d2773
Update tests
aocenas Aug 4, 2025
449a2a2
Moved delete folder into facade hook
aocenas Aug 5, 2025
cafd38a
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Aug 5, 2025
8254392
Remove namespace attribute from virtual folders
aocenas Aug 5, 2025
573923e
go lint
aocenas Aug 6, 2025
51056c7
Merge branch 'main' into aocenas/folders/migrate-api-2
aocenas Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename function
  • Loading branch information
aocenas committed Jul 10, 2025
commit c8423b423cace2ab432b27eacfee69c58aef02a0
6 changes: 3 additions & 3 deletions public/app/api/clients/folder/v1beta1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const folderAPIv1beta1 = generatedAPI.enhanceEndpoints({
const { useGetFolderParentsQuery, useGetFolderAccessQuery } = folderAPIv1beta1;
export const { useGetFolderQuery } = folderAPIv1beta1;

function folderUrl(uid: string, title: string): string {
function getFolderUrl(uid: string, title: string): string {
// mimics https://github.com/grafana/grafana/blob/79fe8a9902335c7a28af30e467b904a4ccfac503/pkg/services/dashboards/models.go#L188
// Not the same slugify as on the backend https://github.com/grafana/grafana/blob/aac66e91198004bc044754105e18bfff8fbfd383/pkg/infra/slugify/slugify.go#L86
// Probably does not matter as it seems to be only for better human readability.
Expand Down Expand Up @@ -102,7 +102,7 @@ export function useGetFolderQueryFacade(uid?: string) {
// url: result.data.metadata.annotations?.[AnnoKeyFolderUrl] || '',
// general folder does not come with url
// see https://github.com/grafana/grafana/blob/8a05378ef3ae5545c6f7429eae5c174d3c0edbfe/pkg/services/folder/folderimpl/folder_unifiedstorage.go#L88
url: uid === GENERAL_FOLDER_UID ? '' : folderUrl(result.data.metadata.name!, result.data.spec.title!),
url: uid === GENERAL_FOLDER_UID ? '' : getFolderUrl(result.data.metadata.name!, result.data.spec.title!),
version: result.data.metadata.generation || 1,
};

Expand All @@ -114,7 +114,7 @@ export function useGetFolderQueryFacade(uid?: string) {
uid: i.name,
// No idea how to make slug, on the server it uses a go lib: https://github.com/grafana/grafana/blob/aac66e91198004bc044754105e18bfff8fbfd383/pkg/infra/slugify/slugify.go#L56
// Don't think slug is needed for the URL to work though
url: folderUrl(i.name, i.title),
url: getFolderUrl(i.name, i.title),
}));
}
}
Expand Down
Loading