mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-12 19:30:26 +08:00
waf/ip名单有变更立即发送通知
This commit is contained in:
@@ -2,6 +2,7 @@ package ipadmin
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/components/waf/ipadmin/ipadminutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
@@ -41,7 +42,8 @@ func (this *UpdateIPPopupAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
func (this *UpdateIPPopupAction) RunPost(params struct {
|
||||
ItemId int64
|
||||
FirewallPolicyId int64
|
||||
ItemId int64
|
||||
|
||||
IpFrom string
|
||||
IpTo string
|
||||
@@ -70,5 +72,12 @@ func (this *UpdateIPPopupAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
|
||||
// 发送通知
|
||||
err = ipadminutils.NotifyUpdateToClustersWithFirewallPolicyId(this.AdminContext(), params.FirewallPolicyId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user