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
9c14b967
Commit
9c14b967
authored
Apr 11, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(): admin stats and postgres
parent
5a81cf6c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
14 deletions
+4
-14
packaging/publish/publish.sh
+3
-3
pkg/models/stats.go
+0
-1
pkg/services/sqlstore/stats.go
+1
-6
public/app/features/admin/partials/stats.html
+0
-4
No files found.
packaging/publish/publish.sh
View file @
9c14b967
#! /usr/bin/env bash
deb_ver
=
3.0.0-beta
21459801392
rpm_ver
=
3.0.0-beta
21459801392
deb_ver
=
3.0.0-beta
31460381868
rpm_ver
=
3.0.0-beta
31460381868
#rpm_ver=3.0.0-1
...
...
@@ -15,7 +15,7 @@ rpm_ver=3.0.0-beta21459801392
#wget https://grafanarel.s3.amazonaws.com/builds/grafana-${rpm_ver}.x86_64.rpm
package_cloud push grafana/testing/el/6 grafana-
${
rpm_ver
}
.x86_64.rpm
#
package_cloud push grafana/testing/el/6 grafana-${rpm_ver}.x86_64.rpm
#package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm
# package_cloud push grafana/stable/el/7 grafana-${version}-1.x86_64.rpm
...
...
pkg/models/stats.go
View file @
9c14b967
...
...
@@ -29,7 +29,6 @@ type AdminStats struct {
DataSourceCount
int
`json:"data_source_count"`
PlaylistCount
int
`json:"playlist_count"`
StarredDbCount
int
`json:"starred_db_count"`
GrafanaAdminCount
int
`json:"grafana_admin_count"`
}
type
GetAdminStatsQuery
struct
{
...
...
pkg/services/sqlstore/stats.go
View file @
9c14b967
...
...
@@ -85,12 +85,7 @@ func GetAdminStats(query *m.GetAdminStatsQuery) error {
(
SELECT COUNT(DISTINCT `
+
dialect
.
Quote
(
"dashboard_id"
)
+
` )
FROM `
+
dialect
.
Quote
(
"star"
)
+
`
) AS starred_db_count,
(
SELECT COUNT(*)
FROM `
+
dialect
.
Quote
(
"user"
)
+
`
WHERE `
+
dialect
.
Quote
(
"is_admin"
)
+
` = 1
) AS grafana_admin_count
) AS starred_db_count
`
var
stats
m
.
AdminStats
...
...
public/app/features/admin/partials/stats.html
View file @
9c14b967
...
...
@@ -23,10 +23,6 @@
<td>
{{ctrl.stats.user_count}}
</td>
</tr>
<tr>
<td>
Total grafana admins
</td>
<td>
{{ctrl.stats.grafana_admin_count}}
</td>
</tr>
<tr>
<td>
Total organizations
</td>
<td>
{{ctrl.stats.org_count}}
</td>
</tr>
...
...
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