stats.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. AuthTokens int64
  18. }
  19. type DataSourceStats struct {
  20. Count int
  21. Type string
  22. }
  23. type GetSystemStatsQuery struct {
  24. Result *SystemStats
  25. }
  26. type GetDataSourceStatsQuery struct {
  27. Result []*DataSourceStats
  28. }
  29. type DataSourceAccessStats struct {
  30. Type string
  31. Access string
  32. Count int64
  33. }
  34. type GetDataSourceAccessStatsQuery struct {
  35. Result []*DataSourceAccessStats
  36. }
  37. type NotifierUsageStats struct {
  38. Type string
  39. Count int64
  40. }
  41. type GetAlertNotifierUsageStatsQuery struct {
  42. Result []*NotifierUsageStats
  43. }
  44. type AdminStats struct {
  45. Users int `json:"users"`
  46. Orgs int `json:"orgs"`
  47. Dashboards int `json:"dashboards"`
  48. Snapshots int `json:"snapshots"`
  49. Tags int `json:"tags"`
  50. Datasources int `json:"datasources"`
  51. Playlists int `json:"playlists"`
  52. Stars int `json:"stars"`
  53. Alerts int `json:"alerts"`
  54. ActiveUsers int `json:"activeUsers"`
  55. }
  56. type GetAdminStatsQuery struct {
  57. Result *AdminStats
  58. }
  59. type SystemUserCountStats struct {
  60. Count int64
  61. }
  62. type GetSystemUserCountStatsQuery struct {
  63. Result *SystemUserCountStats
  64. }