feat(dashboard): have stats use the v2 API

release-0.4
Brandon Philips 2013-11-08 17:45:55 -08:00
parent c91cb72ee2
commit bfe33bd3c4
1 changed files with 2 additions and 2 deletions

View File

@ -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.graphVisibility = 'etcd-graph-show';
$scope.tableVisibility = 'etcd-table-hide';
//make requests
function readStats() {
EtcdV1.getStat('leader').get().success(function(data) {
EtcdV2.getStat('leader').get().success(function(data) {
$scope.leaderStats = data;
$scope.leaderName = data.leader;
$scope.machines = [];