Commit 4c12703e by utkarshcmu

Integrated angularjs with go api

parent da67afa5
......@@ -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>
......
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