feat(access-logs): 新增 IP 明细 Tab 并完善日志详情字段

按时间窗聚合 IP 请求数/2xx 比例/入出站流量,支持排序与详情分析;
日志明细详情仅展示请求业务字段,IP 情报迁至独立详情弹窗。
This commit is contained in:
ryan
2026-07-19 00:42:59 +08:00
parent bfd9de69af
commit 920a530aa7
22 changed files with 2042 additions and 742 deletions
+31 -2
View File
@@ -1929,6 +1929,8 @@ definitions:
properties:
has_more:
type: boolean
hours:
type: integer
items:
items:
$ref: '#/definitions/observability.AccessLogIPSummaryView'
@@ -1937,21 +1939,36 @@ definitions:
type: integer
page_size:
type: integer
since:
type: string
sort_by:
type: string
sort_order:
type: string
total_ip:
type: integer
until:
type: string
type: object
observability.AccessLogIPSummaryView:
properties:
bytes_received:
type: integer
bytes_sent:
type: integer
last_seen_at:
type: string
recent_requests:
description: RecentRequests is deprecated and always 0.
type: integer
region:
type: string
remote_addr:
type: string
success_2xx_count:
type: integer
success_ratio:
type: number
total_requests:
type: integer
type: object
@@ -7173,7 +7190,7 @@ paths:
- openflare-observability
/api/v1/d/access-logs/ip-summary:
get:
description: 按 IP 聚合访问日志统计并分页返回,需要管理员权限
description: 按 IP 聚合访问日志统计并分页返回;支持 hours 或 since/until 时间窗,需要管理员权限
parameters:
- description: 节点 ID
in: query
@@ -7187,6 +7204,18 @@ paths:
in: query
name: host
type: string
- description: 统计时间范围(小时,1-720,默认 168)
in: query
name: hours
type: integer
- description: 开始时间 RFC3339(与 until 同时提供时优先于 hours)
in: query
name: since
type: string
- description: 结束时间 RFC3339
in: query
name: until
type: string
- description: 页码
in: query
name: p
@@ -7195,7 +7224,7 @@ paths:
in: query
name: page_size
type: integer
- description: 排序字段
- description: 排序字段 total_requests|request_length|bytes_sent|success_ratio|last_seen_at|remote_addr
in: query
name: sort_by
type: string