Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
fc8a50a8
Commit
fc8a50a8
authored
Mar 07, 2025
by
qiuqunfeng
Browse files
debug
parent
2e7672eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
internal/service/waf.go
internal/service/waf.go
+2
-1
No files found.
internal/service/waf.go
View file @
fc8a50a8
...
...
@@ -815,6 +815,7 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) (
}
}
log
.
Info
()
.
Interface
(
"limit"
,
req
.
Limit
)
.
Msg
(
"limit"
)
res
,
err
:=
ss
.
Query
(
boolQuery
)
.
Size
(
req
.
Limit
)
.
SortBy
(
elastic
.
NewFieldSort
(
"attack_time"
)
.
Order
(
false
),
elastic
.
NewFieldSort
(
"id.digit"
)
.
Order
(
false
))
.
...
...
@@ -827,7 +828,7 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) (
list
:=
make
([]
model
.
WafDetection
,
len
(
res
.
Hits
.
Hits
))
endIdx
:=
len
(
res
.
Hits
.
Hits
)
-
1
pageToken
:=
""
log
.
Info
()
.
Interface
(
"
hit
s"
,
res
.
Hits
.
Hits
)
.
Msg
(
"list attack logs res"
)
log
.
Info
()
.
Interface
(
"
re
s"
,
res
)
.
Msg
(
"list attack logs res"
)
for
i
,
hit
:=
range
res
.
Hits
.
Hits
{
log
.
Info
()
.
Interface
(
"hit source"
,
hit
.
Source
)
.
Msg
(
"hit"
)
wafDetection
:=
model
.
WafDetection
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment