diff --git a/internal/web/actions/default/servers/server/settings/waf/init.go b/internal/web/actions/default/servers/server/settings/waf/init.go
index 5d29c5b9..eb2d352c 100644
--- a/internal/web/actions/default/servers/server/settings/waf/init.go
+++ b/internal/web/actions/default/servers/server/settings/waf/init.go
@@ -2,6 +2,7 @@ package waf
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/waf/ipadmin"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/serverutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
@@ -14,6 +15,13 @@ func init() {
Helper(serverutils.NewServerHelper()).
Prefix("/servers/server/settings/waf").
GetPost("", new(IndexAction)).
+ Get("/ipadmin/allowList", new(ipadmin.AllowListAction)).
+ Get("/ipadmin/denyList", new(ipadmin.DenyListAction)).
+ //GetPost("/ipadmin", new(ipadmin.IndexAction)).
+ //GetPost("/ipadmin/provinces", new(ipadmin.ProvincesAction)).
+ GetPost("/ipadmin/createIPPopup", new(ipadmin.CreateIPPopupAction)).
+ GetPost("/ipadmin/updateIPPopup", new(ipadmin.UpdateIPPopupAction)).
+ Post("/ipadmin/deleteIP", new(ipadmin.DeleteIPAction)).
EndAll()
})
}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/allowList.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/allowList.go
new file mode 100644
index 00000000..3b622114
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/allowList.go
@@ -0,0 +1,80 @@
+package ipadmin
+
+import (
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/iwind/TeaGo/maps"
+ timeutil "github.com/iwind/TeaGo/utils/time"
+)
+
+type AllowListAction struct {
+ actionutils.ParentAction
+}
+
+func (this *AllowListAction) Init() {
+ this.Nav("", "setting", "allowList")
+ this.SecondMenu("waf")
+}
+
+func (this *AllowListAction) RunGet(params struct {
+ ServerId int64
+}) {
+ this.Data["featureIsOn"] = true
+
+ listId, err := dao.SharedIPListDAO.FindAllowIPListIdWithServerId(this.AdminContext(), params.ServerId)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ // 创建
+ if listId == 0 {
+ listId, err = dao.SharedIPListDAO.CreateIPListForServerId(this.AdminContext(), params.ServerId, "white")
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ }
+
+ this.Data["listId"] = listId
+
+ // 数量
+ countResp, err := this.RPC().IPItemRPC().CountIPItemsWithListId(this.AdminContext(), &pb.CountIPItemsWithListIdRequest{IpListId: listId})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ count := countResp.Count
+ page := this.NewPage(count)
+ this.Data["page"] = page.AsHTML()
+
+ // 列表
+ itemsResp, err := this.RPC().IPItemRPC().ListIPItemsWithListId(this.AdminContext(), &pb.ListIPItemsWithListIdRequest{
+ IpListId: listId,
+ Offset: page.Offset,
+ Size: page.Size,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ itemMaps := []maps.Map{}
+ for _, item := range itemsResp.IpItems {
+ expiredTime := ""
+ if item.ExpiredAt > 0 {
+ expiredTime = timeutil.FormatTime("Y-m-d H:i:s", item.ExpiredAt)
+ }
+
+ itemMaps = append(itemMaps, maps.Map{
+ "id": item.Id,
+ "ipFrom": item.IpFrom,
+ "ipTo": item.IpTo,
+ "expiredTime": expiredTime,
+ "reason": item.Reason,
+ })
+ }
+ this.Data["items"] = itemMaps
+
+ this.Show()
+}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/createIPPopup.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/createIPPopup.go
new file mode 100644
index 00000000..985bb4cc
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/createIPPopup.go
@@ -0,0 +1,81 @@
+package ipadmin
+
+import (
+ "github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
+ "github.com/TeaOSLab/EdgeAdmin/internal/utils"
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/iwind/TeaGo/actions"
+)
+
+type CreateIPPopupAction struct {
+ actionutils.ParentAction
+}
+
+func (this *CreateIPPopupAction) Init() {
+ this.Nav("", "", "")
+}
+
+func (this *CreateIPPopupAction) RunGet(params struct {
+ ListId int64
+ Type string
+}) {
+ this.Data["type"] = params.Type
+ this.Data["listId"] = params.ListId
+
+ this.Show()
+}
+
+func (this *CreateIPPopupAction) RunPost(params struct {
+ ListId int64
+ IpFrom string
+ IpTo string
+ ExpiredAt int64
+ Reason string
+
+ Must *actions.Must
+ CSRF *actionutils.CSRF
+}) {
+ // TODO 校验ListId所属用户
+
+ params.Must.
+ Field("ipFrom", params.IpFrom).
+ Require("请输入开始IP")
+
+ // 校验IP格式(ipFrom/ipTo)
+ ipFromLong := utils.IP2Long(params.IpFrom)
+ if len(params.IpFrom) > 0 {
+ if ipFromLong == 0 {
+ this.Fail("请输入正确的开始IP")
+ }
+ }
+
+ ipToLong := utils.IP2Long(params.IpTo)
+ if len(params.IpTo) > 0 {
+ if ipToLong == 0 {
+ this.Fail("请输入正确的结束IP")
+ }
+ }
+
+ if ipFromLong > 0 && ipToLong > 0 && ipFromLong > ipToLong {
+ params.IpTo, params.IpFrom = params.IpFrom, params.IpTo
+ }
+
+ createResp, err := this.RPC().IPItemRPC().CreateIPItem(this.AdminContext(), &pb.CreateIPItemRequest{
+ IpListId: params.ListId,
+ IpFrom: params.IpFrom,
+ IpTo: params.IpTo,
+ ExpiredAt: params.ExpiredAt,
+ Reason: params.Reason,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ itemId := createResp.IpItemId
+
+ // 日志
+ defer this.CreateLog(oplogs.LevelInfo, "在WAF策略 %d 名单中添加IP %d", params.ListId, itemId)
+
+ this.Success()
+}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/deleteIP.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/deleteIP.go
new file mode 100644
index 00000000..a5cf1dc2
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/deleteIP.go
@@ -0,0 +1,29 @@
+package ipadmin
+
+import (
+ "github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+)
+
+type DeleteIPAction struct {
+ actionutils.ParentAction
+}
+
+func (this *DeleteIPAction) RunPost(params struct {
+ FirewallPolicyId int64
+ ItemId int64
+}) {
+ // 日志
+ defer this.CreateLog(oplogs.LevelInfo, "从WAF策略 %d 名单中删除IP %d", params.FirewallPolicyId, params.ItemId)
+
+ // TODO 判断权限
+
+ _, err := this.RPC().IPItemRPC().DeleteIPItem(this.AdminContext(), &pb.DeleteIPItemRequest{IpItemId: params.ItemId})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ this.Success()
+}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/denyList.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/denyList.go
new file mode 100644
index 00000000..a703b424
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/denyList.go
@@ -0,0 +1,80 @@
+package ipadmin
+
+import (
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/iwind/TeaGo/maps"
+ timeutil "github.com/iwind/TeaGo/utils/time"
+)
+
+type DenyListAction struct {
+ actionutils.ParentAction
+}
+
+func (this *DenyListAction) Init() {
+ this.Nav("", "setting", "denyList")
+ this.SecondMenu("waf")
+}
+
+func (this *DenyListAction) RunGet(params struct {
+ ServerId int64
+}) {
+ this.Data["featureIsOn"] = true
+
+ listId, err := dao.SharedIPListDAO.FindDenyIPListIdWithServerId(this.AdminContext(), params.ServerId)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ // 创建
+ if listId == 0 {
+ listId, err = dao.SharedIPListDAO.CreateIPListForServerId(this.AdminContext(), params.ServerId, "black")
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ }
+
+ this.Data["listId"] = listId
+
+ // 数量
+ countResp, err := this.RPC().IPItemRPC().CountIPItemsWithListId(this.AdminContext(), &pb.CountIPItemsWithListIdRequest{IpListId: listId})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ count := countResp.Count
+ page := this.NewPage(count)
+ this.Data["page"] = page.AsHTML()
+
+ // 列表
+ itemsResp, err := this.RPC().IPItemRPC().ListIPItemsWithListId(this.AdminContext(), &pb.ListIPItemsWithListIdRequest{
+ IpListId: listId,
+ Offset: page.Offset,
+ Size: page.Size,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ itemMaps := []maps.Map{}
+ for _, item := range itemsResp.IpItems {
+ expiredTime := ""
+ if item.ExpiredAt > 0 {
+ expiredTime = timeutil.FormatTime("Y-m-d H:i:s", item.ExpiredAt)
+ }
+
+ itemMaps = append(itemMaps, maps.Map{
+ "id": item.Id,
+ "ipFrom": item.IpFrom,
+ "ipTo": item.IpTo,
+ "expiredTime": expiredTime,
+ "reason": item.Reason,
+ })
+ }
+ this.Data["items"] = itemMaps
+
+ this.Show()
+}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/index.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/index.go
new file mode 100644
index 00000000..4535a802
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/index.go
@@ -0,0 +1,108 @@
+package ipadmin
+
+import (
+ "encoding/json"
+ "github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
+ "github.com/iwind/TeaGo/actions"
+ "github.com/iwind/TeaGo/lists"
+ "github.com/iwind/TeaGo/maps"
+ "strings"
+)
+
+type IndexAction struct {
+ actionutils.ParentAction
+}
+
+func (this *IndexAction) Init() {
+ this.Nav("", "", "ipadmin")
+}
+
+func (this *IndexAction) RunGet(params struct {
+ FirewallPolicyId int64
+}) {
+ this.Data["subMenuItem"] = "region"
+
+ // 当前选中的地区
+ policyConfig, err := dao.SharedHTTPFirewallPolicyDAO.FindEnabledHTTPFirewallPolicyConfig(this.AdminContext(), params.FirewallPolicyId)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ if policyConfig == nil {
+ this.NotFound("firewallPolicy", params.FirewallPolicyId)
+ return
+ }
+ selectedCountryIds := []int64{}
+ if policyConfig.Inbound != nil && policyConfig.Inbound.Region != nil {
+ selectedCountryIds = policyConfig.Inbound.Region.DenyCountryIds
+ }
+
+ countriesResp, err := this.RPC().RegionCountryRPC().FindAllEnabledRegionCountries(this.AdminContext(), &pb.FindAllEnabledRegionCountriesRequest{})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ countryMaps := []maps.Map{}
+ for _, country := range countriesResp.Countries {
+ countryMaps = append(countryMaps, maps.Map{
+ "id": country.Id,
+ "name": country.Name,
+ "letter": strings.ToUpper(string(country.Pinyin[0][0])),
+ "isChecked": lists.ContainsInt64(selectedCountryIds, country.Id),
+ })
+ }
+ this.Data["countries"] = countryMaps
+
+ this.Show()
+}
+
+func (this *IndexAction) RunPost(params struct {
+ FirewallPolicyId int64
+ CountryIds []int64
+
+ Must *actions.Must
+}) {
+ // 日志
+ defer this.CreateLog(oplogs.LevelInfo, "WAF策略 %d 设置禁止访问的国家和地区", params.FirewallPolicyId)
+
+ policyConfig, err := dao.SharedHTTPFirewallPolicyDAO.FindEnabledHTTPFirewallPolicyConfig(this.AdminContext(), params.FirewallPolicyId)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ if policyConfig == nil {
+ this.NotFound("firewallPolicy", params.FirewallPolicyId)
+ return
+ }
+
+ if policyConfig.Inbound == nil {
+ policyConfig.Inbound = &firewallconfigs.HTTPFirewallInboundConfig{IsOn: true}
+ }
+ if policyConfig.Inbound.Region == nil {
+ policyConfig.Inbound.Region = &firewallconfigs.HTTPFirewallRegionConfig{
+ IsOn: true,
+ }
+ }
+ policyConfig.Inbound.Region.DenyCountryIds = params.CountryIds
+
+ inboundJSON, err := json.Marshal(policyConfig.Inbound)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ _, err = this.RPC().HTTPFirewallPolicyRPC().UpdateHTTPFirewallInboundConfig(this.AdminContext(), &pb.UpdateHTTPFirewallInboundConfigRequest{
+ HttpFirewallPolicyId: params.FirewallPolicyId,
+ InboundJSON: inboundJSON,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ this.Success()
+}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/provinces.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/provinces.go
new file mode 100644
index 00000000..b6592c5c
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/provinces.go
@@ -0,0 +1,110 @@
+package ipadmin
+
+import (
+ "encoding/json"
+ "github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
+ "github.com/iwind/TeaGo/actions"
+ "github.com/iwind/TeaGo/lists"
+ "github.com/iwind/TeaGo/maps"
+)
+
+const ChinaCountryId = 1
+
+type ProvincesAction struct {
+ actionutils.ParentAction
+}
+
+func (this *ProvincesAction) Init() {
+ this.Nav("", "", "ipadmin")
+}
+
+func (this *ProvincesAction) RunGet(params struct {
+ FirewallPolicyId int64
+}) {
+ this.Data["subMenuItem"] = "province"
+
+ // 当前选中的省份
+ policyConfig, err := dao.SharedHTTPFirewallPolicyDAO.FindEnabledHTTPFirewallPolicyConfig(this.AdminContext(), params.FirewallPolicyId)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ if policyConfig == nil {
+ this.NotFound("firewallPolicy", params.FirewallPolicyId)
+ return
+ }
+ selectedProvinceIds := []int64{}
+ if policyConfig.Inbound != nil && policyConfig.Inbound.Region != nil {
+ selectedProvinceIds = policyConfig.Inbound.Region.DenyProvinceIds
+ }
+
+ provincesResp, err := this.RPC().RegionProvinceRPC().FindAllEnabledRegionProvincesWithCountryId(this.AdminContext(), &pb.FindAllEnabledRegionProvincesWithCountryIdRequest{
+ CountryId: int64(ChinaCountryId),
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ provinceMaps := []maps.Map{}
+ for _, province := range provincesResp.Provinces {
+ provinceMaps = append(provinceMaps, maps.Map{
+ "id": province.Id,
+ "name": province.Name,
+ "isChecked": lists.ContainsInt64(selectedProvinceIds, province.Id),
+ })
+ }
+ this.Data["provinces"] = provinceMaps
+
+ this.Show()
+}
+
+func (this *ProvincesAction) RunPost(params struct {
+ FirewallPolicyId int64
+ ProvinceIds []int64
+
+ Must *actions.Must
+}) {
+ // 日志
+ defer this.CreateLog(oplogs.LevelInfo, "WAF策略 %d 设置禁止访问的省份", params.FirewallPolicyId)
+
+ policyConfig, err := dao.SharedHTTPFirewallPolicyDAO.FindEnabledHTTPFirewallPolicyConfig(this.AdminContext(), params.FirewallPolicyId)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ if policyConfig == nil {
+ this.NotFound("firewallPolicy", params.FirewallPolicyId)
+ return
+ }
+
+ if policyConfig.Inbound == nil {
+ policyConfig.Inbound = &firewallconfigs.HTTPFirewallInboundConfig{IsOn: true}
+ }
+ if policyConfig.Inbound.Region == nil {
+ policyConfig.Inbound.Region = &firewallconfigs.HTTPFirewallRegionConfig{
+ IsOn: true,
+ }
+ }
+ policyConfig.Inbound.Region.DenyProvinceIds = params.ProvinceIds
+
+ inboundJSON, err := json.Marshal(policyConfig.Inbound)
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ _, err = this.RPC().HTTPFirewallPolicyRPC().UpdateHTTPFirewallInboundConfig(this.AdminContext(), &pb.UpdateHTTPFirewallInboundConfigRequest{
+ HttpFirewallPolicyId: params.FirewallPolicyId,
+ InboundJSON: inboundJSON,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ this.Success()
+}
diff --git a/internal/web/actions/default/servers/server/settings/waf/ipadmin/updateIPPopup.go b/internal/web/actions/default/servers/server/settings/waf/ipadmin/updateIPPopup.go
new file mode 100644
index 00000000..f25d3d9c
--- /dev/null
+++ b/internal/web/actions/default/servers/server/settings/waf/ipadmin/updateIPPopup.go
@@ -0,0 +1,97 @@
+package ipadmin
+
+import (
+ "github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
+ "github.com/TeaOSLab/EdgeAdmin/internal/utils"
+ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/iwind/TeaGo/actions"
+ "github.com/iwind/TeaGo/maps"
+)
+
+type UpdateIPPopupAction struct {
+ actionutils.ParentAction
+}
+
+func (this *UpdateIPPopupAction) Init() {
+ this.Nav("", "", "")
+}
+
+func (this *UpdateIPPopupAction) RunGet(params struct {
+ ItemId int64
+}) {
+ itemResp, err := this.RPC().IPItemRPC().FindEnabledIPItem(this.AdminContext(), &pb.FindEnabledIPItemRequest{IpItemId: params.ItemId})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ item := itemResp.IpItem
+ if item == nil {
+ this.NotFound("ipItem", params.ItemId)
+ return
+ }
+
+ this.Data["item"] = maps.Map{
+ "id": item.Id,
+ "ipFrom": item.IpFrom,
+ "ipTo": item.IpTo,
+ "expiredAt": item.ExpiredAt,
+ "reason": item.Reason,
+ }
+
+ this.Show()
+}
+
+func (this *UpdateIPPopupAction) RunPost(params struct {
+ ItemId int64
+
+ IpFrom string
+ IpTo string
+ ExpiredAt int64
+ Reason string
+
+ Must *actions.Must
+ CSRF *actionutils.CSRF
+}) {
+ // 日志
+ defer this.CreateLog(oplogs.LevelInfo, "修改WAF策略名单中的IP %d", params.ItemId)
+
+ // TODO 校验ItemId所属用户
+
+ params.Must.
+ Field("ipFrom", params.IpFrom).
+ Require("请输入开始IP")
+
+ // 校验IP格式(ipFrom/ipTo)
+ ipFromLong := utils.IP2Long(params.IpFrom)
+ if len(params.IpFrom) > 0 {
+ if ipFromLong == 0 {
+ this.Fail("请输入正确的开始IP")
+ }
+ }
+
+ ipToLong := utils.IP2Long(params.IpTo)
+ if len(params.IpTo) > 0 {
+ if ipToLong == 0 {
+ this.Fail("请输入正确的结束IP")
+ }
+ }
+
+ if ipFromLong > 0 && ipToLong > 0 && ipFromLong > ipToLong {
+ params.IpTo, params.IpFrom = params.IpFrom, params.IpTo
+ }
+
+ _, err := this.RPC().IPItemRPC().UpdateIPItem(this.AdminContext(), &pb.UpdateIPItemRequest{
+ IpItemId: params.ItemId,
+ IpFrom: params.IpFrom,
+ IpTo: params.IpTo,
+ ExpiredAt: params.ExpiredAt,
+ Reason: params.Reason,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+
+ this.Success()
+}
diff --git a/web/views/@default/clusters/tasks/listPopup.js b/web/views/@default/clusters/tasks/listPopup.js
index 38e06086..2b6db9f9 100644
--- a/web/views/@default/clusters/tasks/listPopup.js
+++ b/web/views/@default/clusters/tasks/listPopup.js
@@ -12,7 +12,7 @@ Tea.context(function () {
.done(function () {
this.$delay(function () {
this.reload()
- }, 5000)
+ }, 3000)
})
}
diff --git a/web/views/@default/servers/server/settings/waf/@menu.html b/web/views/@default/servers/server/settings/waf/@menu.html
new file mode 100644
index 00000000..d2263917
--- /dev/null
+++ b/web/views/@default/servers/server/settings/waf/@menu.html
@@ -0,0 +1,5 @@
+
暂时还没有IP。
+ +| IP | +过期时间 | +备注 | +操作 | +
|---|---|---|---|
| {{item.ipFrom}} - {{item.ipTo}} | ++ {{item.expiredTime}} + 不过期 + | ++ {{item.reason}} + - + | ++ 修改 + 删除 + | +