Stats: use dashboard stats rather than list (#99130)

This commit is contained in:
Stephanie Hingtgen
2025-01-17 08:19:56 +03:00
committed by GitHub
parent 5a930e0ec6
commit e019e34eb5
11 changed files with 226 additions and 100 deletions
+2
View File
@@ -36,6 +36,7 @@ type DashboardService interface {
RestoreDashboard(ctx context.Context, dashboard *Dashboard, user identity.Requester, optionalFolderUID string) error
CleanUpDeletedDashboards(ctx context.Context) (int64, error)
GetSoftDeletedDashboard(ctx context.Context, orgID int64, uid string) (*Dashboard, error)
CountDashboardsInOrg(ctx context.Context, orgID int64) (int64, error)
}
// PluginService is a service for operating on plugin dashboards.
@@ -82,6 +83,7 @@ type Store interface {
ValidateDashboardBeforeSave(ctx context.Context, dashboard *Dashboard, overwrite bool) (bool, error)
Count(context.Context, *quota.ScopeParameters) (*quota.Map, error)
CountInOrg(ctx context.Context, orgID int64) (int64, error)
// CountDashboardsInFolder returns the number of dashboards associated with
// the given parent folder ID.
CountDashboardsInFolders(ctx context.Context, request *CountDashboardsInFolderRequest) (int64, error)