From cfa1d11507fd79e42884b2c581298e192a3efeb5 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 22 Sep 2021 19:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=B7=B2=E7=BB=8F=E6=9C=89?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=88=86=E7=BB=84=E9=85=8D=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=88=86=E7=BB=84=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../servers/server/settings/reverseProxy/index.go | 11 +++++++++++ .../servers/server/settings/reverseProxy/index.html | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/internal/web/actions/default/servers/server/settings/reverseProxy/index.go b/internal/web/actions/default/servers/server/settings/reverseProxy/index.go index 45ab511e..7fb43995 100644 --- a/internal/web/actions/default/servers/server/settings/reverseProxy/index.go +++ b/internal/web/actions/default/servers/server/settings/reverseProxy/index.go @@ -6,6 +6,7 @@ import ( "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" "github.com/iwind/TeaGo/maps" + "github.com/iwind/TeaGo/types" ) // IndexAction 源站列表 @@ -34,13 +35,23 @@ func (this *IndexAction) RunGet(params struct { return } this.Data["hasGroupConfig"] = false + this.Data["groupSettingURL"] = "" switch serverType { case serverconfigs.ServerTypeHTTPWeb, serverconfigs.ServerTypeHTTPProxy: this.Data["hasGroupConfig"] = groupResp.HasHTTPReverseProxy + if groupResp.ServerGroupId > 0 { + this.Data["groupSettingURL"] = "/servers/groups/group/settings/httpReverseProxy?groupId=" + types.String(groupResp.ServerGroupId) + } case serverconfigs.ServerTypeTCPProxy: this.Data["hasGroupConfig"] = groupResp.HasTCPReverseProxy + if groupResp.ServerGroupId > 0 { + this.Data["groupSettingURL"] = "/servers/groups/group/settings/tcpReverseProxy?groupId=" + types.String(groupResp.ServerGroupId) + } case serverconfigs.ServerTypeUDPProxy: this.Data["hasGroupConfig"] = groupResp.HasUDPReverseProxy + if groupResp.ServerGroupId > 0 { + this.Data["groupSettingURL"] = "/servers/groups/group/settings/udpReverseProxy?groupId=" + types.String(groupResp.ServerGroupId) + } } // 当前服务的配置 diff --git a/web/views/@default/servers/server/settings/reverseProxy/index.html b/web/views/@default/servers/server/settings/reverseProxy/index.html index f34569a1..a47f29c9 100644 --- a/web/views/@default/servers/server/settings/reverseProxy/index.html +++ b/web/views/@default/servers/server/settings/reverseProxy/index.html @@ -6,7 +6,7 @@
- 由于已经在当前服务分组中进行了对应的配置,在这里的配置将不会生效。 + 由于已经在当前服务分组中进行了对应的配置,在这里的配置将不会生效。