mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-21 21:44:22 +02:00
weed admin: disk types card can also show all disk type values, not just a count.
This commit is contained in:
1 parent
5e6d94319b
commit
645b6d2603
3 files changed
+13
-3
No files matched your search
@@ -168,6 +168,9 @@ type ClusterVolumesData struct {
|
||||
// All versions when multiple exist
|
||||
AllVersions []string `json:"all_versions"`
|
||||
|
||||
// All disk types when multiple exist
|
||||
AllDiskTypes []string `json:"all_disk_types"`
|
||||
|
||||
// Filtering
|
||||
FilterCollection string `json:"filter_collection"`
|
||||
}
|
||||
@@ -942,7 +945,7 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, s
|
||||
showVersionColumn := versionCount > 1
|
||||
|
||||
var singleDataCenter, singleRack, singleDiskType, singleCollection, singleVersion string
|
||||
var allVersions []string
|
||||
var allVersions, allDiskTypes []string
|
||||
|
||||
if dataCenterCount == 1 {
|
||||
for dc := range dataCenterMap {
|
||||
@@ -961,6 +964,12 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, s
|
||||
singleDiskType = diskType
|
||||
break
|
||||
}
|
||||
} else {
|
||||
// Collect all disk types and sort them
|
||||
for diskType := range diskTypeMap {
|
||||
allDiskTypes = append(allDiskTypes, diskType)
|
||||
}
|
||||
sort.Strings(allDiskTypes)
|
||||
}
|
||||
if collectionCount == 1 {
|
||||
for collection := range collectionMap {
|
||||
@@ -1007,6 +1016,7 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, s
|
||||
SingleCollection: singleCollection,
|
||||
SingleVersion: singleVersion,
|
||||
AllVersions: allVersions,
|
||||
AllDiskTypes: allDiskTypes,
|
||||
FilterCollection: collection,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user