Fixed Drives offline card UI (#2732)
This commit is contained in:
@@ -76,6 +76,8 @@ func GetAdminInfo(ctx context.Context, client MinioAdmin) (*UsageInfo, error) {
|
||||
var backendType string
|
||||
var rrSCParity float64
|
||||
var standardSCParity float64
|
||||
var onlineDrives float64
|
||||
var offlineDrives float64
|
||||
|
||||
if v, success := serverInfo.Backend.(map[string]interface{}); success {
|
||||
bt, ok := v["backendType"]
|
||||
@@ -90,6 +92,14 @@ func GetAdminInfo(ctx context.Context, client MinioAdmin) (*UsageInfo, error) {
|
||||
if ok {
|
||||
standardSCParity = sp.(float64)
|
||||
}
|
||||
onDrives, ok := v["onlineDisks"]
|
||||
if ok {
|
||||
onlineDrives = onDrives.(float64)
|
||||
}
|
||||
offDrives, ok := v["offlineDisks"]
|
||||
if ok {
|
||||
offlineDrives = offDrives.(float64)
|
||||
}
|
||||
}
|
||||
|
||||
var usedSpace int64
|
||||
@@ -132,8 +142,9 @@ func GetAdminInfo(ctx context.Context, client MinioAdmin) (*UsageInfo, error) {
|
||||
BackendType: backendType,
|
||||
RrSCParity: int64(rrSCParity),
|
||||
StandardSCParity: int64(standardSCParity),
|
||||
OnlineDrives: int64(onlineDrives),
|
||||
OfflineDrives: int64(offlineDrives),
|
||||
}
|
||||
|
||||
return &UsageInfo{
|
||||
Buckets: int64(serverInfo.Buckets.Count),
|
||||
Objects: int64(serverInfo.Objects.Count),
|
||||
|
||||
@@ -5301,6 +5301,12 @@ func init() {
|
||||
"backendType": {
|
||||
"type": "string"
|
||||
},
|
||||
"offlineDrives": {
|
||||
"type": "integer"
|
||||
},
|
||||
"onlineDrives": {
|
||||
"type": "integer"
|
||||
},
|
||||
"rrSCParity": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -14297,6 +14303,12 @@ func init() {
|
||||
"backendType": {
|
||||
"type": "string"
|
||||
},
|
||||
"offlineDrives": {
|
||||
"type": "integer"
|
||||
},
|
||||
"onlineDrives": {
|
||||
"type": "integer"
|
||||
},
|
||||
"rrSCParity": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user