mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-08 19:40:24 +08:00
[边缘节点]可以同时通过关键词搜索集群和节点
This commit is contained in:
@@ -162,12 +162,16 @@ func (this *NodeService) ListEnabledNodesMatch(ctx context.Context, req *pb.List
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dnsDomainId := int64(clusterDNS.DnsDomainId)
|
||||
|
||||
dnsDomainId := int64(0)
|
||||
domainRoutes := []*dnsclients.Route{}
|
||||
if clusterDNS.DnsDomainId > 0 {
|
||||
domainRoutes, err = models.SharedDNSDomainDAO.FindDomainRoutes(dnsDomainId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if clusterDNS != nil {
|
||||
dnsDomainId = int64(clusterDNS.DnsDomainId)
|
||||
if clusterDNS.DnsDomainId > 0 {
|
||||
domainRoutes, err = models.SharedDNSDomainDAO.FindDomainRoutes(dnsDomainId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +289,6 @@ func (this *NodeService) FindAllEnabledNodesWithClusterId(ctx context.Context, r
|
||||
// TODO 检查权限
|
||||
}
|
||||
|
||||
|
||||
nodes, err := models.SharedNodeDAO.FindAllEnabledNodesWithClusterId(req.NodeClusterId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user