mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 23:30: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/rpc/pb"
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||||
"github.com/iwind/TeaGo/maps"
|
"github.com/iwind/TeaGo/maps"
|
||||||
|
"github.com/iwind/TeaGo/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// IndexAction 源站列表
|
// IndexAction 源站列表
|
||||||
@@ -34,13 +35,23 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.Data["hasGroupConfig"] = false
|
this.Data["hasGroupConfig"] = false
|
||||||
|
this.Data["groupSettingURL"] = ""
|
||||||
switch serverType {
|
switch serverType {
|
||||||
case serverconfigs.ServerTypeHTTPWeb, serverconfigs.ServerTypeHTTPProxy:
|
case serverconfigs.ServerTypeHTTPWeb, serverconfigs.ServerTypeHTTPProxy:
|
||||||
this.Data["hasGroupConfig"] = groupResp.HasHTTPReverseProxy
|
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:
|
case serverconfigs.ServerTypeTCPProxy:
|
||||||
this.Data["hasGroupConfig"] = groupResp.HasTCPReverseProxy
|
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:
|
case serverconfigs.ServerTypeUDPProxy:
|
||||||
this.Data["hasGroupConfig"] = groupResp.HasUDPReverseProxy
|
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 v-if="hasGroupConfig">
|
||||||
<div class="margin"></div>
|
<div class="margin"></div>
|
||||||
<warning-message>由于已经在当前服务分组中进行了对应的配置,在这里的配置将不会生效。</warning-message>
|
<warning-message>由于已经在当前<a :href="groupSettingURL">服务分组</a>中进行了对应的配置,在这里的配置将不会生效。</warning-message>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="{'opacity-mask': hasGroupConfig}">
|
<div :class="{'opacity-mask': hasGroupConfig}">
|
||||||
|
|||||||
Reference in New Issue
Block a user