Merge pull request #1800 from metalmatze/sort-peers
Sort peers before returning via API
This commit is contained in:
commit
19ab388d93
|
@ -172,6 +172,10 @@ func (api *API) getStatusHandler(params general_ops.GetStatusParams) middleware.
|
|||
})
|
||||
}
|
||||
|
||||
sort.Slice(peers, func(i, j int) bool {
|
||||
return *peers[i].Name < *peers[j].Name
|
||||
})
|
||||
|
||||
resp.Cluster = &open_api_models.ClusterStatus{
|
||||
Name: api.peer.Name(),
|
||||
Status: &status,
|
||||
|
|
Loading…
Reference in New Issue