|
|
|
@ -253,11 +253,14 @@ func getStorageInfoMsgSafeMode(storageInfo StorageInfo) string { |
|
|
|
|
var mcMessage string |
|
|
|
|
if storageInfo.Backend.Type == BackendErasure { |
|
|
|
|
if storageInfo.Backend.OfflineDisks.Sum() > 0 { |
|
|
|
|
mcMessage = "Run `mc admin info` to look for server/disk info`" |
|
|
|
|
mcMessage = "Use `mc admin info` to look for latest server/disk info`" |
|
|
|
|
} |
|
|
|
|
diskInfo := fmt.Sprintf(" %d Online, %d Offline.%s ", storageInfo.Backend.OnlineDisks.Sum(), storageInfo.Backend.OfflineDisks.Sum(), mcMessage) |
|
|
|
|
diskInfo := fmt.Sprintf(" %d Online, %d Offline. ", storageInfo.Backend.OnlineDisks.Sum(), storageInfo.Backend.OfflineDisks.Sum()) |
|
|
|
|
msg += color.Red("Status:") + fmt.Sprintf(getFormatStr(len(diskInfo), 8), diskInfo) |
|
|
|
|
} |
|
|
|
|
if len(mcMessage) > 0 { |
|
|
|
|
msg = fmt.Sprintf("%s %s", mcMessage, msg) |
|
|
|
|
} |
|
|
|
|
return msg |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -267,10 +270,14 @@ func getStorageInfoMsg(storageInfo StorageInfo) string { |
|
|
|
|
var mcMessage string |
|
|
|
|
if storageInfo.Backend.Type == BackendErasure { |
|
|
|
|
if storageInfo.Backend.OfflineDisks.Sum() > 0 { |
|
|
|
|
mcMessage = "Use `mc admin info` to look for server/disk info" |
|
|
|
|
mcMessage = "Use `mc admin info` to look for latest server/disk info" |
|
|
|
|
} |
|
|
|
|
diskInfo := fmt.Sprintf(" %d Online, %d Offline.%s ", storageInfo.Backend.OnlineDisks.Sum(), storageInfo.Backend.OfflineDisks.Sum(), mcMessage) |
|
|
|
|
|
|
|
|
|
diskInfo := fmt.Sprintf(" %d Online, %d Offline. ", storageInfo.Backend.OnlineDisks.Sum(), storageInfo.Backend.OfflineDisks.Sum()) |
|
|
|
|
msg += color.Blue("Status:") + fmt.Sprintf(getFormatStr(len(diskInfo), 8), diskInfo) |
|
|
|
|
if len(mcMessage) > 0 { |
|
|
|
|
msg = fmt.Sprintf("%s %s", mcMessage, msg) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return msg |
|
|
|
|
} |
|
|
|
|