stats.go 1.79 KB
Newer Older
1 2 3
package models

type SystemStats struct {
4 5 6 7 8 9 10 11 12 13 14 15 16 17
	Dashboards            int64
	Datasources           int64
	Users                 int64
	ActiveUsers           int64
	Orgs                  int64
	Playlists             int64
	Alerts                int64
	Stars                 int64
	Snapshots             int64
	Teams                 int64
	DashboardPermissions  int64
	FolderPermissions     int64
	Folders               int64
	ProvisionedDashboards int64
18
	AuthTokens            int64
19 20
}

21 22 23 24 25
type DataSourceStats struct {
	Count int
	Type  string
}

26 27 28
type GetSystemStatsQuery struct {
	Result *SystemStats
}
29 30 31 32

type GetDataSourceStatsQuery struct {
	Result []*DataSourceStats
}
33

34 35 36 37 38 39 40 41 42 43
type DataSourceAccessStats struct {
	Type   string
	Access string
	Count  int64
}

type GetDataSourceAccessStatsQuery struct {
	Result []*DataSourceAccessStats
}

44 45 46 47 48 49 50 51 52
type NotifierUsageStats struct {
	Type  string
	Count int64
}

type GetAlertNotifierUsageStatsQuery struct {
	Result []*NotifierUsageStats
}

53
type AdminStats struct {
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
	Orgs           int `json:"orgs"`
	Dashboards     int `json:"dashboards"`
	Snapshots      int `json:"snapshots"`
	Tags           int `json:"tags"`
	Datasources    int `json:"datasources"`
	Playlists      int `json:"playlists"`
	Stars          int `json:"stars"`
	Alerts         int `json:"alerts"`
	Users          int `json:"users"`
	Admins         int `json:"admins"`
	Editors        int `json:"editors"`
	Viewers        int `json:"viewers"`
	ActiveUsers    int `json:"activeUsers"`
	ActiveAdmins   int `json:"activeAdmins"`
	ActiveEditors  int `json:"activeEditors"`
	ActiveViewers  int `json:"activeViewers"`
	ActiveSessions int `json:"activeSessions"`
71 72 73
}

type GetAdminStatsQuery struct {
74
	Result *AdminStats
75
}
76 77 78 79 80 81 82 83

type SystemUserCountStats struct {
	Count int64
}

type GetSystemUserCountStatsQuery struct {
	Result *SystemUserCountStats
}