diff --git a/internal/web/actions/default/clusters/cluster/index.go b/internal/web/actions/default/clusters/cluster/index.go index 4bbc42f6..055bc670 100644 --- a/internal/web/actions/default/clusters/cluster/index.go +++ b/internal/web/actions/default/clusters/cluster/index.go @@ -83,6 +83,7 @@ func (this *IndexAction) RunGet(params struct { "id": node.Id, "name": node.Name, "isInstalled": node.IsInstalled, + "isOn": node.IsOn, "installStatus": maps.Map{ "isRunning": node.InstallStatus.IsRunning, "isFinished": node.InstallStatus.IsFinished, diff --git a/internal/web/actions/default/clusters/cluster/node/node.go b/internal/web/actions/default/clusters/cluster/node/node.go index d667bd20..3bfdc882 100644 --- a/internal/web/actions/default/clusters/cluster/node/node.go +++ b/internal/web/actions/default/clusters/cluster/node/node.go @@ -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/maps" ) @@ -115,6 +115,8 @@ func (this *NodeAction) RunGet(params struct { "isInstalled": node.IsInstalled, "uniqueId": node.UniqueId, "secret": node.Secret, + "maxCPU": node.MaxCPU, + "isOn": node.IsOn, } this.Show() diff --git a/internal/web/actions/default/clusters/cluster/node/update.go b/internal/web/actions/default/clusters/cluster/node/update.go index dbdaddec..979a0800 100644 --- a/internal/web/actions/default/clusters/cluster/node/update.go +++ b/internal/web/actions/default/clusters/cluster/node/update.go @@ -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) diff --git a/web/views/@default/clusters/cluster/index.html b/web/views/@default/clusters/cluster/index.html index 6e5729a9..92350535 100644 --- a/web/views/@default/clusters/cluster/index.html +++ b/web/views/@default/clusters/cluster/index.html @@ -72,7 +72,10 @@ -
当前节点可以使用的最多的CPU线程数,如果为0表示可以使用全部CPU。
+如果不启用此节点,此节点上的所有服务将不能访问。
+