stats.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package models
  2. type SystemStats struct {
  3. Dashboards int64
  4. Datasources int64
  5. Users int64
  6. ActiveUsers int64
  7. Orgs int64
  8. Playlists int64
  9. Alerts int64
  10. Stars int64
  11. Snapshots int64
  12. Teams int64
  13. DashboardPermissions int64
  14. FolderPermissions int64
  15. Folders int64
  16. ProvisionedDashboards int64
  17. }
  18. type DataSourceStats struct {
  19. Count int
  20. Type string
  21. }
  22. type GetSystemStatsQuery struct {
  23. Result *SystemStats
  24. }
  25. type GetDataSourceStatsQuery struct {
  26. Result []*DataSourceStats
  27. }
  28. type DataSourceAccessStats struct {
  29. Type string
  30. Access string
  31. Count int64
  32. }
  33. type GetDataSourceAccessStatsQuery struct {
  34. Result []*DataSourceAccessStats
  35. }
  36. type AdminStats struct {
  37. Users int `json:"users"`
  38. Orgs int `json:"orgs"`
  39. Dashboards int `json:"dashboards"`
  40. Snapshots int `json:"snapshots"`
  41. Tags int `json:"tags"`
  42. Datasources int `json:"datasources"`
  43. Playlists int `json:"playlists"`
  44. Stars int `json:"stars"`
  45. Alerts int `json:"alerts"`
  46. ActiveUsers int `json:"activeUsers"`
  47. }
  48. type GetAdminStatsQuery struct {
  49. Result *AdminStats
  50. }
  51. type SystemUserCountStats struct {
  52. Count int64
  53. }
  54. type GetSystemUserCountStatsQuery struct {
  55. Result *SystemUserCountStats
  56. }