mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-07 18:10:24 +08:00
实现总体流量按天统计、按小时统计,提供管理平台Dashboard API
This commit is contained in:
@@ -163,6 +163,8 @@ func (this *NodeDAO) UpdateNode(tx *dbs.Tx, nodeId int64, name string, clusterId
|
||||
func (this *NodeDAO) CountAllEnabledNodes(tx *dbs.Tx) (int64, error) {
|
||||
return this.Query(tx).
|
||||
State(NodeStateEnabled).
|
||||
Where("clusterId IN (SELECT id FROM "+SharedNodeClusterDAO.Table+" WHERE state=:clusterState)").
|
||||
Param("clusterState", NodeClusterStateEnabled).
|
||||
Count()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user