mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-13 02:00:26 +08:00
实现迁移辅助功能(系统设置 -- 高级设置 -- 迁移)
This commit is contained in:
23
internal/web/actions/default/settings/transfer/statNodes.go
Normal file
23
internal/web/actions/default/settings/transfer/statNodes.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package transfer
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
type StatNodesAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *StatNodesAction) RunPost(params struct{}) {
|
||||
countNodesResp, err := this.RPC().NodeRPC().CountAllEnabledNodesMatch(this.AdminContext(), &pb.CountAllEnabledNodesMatchRequest{ActiveState: 1})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
this.Data["countNodes"] = countNodesResp.Count
|
||||
|
||||
this.Success()
|
||||
}
|
||||
Reference in New Issue
Block a user