feat: 1.4.1 pagination, network probes, survival by blocker, report polish
Release / Publish tags (push) Successful in 18s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Successful in 1m47s
Release / Build image (amd64) (push) Successful in 21s
Release / Build image (arm64) (push) Successful in 28s
CI / Format and vet (push) Successful in 23s
CI / Tests (Linux, race detector) (push) Successful in 1m24s
CI / Dependency audit (push) Successful in 24s
CI / Docker image (build and smoke test) (push) Skipped
Release / Gitea release (push) Successful in 5s
Release / Publish tags (push) Successful in 18s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Successful in 1m47s
Release / Build image (amd64) (push) Successful in 21s
Release / Build image (arm64) (push) Successful in 28s
CI / Format and vet (push) Successful in 23s
CI / Tests (Linux, race detector) (push) Successful in 1m24s
CI / Dependency audit (push) Successful in 24s
CI / Docker image (build and smoke test) (push) Skipped
Release / Gitea release (push) Successful in 5s
Backend pagination with one pager for sessions, IPs, campaigns and events; network probe source (port-scan, T1046, second firewall reason port-scan); host kit logs inbound probes; urutau call on the report cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f27d8441a9
commit
432f521ed1
40 files changed
+927
-136
No files matched your search
@@ -555,25 +555,8 @@ func (s *Server) ips(w http.ResponseWriter, r *http.Request) {
|
||||
case "score", "last", "first", "events", "ip":
|
||||
store.SortIPs(filtered, q.Get("sort"), q.Get("order") != "asc")
|
||||
}
|
||||
per, _ := strconv.Atoi(q.Get("per"))
|
||||
if per < 1 || per > 200 {
|
||||
per = 50
|
||||
}
|
||||
page, _ := strconv.Atoi(q.Get("page"))
|
||||
if page < 1 {
|
||||
page = 1
|
||||
}
|
||||
if page > 100000 {
|
||||
page = 100000
|
||||
}
|
||||
from := (page - 1) * per
|
||||
if from > len(filtered) {
|
||||
from = len(filtered)
|
||||
}
|
||||
to := from + per
|
||||
if to > len(filtered) {
|
||||
to = len(filtered)
|
||||
}
|
||||
page, per := pageParams(q)
|
||||
from, to := window(len(filtered), page, per)
|
||||
items := filtered[from:to]
|
||||
for i := range items {
|
||||
s.opt.Store.Enrich(&items[i])
|
||||
@@ -581,7 +564,7 @@ func (s *Server) ips(w http.ResponseWriter, r *http.Request) {
|
||||
items[i].RDNS = s.opt.Store.RDNSOf(items[i].IP)
|
||||
}
|
||||
}
|
||||
writeJSON(w, 200, map[string]any{"range": rg.Info(s.opt.Now().Unix()), "total": len(filtered), "page": page, "per": per, "items": items})
|
||||
writeJSON(w, 200, map[string]any{"range": rg.Info(s.opt.Now().Unix()), "total": len(filtered), "page": page, "per": per, "per_page": per, "pages": metaOf(len(filtered), page, per).Pages, "items": items})
|
||||
}
|
||||
|
||||
func (s *Server) ipDetail(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user