adminStatsCtrl.js 429 B

123456789101112131415161718192021222324
  1. define([
  2. 'angular',
  3. ],
  4. function (angular) {
  5. 'use strict';
  6. var module = angular.module('grafana.controllers');
  7. module.controller('AdminStatsCtrl', function($scope, backendSrv) {
  8. $scope.init = function() {
  9. $scope.getStats();
  10. };
  11. $scope.getStats = function() {
  12. backendSrv.get('/api/admin/stats').then(function(stats) {
  13. $scope.stats = stats;
  14. });
  15. };
  16. $scope.init();
  17. });
  18. });