mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Started Grafana stats poc
This commit is contained in:
@@ -107,6 +107,12 @@ export class SideMenuCtrl {
|
||||
url: this.getUrl("/admin/settings"),
|
||||
});
|
||||
|
||||
this.mainLinks.push({
|
||||
text: "Grafana stats",
|
||||
icon: "fa fa-fw fa-bar-chart",
|
||||
url: this.getUrl("/admin/stats"),
|
||||
});
|
||||
|
||||
this.mainLinks.push({
|
||||
text: "Global Users",
|
||||
icon: "fa fa-fw fa-user",
|
||||
@@ -118,6 +124,7 @@ export class SideMenuCtrl {
|
||||
icon: "fa fa-fw fa-users",
|
||||
url: this.getUrl("/admin/orgs"),
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
updateMenu() {
|
||||
|
@@ -112,6 +112,10 @@ define([
|
||||
templateUrl: 'app/features/admin/partials/edit_org.html',
|
||||
controller : 'AdminEditOrgCtrl',
|
||||
})
|
||||
.when('/admin/stats', {
|
||||
templateUrl: 'app/features/admin/partials/stats.html',
|
||||
controller : 'AdminStatsCtrl',
|
||||
})
|
||||
.when('/login', {
|
||||
templateUrl: 'app/partials/login.html',
|
||||
controller : 'LoginCtrl',
|
||||
|
24
public/app/features/admin/adminStatsCtrl.js
Normal file
24
public/app/features/admin/adminStatsCtrl.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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([
|
||||
'./adminEditOrgCtrl',
|
||||
'./adminEditUserCtrl',
|
||||
'./adminSettingsCtrl',
|
||||
'./adminStatsCtrl',
|
||||
], function () {});
|
||||
|
53
public/app/features/admin/partials/stats.html
Normal file
53
public/app/features/admin/partials/stats.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<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>
|
Reference in New Issue
Block a user