diff --git a/mod/dashboard/app/browser.html b/mod/dashboard/app/browser.html index 27127833eb6..dcb769bd3cc 100644 --- a/mod/dashboard/app/browser.html +++ b/mod/dashboard/app/browser.html @@ -37,7 +37,6 @@ - diff --git a/mod/dashboard/app/scripts/controllers/stats.js b/mod/dashboard/app/scripts/controllers/stats.js index e689147b093..9ce6ea159a2 100644 --- a/mod/dashboard/app/scripts/controllers/stats.js +++ b/mod/dashboard/app/scripts/controllers/stats.js @@ -23,10 +23,22 @@ angular.module('etcdStats', ['ngRoute', 'etcd']) function readStats() { EtcdV1.getStat('leader').get().success(function(data) { $scope.leaderStats = data; - $scope.followers = []; + $scope.leaderName = data.leader; + $scope.machines = []; + //hardcode leader stats + $scope.machines.push({ + latency: { + average: 0, + current: 0, + minimum: 0, + maximum: 0, + standardDeviation: 0 + }, + name: data.leader + }); $.each(data.followers, function(index, value) { value.name = index; - $scope.followers.push(value); + $scope.machines.push(value); }); drawGraph(); }); @@ -46,7 +58,7 @@ angular.module('etcdStats', ['ngRoute', 'etcd']) chart({ el: $scope.graphContainer, data: { - 'stats': $scope.followers + 'stats': $scope.machines } }).width(width).height(height).update(); }); diff --git a/mod/dashboard/app/stats.html b/mod/dashboard/app/stats.html index eb324f1b22f..6056a75125a 100644 --- a/mod/dashboard/app/stats.html +++ b/mod/dashboard/app/stats.html @@ -38,7 +38,6 @@ - diff --git a/mod/dashboard/app/styles/etcd-widgets.css b/mod/dashboard/app/styles/etcd-widgets.css index 1cccf39f338..fef7e82783e 100644 --- a/mod/dashboard/app/styles/etcd-widgets.css +++ b/mod/dashboard/app/styles/etcd-widgets.css @@ -624,6 +624,12 @@ body { background-color: #00DB24; } + .etcd-container.etcd-stats .etcd-list .etcd-machine-type { + color: #999; + padding-left: 3px; + font-size: 13px; + } + .etcd-container.etcd-stats .etcd-list .etcd-latency-value { display: inline-block; } diff --git a/mod/dashboard/app/views/stats.html b/mod/dashboard/app/views/stats.html index eb1a615477a..63e584305fd 100644 --- a/mod/dashboard/app/views/stats.html +++ b/mod/dashboard/app/views/stats.html @@ -1,7 +1,7 @@
Machine Name | Latency | -
{{follower.name}} | +|
+ {{machine.name}}(leader)
+ {{machine.name}}
+ |
-
- {{follower.latency.current | number:1 }} ms
+
+ {{machine.latency.current | number:1 }} ms
|