mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-14 04:10:26 +08:00
提示已经有服务分组配置时加入分组链接
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
// 当前服务的配置
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div v-if="hasGroupConfig">
|
||||
<div class="margin"></div>
|
||||
<warning-message>由于已经在当前服务分组中进行了对应的配置,在这里的配置将不会生效。</warning-message>
|
||||
<warning-message>由于已经在当前<a :href="groupSettingURL">服务分组</a>中进行了对应的配置,在这里的配置将不会生效。</warning-message>
|
||||
</div>
|
||||
|
||||
<div :class="{'opacity-mask': hasGroupConfig}">
|
||||
|
||||
Reference in New Issue
Block a user