mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Folders: Reduce DB queries when counting and deleting resources under folders (#81153)
* Add folder store method for fetching all folder descendants * Modify GetDescendantCounts() to fetch folder descendants at once * Reduce DB calls when counting library panels under dashboard * Reduce DB calls when counting dashboards under folder * Reduce DB calls during folder delete * Modify folder registry to count/delete entities under multiple folders * Reduce DB calls when counting * Reduce DB calls when deleting
This commit is contained in:
committed by
GitHub
parent
0139ac205d
commit
89d3b55bec
@@ -412,10 +412,10 @@ func TestDashAlertPermissionMigration(t *testing.T) {
|
||||
},
|
||||
},
|
||||
dashboards: []*dashboards.Dashboard{
|
||||
genDashboard(t, 3, "d_1", "", 1),
|
||||
genDashboard(t, 4, "d_2", "", 1),
|
||||
genDashboard(t, 5, "d_3", "", 2),
|
||||
genDashboard(t, 6, "d_4", "", 2),
|
||||
genDashboard(t, 3, "d_1", "1", 1),
|
||||
genDashboard(t, 4, "d_2", "1", 1),
|
||||
genDashboard(t, 5, "d_3", "2", 2),
|
||||
genDashboard(t, 6, "d_4", "2", 2),
|
||||
},
|
||||
dashboardPerms: map[string][]accesscontrol.SetResourcePermissionCommand{
|
||||
"d_1": {
|
||||
|
||||
Reference in New Issue
Block a user