Commit c260c319 by utkarshcmu

Started Grafana stats poc

parent f2ce8f26
...@@ -108,6 +108,12 @@ export class SideMenuCtrl { ...@@ -108,6 +108,12 @@ export class SideMenuCtrl {
}); });
this.mainLinks.push({ this.mainLinks.push({
text: "Grafana stats",
icon: "fa fa-fw fa-bar-chart",
url: this.getUrl("/admin/stats"),
});
this.mainLinks.push({
text: "Global Users", text: "Global Users",
icon: "fa fa-fw fa-user", icon: "fa fa-fw fa-user",
url: this.getUrl("/admin/users"), url: this.getUrl("/admin/users"),
...@@ -118,6 +124,7 @@ export class SideMenuCtrl { ...@@ -118,6 +124,7 @@ export class SideMenuCtrl {
icon: "fa fa-fw fa-users", icon: "fa fa-fw fa-users",
url: this.getUrl("/admin/orgs"), url: this.getUrl("/admin/orgs"),
}); });
} }
updateMenu() { updateMenu() {
......
...@@ -112,6 +112,10 @@ define([ ...@@ -112,6 +112,10 @@ define([
templateUrl: 'app/features/admin/partials/edit_org.html', templateUrl: 'app/features/admin/partials/edit_org.html',
controller : 'AdminEditOrgCtrl', controller : 'AdminEditOrgCtrl',
}) })
.when('/admin/stats', {
templateUrl: 'app/features/admin/partials/stats.html',
controller : 'AdminStatsCtrl',
})
.when('/login', { .when('/login', {
templateUrl: 'app/partials/login.html', templateUrl: 'app/partials/login.html',
controller : 'LoginCtrl', controller : 'LoginCtrl',
......
define([
'angular',
],
function (angular) {
'use strict';
var module = angular.module('grafana.controllers');
module.controller('AdminStatsCtrl', function($scope) {
$scope.init = function() {
$scope.getStats();
};
$scope.getStats = function() {
// backendSrv.get('/api/admin/stats').then(function(stats) {
// $scope.stats = stats;
// });
};
$scope.init();
});
});
...@@ -4,4 +4,5 @@ define([ ...@@ -4,4 +4,5 @@ define([
'./adminEditOrgCtrl', './adminEditOrgCtrl',
'./adminEditUserCtrl', './adminEditUserCtrl',
'./adminSettingsCtrl', './adminSettingsCtrl',
'./adminStatsCtrl',
], function () {}); ], function () {});
<topnav icon="fa fa-fw fa-bar-chart" title="Grafana stats">
</topnav>
<div class="page-container">
<div class="page-wide">
<h1>
Stats
</h1>
<table class="filter-table form-inline">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total dashboards</td>
<td>213</td>
</tr>
<tr>
<td>Total users</td>
<td>97</td>
</tr>
<tr>
<td>Total organizations</td>
<td>4</td>
</tr>
<tr>
<td>Total playlists</td>
<td>12</td>
</tr>
<tr>
<td>Total snapshots</td>
<td>64</td>
</tr>
<tr>
<td>Total dashboard tags</td>
<td>15</td>
</tr>
<tr>
<td>Total starred dashboards</td>
<td>131</td>
</tr>
<tr>
<td>Total panels</td>
<td>2739</td>
</tr>
</tbody>
</table>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment