Browse Source

Merge pull request #244 from robszumski/sort-machine-list

Sort Machine List on Dashboard
Brandon Philips 12 years ago
parent
commit
d5f0642524

+ 6 - 0
mod/dashboard/app/scripts/controllers/stats.js

@@ -40,6 +40,12 @@ angular.module('etcdStats', ['ngRoute', 'etcd'])
         value.name = index;
         $scope.machines.push(value);
       });
+      //sort array so machines don't jump when output
+      $scope.machines.sort(function(a, b){
+          if(a.name < b.name) return -1;
+          if(a.name > b.name) return 1;
+          return 0;
+      });
       drawGraph();
     });
   }

+ 1 - 0
mod/dashboard/app/styles/etcd-widgets.css

@@ -640,6 +640,7 @@ body {
 		color: #999;
 		padding-left: 3px;
 		font-size: 13px;
+		line-height: 100%;
 	}
 
 	.etcd-container.etcd-stats .etcd-list .etcd-latency-value {