Stops showing usage info if Bucket#=0 (#3007)

This commit is contained in:
ebozduman
2019-12-11 20:46:30 -08:00
committed by Harshavardhana
parent 2616a1d051
commit 85f814eb44
+5 -4
View File
@@ -172,10 +172,11 @@ func (u clusterStruct) String() (msg string) {
// Summary on used space, total no of buckets and
// total no of objects at the Cluster level
usedTotal := humanize.IBytes(uint64(u.Info.Usage.Size))
msg += fmt.Sprintf("%s Used, %s, %s", usedTotal,
english.Plural(u.Info.Buckets.Count, "Bucket", ""),
english.Plural(u.Info.Objects.Count, "Object", ""))
if u.Info.Buckets.Count > 0 {
msg += fmt.Sprintf("%s Used, %s, %s", usedTotal,
english.Plural(u.Info.Buckets.Count, "Bucket", ""),
english.Plural(u.Info.Objects.Count, "Object", ""))
}
if backendType != "FS" {
// Summary on total no of online and total
// number of offline disks at the Cluster level