From d9e8479c06bdcc1819f5d67e11fbef9a3b5741f8 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 13:47:51 -0800 Subject: [PATCH] adjust UI max count --- weed/topology/data_node.go | 3 +-- weed/topology/topology_map.go | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 05842f33e..bf9557ca0 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -193,8 +193,7 @@ func (dn *DataNode) ToMap() interface{} { ret["Volumes"] = dn.GetVolumeCount() + dn.GetSsdVolumeCount() ret["VolumeIds"] = dn.GetVolumeIds() ret["EcShards"] = dn.GetEcShardCount() - ret["Max"] = dn.GetMaxVolumeCount() - ret["MaxSsd"] = dn.GetMaxSsdVolumeCount() + ret["Max"] = dn.GetMaxVolumeCount() + dn.GetMaxSsdVolumeCount() ret["Free"] = dn.FreeSpace() ret["PublicUrl"] = dn.PublicUrl return ret diff --git a/weed/topology/topology_map.go b/weed/topology/topology_map.go index eb8990ab2..566fa418f 100644 --- a/weed/topology/topology_map.go +++ b/weed/topology/topology_map.go @@ -4,8 +4,7 @@ import "github.com/chrislusf/seaweedfs/weed/pb/master_pb" func (t *Topology) ToMap() interface{} { m := make(map[string]interface{}) - m["Max"] = t.GetMaxVolumeCount() - m["MaxSsd"] = t.GetMaxSsdVolumeCount() + m["Max"] = t.GetMaxVolumeCount() + t.GetMaxSsdVolumeCount() m["Free"] = t.FreeSpace() var dcs []interface{} for _, c := range t.Children() { @@ -30,8 +29,7 @@ func (t *Topology) ToMap() interface{} { func (t *Topology) ToVolumeMap() interface{} { m := make(map[string]interface{}) - m["Max"] = t.GetMaxVolumeCount() - m["MaxSsd"] = t.GetMaxSsdVolumeCount() + m["Max"] = t.GetMaxVolumeCount() + t.GetMaxSsdVolumeCount() m["Free"] = t.FreeSpace() dcs := make(map[NodeId]interface{}) for _, c := range t.Children() {