mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	读取节点列表时可以按照连接数排序
This commit is contained in:
		@@ -225,6 +225,10 @@ func (this *NodeService) ListEnabledNodesMatch(ctx context.Context, req *pb.List
 | 
			
		||||
		order = "loadAsc"
 | 
			
		||||
	} else if req.LoadDesc {
 | 
			
		||||
		order = "loadDesc"
 | 
			
		||||
	} else if req.ConnectionsAsc {
 | 
			
		||||
		order = "connectionsAsc"
 | 
			
		||||
	} else if req.ConnectionsDesc {
 | 
			
		||||
		order = "connectionsDesc"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	nodes, err := models.SharedNodeDAO.ListEnabledNodesMatch(tx, req.NodeClusterId, configutils.ToBoolState(req.InstallState), configutils.ToBoolState(req.ActiveState), req.Keyword, req.NodeGroupId, req.NodeRegionId, req.Level, true, order, req.Offset, req.Size)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user