Sort VolumeInfos by VolumeId in Store.Status();
Ordered VolumeInfos is more Human-readable, especially when there is a lot of volumes.
This commit is contained in:
@@ -223,7 +223,9 @@ func (s *Store) Status() []*VolumeInfo {
|
||||
var stats []*VolumeInfo
|
||||
for _, location := range s.Locations {
|
||||
for k, v := range location.volumes {
|
||||
s := &VolumeInfo{Id: VolumeId(k), Size: v.ContentSize(),
|
||||
s := &VolumeInfo{
|
||||
Id: VolumeId(k),
|
||||
Size: v.ContentSize(),
|
||||
Collection: v.Collection,
|
||||
ReplicaPlacement: v.ReplicaPlacement,
|
||||
Version: v.Version(),
|
||||
@@ -235,6 +237,7 @@ func (s *Store) Status() []*VolumeInfo {
|
||||
stats = append(stats, s)
|
||||
}
|
||||
}
|
||||
sortVolumeInfos(stats)
|
||||
return stats
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user