Navigation Menu

Skip to content

Commit

Permalink
Sort reported nodes by their host name
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 29, 2015
1 parent da567b0 commit 8e53dae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/serf/client.js
Expand Up @@ -116,6 +116,9 @@ Client.prototype = {
liveEngineNodes = liveEngineNodes.filter(function(member) {
return member.Tags[Tag.clusterId] == clusterId;
});
liveEngineNodes.sort(function(a, b) {
return a.HostName < b.HostName ? -1 : 1;
});
return {
clusterIds: clusterIds,
liveEngineNodes: liveEngineNodes
Expand Down

0 comments on commit 8e53dae

Please sign in to comment.