Nested folders: Provide count of all descendant dashboards and folders (#67184)

* Add a method for getting descendant folders
* Include dashboard count for descendant folders
* Return subfolder count
* Replace references to children with descendants
* Update openapi specs
* Add test for descendant counts
* Add logging to GetDescendantCounts
This commit is contained in:
Arati R
2023-04-27 17:00:09 +02:00
committed by GitHub
parent 4d96afa979
commit a5206a1cda
9 changed files with 237 additions and 169 deletions
+4 -4
View File
@@ -155,13 +155,13 @@ type HasAdminPermissionInDashboardsOrFoldersQuery struct {
SignedInUser *user.SignedInUser
}
// GetChildrenCountsQuery captures the information required by the folder service
// to return the count of children in a folder.
type GetChildrenCountsQuery struct {
// GetDescendantCountsQuery captures the information required by the folder service
// to return the count of descendants (direct and indirect) in a folder.
type GetDescendantCountsQuery struct {
UID *string
OrgID int64
SignedInUser *user.SignedInUser `json:"-"`
}
type ChildrenCounts map[string]int64
type DescendantCounts map[string]int64