IP名单支持模糊查询

This commit is contained in:
GoEdgeLab
2022-10-25 10:15:17 +08:00
parent d391408e9e
commit 68aad3284c
2 changed files with 8 additions and 8 deletions

View File

@@ -21,21 +21,21 @@ func (this *IndexAction) Init() {
}
func (this *IndexAction) RunGet(params struct {
Ip string
Keyword string
GlobalOnly bool
Unread bool
EventLevel string
ListType string
}) {
this.Data["type"] = ""
this.Data["ip"] = params.Ip
this.Data["keyword"] = params.Keyword
this.Data["globalOnly"] = params.GlobalOnly
this.Data["unread"] = params.Unread
this.Data["eventLevel"] = params.EventLevel
this.Data["listType"] = params.ListType
countUnreadResp, err := this.RPC().IPItemRPC().CountAllEnabledIPItems(this.AdminContext(), &pb.CountAllEnabledIPItemsRequest{
Ip: params.Ip,
Keyword: params.Keyword,
GlobalOnly: params.GlobalOnly,
Unread: true,
EventLevel: params.EventLevel,
@@ -48,7 +48,7 @@ func (this *IndexAction) RunGet(params struct {
this.Data["countUnread"] = countUnreadResp.Count
countResp, err := this.RPC().IPItemRPC().CountAllEnabledIPItems(this.AdminContext(), &pb.CountAllEnabledIPItemsRequest{
Ip: params.Ip,
Keyword: params.Keyword,
GlobalOnly: params.GlobalOnly,
Unread: params.Unread,
EventLevel: params.EventLevel,
@@ -63,7 +63,7 @@ func (this *IndexAction) RunGet(params struct {
this.Data["page"] = page.AsHTML()
itemsResp, err := this.RPC().IPItemRPC().ListAllEnabledIPItems(this.AdminContext(), &pb.ListAllEnabledIPItemsRequest{
Ip: params.Ip,
Keyword: params.Keyword,
GlobalOnly: params.GlobalOnly,
Unread: params.Unread,
EventLevel: params.EventLevel,