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:
@@ -6,16 +6,16 @@ function (angular) {
|
|||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
var module = angular.module('grafana.controllers');
|
||||||
|
|
||||||
module.controller('AdminStatsCtrl', function($scope) {
|
module.controller('AdminStatsCtrl', function($scope, backendSrv) {
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.getStats();
|
$scope.getStats();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getStats = function() {
|
$scope.getStats = function() {
|
||||||
// backendSrv.get('/api/admin/stats').then(function(stats) {
|
backendSrv.get('/api/admin/stats').then(function(stats) {
|
||||||
// $scope.stats = stats;
|
$scope.stats = stats;
|
||||||
// });
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
|||||||
@@ -17,35 +17,35 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total dashboards</td>
|
<td>Total dashboards</td>
|
||||||
<td>213</td>
|
<td>{{stats.dashboard_count}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total users</td>
|
<td>Total users</td>
|
||||||
<td>97</td>
|
<td>{{stats.user_count}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total organizations</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total playlists</td>
|
<td>Total playlists</td>
|
||||||
<td>12</td>
|
<td>{{stats.playlist_count}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total snapshots</td>
|
<td>Total snapshots</td>
|
||||||
<td>64</td>
|
<td>{{stats.db_snapshot_count}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total dashboard tags</td>
|
<td>Total dashboard tags</td>
|
||||||
<td>15</td>
|
<td>{{stats.db_tag_count}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total starred dashboards</td>
|
<td>Total starred dashboards</td>
|
||||||
<td>131</td>
|
<td>{{stats.starred_db_count}}</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Total panels</td>
|
|
||||||
<td>2739</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user