Added grafana_admins count

This commit is contained in:
utkarshcmu
2016-01-25 00:39:31 -08:00
parent a621c0d273
commit 2190392e05
4 changed files with 25 additions and 12 deletions

View File

@@ -81,7 +81,11 @@ func GetAdminStats(query *m.GetAdminStatsQuery) error {
(
SELECT COUNT (DISTINCT ` + dialect.Quote("dashboard_id") + ` )
FROM ` + dialect.Quote("star") + `
) AS starred_db_count
) AS starred_db_count,
(
SELECT SUM ( ` + dialect.Quote("is_admin") + ` )
FROM ` + dialect.Quote("user") + `
) AS grafana_admin_count
`
var stats m.AdminStats