实现总体流量按天统计、按小时统计,提供管理平台Dashboard API

This commit is contained in:
GoEdgeLab
2021-01-21 18:55:34 +08:00
parent f914f45098
commit f947d769f7
15 changed files with 489 additions and 4 deletions

View File

@@ -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()
}