stats.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. Admins int
  19. Editors int
  20. Viewers int
  21. ActiveAdmins int
  22. ActiveEditors int
  23. ActiveViewers int
  24. ActiveSessions int
  25. }
  26. type DataSourceStats struct {
  27. Count int
  28. Type string
  29. }
  30. type GetSystemStatsQuery struct {
  31. Result *SystemStats
  32. }
  33. type GetDataSourceStatsQuery struct {
  34. Result []*DataSourceStats
  35. }
  36. type DataSourceAccessStats struct {
  37. Type string
  38. Access string
  39. Count int64
  40. }
  41. type GetDataSourceAccessStatsQuery struct {
  42. Result []*DataSourceAccessStats
  43. }
  44. type NotifierUsageStats struct {
  45. Type string
  46. Count int64
  47. }
  48. type GetAlertNotifierUsageStatsQuery struct {
  49. Result []*NotifierUsageStats
  50. }
  51. type AdminStats struct {
  52. Orgs int `json:"orgs"`
  53. Dashboards int `json:"dashboards"`
  54. Snapshots int `json:"snapshots"`
  55. Tags int `json:"tags"`
  56. Datasources int `json:"datasources"`
  57. Playlists int `json:"playlists"`
  58. Stars int `json:"stars"`
  59. Alerts int `json:"alerts"`
  60. Users int `json:"users"`
  61. Admins int `json:"admins"`
  62. Editors int `json:"editors"`
  63. Viewers int `json:"viewers"`
  64. ActiveUsers int `json:"activeUsers"`
  65. ActiveAdmins int `json:"activeAdmins"`
  66. ActiveEditors int `json:"activeEditors"`
  67. ActiveViewers int `json:"activeViewers"`
  68. ActiveSessions int `json:"activeSessions"`
  69. }
  70. type GetAdminStatsQuery struct {
  71. Result *AdminStats
  72. }
  73. type SystemUserCountStats struct {
  74. Count int64
  75. }
  76. type GetSystemUserCountStatsQuery struct {
  77. Result *SystemUserCountStats
  78. }