Core: add active users stat (#22563)

* Stats: add active user count query

* License: add info in settings

* Stats: Retrieve active users stats for different roles

+ Clean files and tests

* Stats: add dialect.Quote in queries

* Stats: improve tests (require instead of assert)

* Stats: improve tests (require instead of assert)
This commit is contained in:
Agnès Toulet
2020-03-05 12:34:44 +01:00
committed by GitHub
parent c6cc840ceb
commit ea3d368e91
3 changed files with 139 additions and 83 deletions
+11
View File
@@ -89,3 +89,14 @@ type SystemUserCountStats struct {
type GetSystemUserCountStatsQuery struct {
Result *SystemUserCountStats
}
type ActiveUserStats struct {
ActiveUsers int64
ActiveAdmins int64
ActiveEditors int64
ActiveViewers int64
}
type GetActiveUserStatsQuery struct {
Result *ActiveUserStats
}