From 0564bea4bede2729b31c2a1e54bc3a38e6712e98 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 3 Jan 2022 16:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=87=AA=E5=8A=A8=E5=9C=A8fi?= =?UTF-8?q?rewalld=E4=B8=AD=E5=BC=80=E6=94=BE=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/actions/default/clusters/cluster/settings/index.go | 3 +++ web/views/@default/clusters/cluster/settings/index.html | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/internal/web/actions/default/clusters/cluster/settings/index.go b/internal/web/actions/default/clusters/cluster/settings/index.go index 6f4a4b93..ef96319c 100644 --- a/internal/web/actions/default/clusters/cluster/settings/index.go +++ b/internal/web/actions/default/clusters/cluster/settings/index.go @@ -72,6 +72,7 @@ func (this *IndexAction) RunGet(params struct { "timeZone": cluster.TimeZone, "nodeMaxThreads": cluster.NodeMaxThreads, "nodeTCPMaxConnections": cluster.NodeTCPMaxConnections, + "autoOpenPorts": cluster.AutoOpenPorts, } // 默认值 @@ -92,6 +93,7 @@ func (this *IndexAction) RunPost(params struct { TimeZone string NodeMaxThreads int32 NodeTCPMaxConnections int32 + AutoOpenPorts bool Must *actions.Must }) { @@ -117,6 +119,7 @@ func (this *IndexAction) RunPost(params struct { TimeZone: params.TimeZone, NodeMaxThreads: params.NodeMaxThreads, NodeTCPMaxConnections: params.NodeTCPMaxConnections, + AutoOpenPorts: params.AutoOpenPorts, }) if err != nil { this.ErrorPage(err) diff --git a/web/views/@default/clusters/cluster/settings/index.html b/web/views/@default/clusters/cluster/settings/index.html index c857e6e5..1b04f9a0 100644 --- a/web/views/@default/clusters/cluster/settings/index.html +++ b/web/views/@default/clusters/cluster/settings/index.html @@ -59,6 +59,13 @@

如果为0,则默认为{{defaultNodeTCPMaxConnections}}。

+ + 自动开放端口 + + +

选中后会自动尝试在边缘节点正在运行的firewalld中开放所需端口;如果有别的防火墙或者安全策略,仍然需要手工操作。

+ +