Skip to content

Folders: Migrate getFolder API to app platform #107617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
40 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
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
Add comment
  • Loading branch information
aocenas committed Jul 9, 2025
commit bd65f06e1d847d0b0ecf99aa962a8ce1368e75df
6 changes: 6 additions & 0 deletions public/app/api/clients/folder/v1beta1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function folderUrl(uid: string, title: string): string {
return `${config.appSubUrl}/dashboards/f/${uid}/${slug}`;
}

/**
* A proxy function that uses either legacy folder client or the new app platform APIs to get the data in the same
* format of a FolderDTO object. As the schema isn't the same, using the app platform needs multiple different calls
* which are then stitched together.
* @param uid
*/
export function useGetFolderQueryFacade(uid?: string) {
if (config.featureToggles.foldersAppPlatformAPI) {
const result = useGetFolderQuery(uid ? { name: uid } : skipToken);
Expand Down
Loading