PublicDashboards: collect stats for public dashboards (#50553)

* PublicDashboards: collect stats for public dashboards
This commit is contained in:
Ezequiel Victorero
2022-06-23 12:02:57 -03:00
committed by GitHub
parent eceb21e72d
commit 4c4d6fd425
5 changed files with 19 additions and 0 deletions
+3
View File
@@ -105,6 +105,9 @@ func (ss *SQLStore) GetSystemStats(ctx context.Context, query *models.GetSystemS
sb.Write(`(SELECT COUNT(*) FROM ` + dialect.Quote("data_keys") + `) AS data_keys,`)
sb.Write(`(SELECT COUNT(*) FROM ` + dialect.Quote("data_keys") + `WHERE active = true) AS active_data_keys,`)
// TODO: table name will change and filter should check only for is_enabled = true
sb.Write(`(SELECT COUNT(*) FROM ` + dialect.Quote("dashboard_public") + `WHERE is_enabled = true) AS public_dashboards,`)
sb.Write(ss.roleCounterSQL(ctx))
var stats models.SystemStats