mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat(dashboard): Sort machine list to prevent jumping
This commit is contained in:
parent
4fab919fcb
commit
7ca09579c2
@ -40,6 +40,12 @@ angular.module('etcdStats', ['ngRoute', 'etcd'])
|
|||||||
value.name = index;
|
value.name = index;
|
||||||
$scope.machines.push(value);
|
$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();
|
drawGraph();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user