Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
da67afa5
Commit
da67afa5
authored
Jan 24, 2016
by
utkarshcmu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed api bugs, stats endpoint working
parent
c7fae538
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
pkg/api/admin.go
+2
-2
pkg/api/api.go
+0
-0
pkg/models/stats.go
+8
-8
pkg/services/sqlstore/stats.go
+2
-2
No files found.
pkg/api/admin.go
View file @
da67afa5
...
...
@@ -3,10 +3,10 @@ package api
import
(
"strings"
"github.com/grafana/grafana/pkg/middleware"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
func
AdminGetSettings
(
c
*
middleware
.
Context
)
{
...
...
pkg/api/api.go
View file @
da67afa5
pkg/models/stats.go
View file @
da67afa5
...
...
@@ -20,14 +20,14 @@ type GetDataSourceStatsQuery struct {
}
type
AdminStats
struct
{
UserCount
int
OrgCount
int
DashboardCount
int
DBSnapshotCount
int
DBTagCount
int
DataSourceCount
int
PlaylistCount
int
StarredDBCount
int
UserCount
int
`json:"user_count"`
OrgCount
int
`json:"org_count"`
DashboardCount
int
`json:"dashboard_count"`
DbSnapshotCount
int
`json:"db_snapshot_count"`
DbTagCount
int
`json:"db_tag_count"`
DataSourceCount
int
`json:"data_source_count"`
PlaylistCount
int
`json:"playlist_count"`
StarredDbCount
int
`json:"starred_db_count"`
}
type
GetAdminStatsQuery
struct
{
...
...
pkg/services/sqlstore/stats.go
View file @
da67afa5
...
...
@@ -73,13 +73,13 @@ func GetAdminStats(query *m.GetAdminStatsQuery) error {
(
SELECT COUNT(*)
FROM `
+
dialect
.
Quote
(
"data_source"
)
+
`
) AS datasource_count,
) AS data
_
source_count,
(
SELECT COUNT(*)
FROM `
+
dialect
.
Quote
(
"playlist"
)
+
`
) AS playlist_count,
(
SELECT
DISTINCT(dashboard_id
)
SELECT
COUNT (DISTINCT `
+
dialect
.
Quote
(
"dashboard_id"
)
+
`
)
FROM `
+
dialect
.
Quote
(
"star"
)
+
`
) AS starred_db_count
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment