mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-15 23:26:35 +08:00
[域名解析]优化解析状态显示
This commit is contained in:
@@ -685,6 +685,19 @@ func (this *NodeDAO) FindAllEnabledNodesDNSWithClusterId(clusterId int64) (resul
|
||||
return
|
||||
}
|
||||
|
||||
// 计算一个集群的节点DNS数量
|
||||
func (this *NodeDAO) CountAllEnabledNodesDNSWithClusterId(clusterId int64) (result int64, err error) {
|
||||
return this.Query().
|
||||
State(NodeStateEnabled).
|
||||
Attr("clusterId", clusterId).
|
||||
Attr("isOn", true).
|
||||
Attr("isUp", true).
|
||||
Result("id", "name", "dnsRoutes", "isOn").
|
||||
DescPk().
|
||||
Slice(&result).
|
||||
Count()
|
||||
}
|
||||
|
||||
// 获取单个节点的DNS信息
|
||||
func (this *NodeDAO) FindEnabledNodeDNS(nodeId int64) (*Node, error) {
|
||||
one, err := this.Query().
|
||||
|
||||
Reference in New Issue
Block a user