mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Integrated angularjs with go api
This commit is contained in:
parent
da67afa51e
commit
4c12703e0c
@ -6,16 +6,16 @@ function (angular) {
|
||||
|
||||
var module = angular.module('grafana.controllers');
|
||||
|
||||
module.controller('AdminStatsCtrl', function($scope) {
|
||||
module.controller('AdminStatsCtrl', function($scope, backendSrv) {
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.getStats();
|
||||
};
|
||||
|
||||
$scope.getStats = function() {
|
||||
// backendSrv.get('/api/admin/stats').then(function(stats) {
|
||||
// $scope.stats = stats;
|
||||
// });
|
||||
backendSrv.get('/api/admin/stats').then(function(stats) {
|
||||
$scope.stats = stats;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.init();
|
||||
|
@ -17,35 +17,35 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Total dashboards</td>
|
||||
<td>213</td>
|
||||
<td>{{stats.dashboard_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total users</td>
|
||||
<td>97</td>
|
||||
<td>{{stats.user_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total organizations</td>
|
||||
<td>4</td>
|
||||
<td>{{stats.org_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total datasources</td>
|
||||
<td>{{stats.data_source_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total playlists</td>
|
||||
<td>12</td>
|
||||
<td>{{stats.playlist_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total snapshots</td>
|
||||
<td>64</td>
|
||||
<td>{{stats.db_snapshot_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total dashboard tags</td>
|
||||
<td>15</td>
|
||||
<td>{{stats.db_tag_count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total starred dashboards</td>
|
||||
<td>131</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total panels</td>
|
||||
<td>2739</td>
|
||||
<td>{{stats.starred_db_count}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user