实现CPU线程数和修改节点的启用状态

This commit is contained in:
GoEdgeLab
2020-10-10 12:31:59 +08:00
parent aa56d4e67b
commit a507d53b03
6 changed files with 51 additions and 3 deletions

View File

@@ -2,9 +2,9 @@ package node
import (
"encoding/json"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
@@ -102,6 +102,8 @@ func (this *UpdateAction) RunGet(params struct {
"ipAddresses": ipAddressMaps,
"cluster": clusterMap,
"login": loginMap,
"maxCPU": node.MaxCPU,
"isOn": node.IsOn,
}
// 所有集群
@@ -134,6 +136,8 @@ func (this *UpdateAction) RunPost(params struct {
GrantId int64
SshHost string
SshPort int
MaxCPU int32
IsOn bool
Must *actions.Must
}) {
@@ -168,6 +172,8 @@ func (this *UpdateAction) RunPost(params struct {
Name: params.Name,
ClusterId: params.ClusterId,
Login: loginInfo,
MaxCPU: params.MaxCPU,
IsOn: params.IsOn,
})
if err != nil {
this.ErrorPage(err)