Browse Source

feat(dashboard): have stats use the v2 API

Brandon Philips 12 years ago
parent
commit
bfe33bd3c4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      mod/dashboard/app/scripts/controllers/stats.js

+ 2 - 2
mod/dashboard/app/scripts/controllers/stats.js

@@ -14,14 +14,14 @@ angular.module('etcdStats', ['ngRoute', 'etcd'])
     });
     });
 }])
 }])
 
 
-.controller('StatsCtrl', ['$scope', 'EtcdV1', 'statsVega', function ($scope, EtcdV1, statsVega) {
+.controller('StatsCtrl', ['$scope', 'EtcdV2', 'statsVega', function ($scope, EtcdV2, statsVega) {
   $scope.graphContainer = '#latency';
   $scope.graphContainer = '#latency';
   $scope.graphVisibility = 'etcd-graph-show';
   $scope.graphVisibility = 'etcd-graph-show';
   $scope.tableVisibility = 'etcd-table-hide';
   $scope.tableVisibility = 'etcd-table-hide';
 
 
   //make requests
   //make requests
   function readStats() {
   function readStats() {
-    EtcdV1.getStat('leader').get().success(function(data) {
+    EtcdV2.getStat('leader').get().success(function(data) {
       $scope.leaderStats = data;
       $scope.leaderStats = data;
       $scope.leaderName = data.leader;
       $scope.leaderName = data.leader;
       $scope.machines = [];
       $scope.machines = [];