NestedFolderPicker: Migrate to app platform API (#106926)

* Add /children endpoint

* Update folder client

* Add comment

* Add feature toggle

* Add new version of useFoldersQuery

* Error handling

* Format

* Rename feature toggle

* Remove options and move root folder constant

* Fix feature toggle merge

* Add feature toggle again

* Rename useFoldersQuery files

* Update API spec

* Fix test

* Add test

* Better typings

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
This commit is contained in:
Andrej Ocenas
2025-07-03 16:15:23 +02:00
committed by GitHub
co-authored by Clarity-89
parent 185ce90a4b
commit e76f470b44
18 changed files with 1102 additions and 193 deletions
+9
View File
@@ -88,6 +88,15 @@ func TestIntegrationFoldersApp(t *testing.T) {
"get"
]
},
{
"name": "folders/children",
"singularName": "",
"namespaced": true,
"kind": "FolderList",
"verbs": [
"get"
]
},
{
"name": "folders/counts",
"singularName": "",
@@ -915,6 +915,55 @@
}
]
},
"/apis/folder.grafana.app/v1beta1/namespaces/{namespace}/folders/{name}/children": {
"get": {
"tags": [
"Folder"
],
"description": "connect GET requests to children of Folder",
"operationId": "getFolderChildren",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1beta1.FolderList"
}
}
}
}
},
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "folder.grafana.app",
"version": "v1beta1",
"kind": "FolderList"
}
},
"parameters": [
{
"name": "name",
"in": "path",
"description": "name of the FolderList",
"required": true,
"schema": {
"type": "string",
"uniqueItems": true
}
},
{
"name": "namespace",
"in": "path",
"description": "object name and auth scope, such as for teams and projects",
"required": true,
"schema": {
"type": "string",
"uniqueItems": true
}
}
]
},
"/apis/folder.grafana.app/v1beta1/namespaces/{namespace}/folders/{name}/counts": {
"get": {
"tags": [