stats.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. Orgs int `json:"orgs"`
  46. Dashboards int `json:"dashboards"`
  47. Snapshots int `json:"snapshots"`
  48. Tags int `json:"tags"`
  49. Datasources int `json:"datasources"`
  50. Playlists int `json:"playlists"`
  51. Stars int `json:"stars"`
  52. Alerts int `json:"alerts"`
  53. Users int `json:"users"`
  54. Admins int `json:"admins"`
  55. Editors int `json:"editors"`
  56. Viewers int `json:"viewers"`
  57. ActiveUsers int `json:"activeUsers"`
  58. ActiveAdmins int `json:"activeAdmins"`
  59. ActiveEditors int `json:"activeEditors"`
  60. ActiveViewers int `json:"activeViewers"`
  61. ActiveSessions int `json:"activeSessions"`
  62. }
  63. type GetAdminStatsQuery struct {
  64. Result *AdminStats
  65. }
  66. type SystemUserCountStats struct {
  67. Count int64
  68. }
  69. type GetSystemUserCountStatsQuery struct {
  70. Result *SystemUserCountStats
  71. }