mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 14:50:25 +08:00
Admin看板增加默认集群ID
This commit is contained in:
@@ -474,6 +474,15 @@ func (this *AdminService) ComposeAdminDashboard(ctx context.Context, req *pb.Com
|
||||
|
||||
var tx = this.NullTx()
|
||||
|
||||
// 默认集群
|
||||
nodeClusters, err := models.SharedNodeClusterDAO.ListEnabledClusters(tx, "", 0, 1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(nodeClusters) > 0 {
|
||||
result.DefaultNodeClusterId = int64(nodeClusters[0].Id)
|
||||
}
|
||||
|
||||
// 集群数
|
||||
countClusters, err := models.SharedNodeClusterDAO.CountAllEnabledClusters(tx, "")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user