mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-25 03:00:25 +08:00
可以在分组中设置一些全局配置选项
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
// 源站列表
|
||||
// IndexAction 源站列表
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
@@ -27,6 +27,23 @@ func (this *IndexAction) RunGet(params struct {
|
||||
}
|
||||
serverType := serverTypeResp.Type
|
||||
|
||||
// 当前是否有分组设置
|
||||
groupResp, err := this.RPC().ServerGroupRPC().FindEnabledServerGroupConfigInfo(this.AdminContext(), &pb.FindEnabledServerGroupConfigInfoRequest{ServerId: params.ServerId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
this.Data["hasGroupConfig"] = false
|
||||
switch serverType {
|
||||
case serverconfigs.ServerTypeHTTPWeb, serverconfigs.ServerTypeHTTPProxy:
|
||||
this.Data["hasGroupConfig"] = groupResp.HasHTTPReverseProxy
|
||||
case serverconfigs.ServerTypeTCPProxy:
|
||||
this.Data["hasGroupConfig"] = groupResp.HasTCPReverseProxy
|
||||
case serverconfigs.ServerTypeUDPProxy:
|
||||
this.Data["hasGroupConfig"] = groupResp.HasUDPReverseProxy
|
||||
}
|
||||
|
||||
// 当前服务的配置
|
||||
reverseProxyResp, err := this.RPC().ServerRPC().FindAndInitServerReverseProxyConfig(this.AdminContext(), &pb.FindAndInitServerReverseProxyConfigRequest{ServerId: params.ServerId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
Reference in New Issue
Block a user