Order mc admin info output by endpoint (#3804)
To make easy for users to navigate through the list of servers.
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -116,6 +117,10 @@ func (u clusterStruct) String() (msg string) {
|
||||
coloredDot = console.Colorize("InfoWarning", dot)
|
||||
}
|
||||
|
||||
sort.Slice(u.Info.Servers, func(i, j int) bool {
|
||||
return u.Info.Servers[i].Endpoint < u.Info.Servers[j].Endpoint
|
||||
})
|
||||
|
||||
// Loop through each server and put together info for each one
|
||||
for _, srv := range u.Info.Servers {
|
||||
// Check if MinIO server is offline ("Mode" field),
|
||||
|
||||
Reference in New Issue
Block a user