mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 07:06:36 +08:00
feat(access-logs): 明细详情支持 IP 分析与 URL Tab 记忆
- 新增单 IP 分析接口,趋势时间范围支持至 30 天 - 明细详情弹窗展示趋势、汇总与 Top 分布,可快捷管理 IP 组 - 访问日志页签改为 URL 参数记忆,筛选后保持当前 Tab
This commit is contained in:
@@ -1872,6 +1872,56 @@ definitions:
|
||||
retention_days:
|
||||
type: integer
|
||||
type: object
|
||||
observability.AccessLogIPAnalysisSummary:
|
||||
properties:
|
||||
bandwidth_served:
|
||||
type: integer
|
||||
bytes_received:
|
||||
type: integer
|
||||
error_count:
|
||||
type: integer
|
||||
total_requests:
|
||||
type: integer
|
||||
unique_hosts:
|
||||
type: integer
|
||||
unique_paths:
|
||||
type: integer
|
||||
type: object
|
||||
observability.AccessLogIPAnalysisView:
|
||||
properties:
|
||||
device_types:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
generated_at:
|
||||
type: string
|
||||
hours:
|
||||
type: integer
|
||||
remote_addr:
|
||||
type: string
|
||||
status_codes:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
summary:
|
||||
$ref: '#/definitions/observability.AccessLogIPAnalysisSummary'
|
||||
top_browsers:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
top_hosts:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
top_paths:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
top_user_agents:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
type: object
|
||||
observability.AccessLogIPSummaryList:
|
||||
properties:
|
||||
has_more:
|
||||
@@ -7181,6 +7231,59 @@ paths:
|
||||
summary: 列出访问日志 IP 汇总
|
||||
tags:
|
||||
- openflare-observability
|
||||
/api/v1/d/access-logs/ip-summary/analysis:
|
||||
get:
|
||||
description: 返回指定 IP 的汇总指标与 Top 分布,需要管理员权限
|
||||
parameters:
|
||||
- description: 节点 ID
|
||||
in: query
|
||||
name: node_id
|
||||
type: string
|
||||
- description: 客户端 IP
|
||||
in: query
|
||||
name: remote_addr
|
||||
type: string
|
||||
- description: 请求 Host
|
||||
in: query
|
||||
name: host
|
||||
type: string
|
||||
- description: 统计时间范围(小时)
|
||||
in: query
|
||||
name: hours
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: IP 访问分析
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/response.Any'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/observability.AccessLogIPAnalysisView'
|
||||
type: object
|
||||
"400":
|
||||
description: 参数错误
|
||||
schema:
|
||||
$ref: '#/definitions/response.Any'
|
||||
"401":
|
||||
description: 未登录
|
||||
schema:
|
||||
$ref: '#/definitions/response.Any'
|
||||
"404":
|
||||
description: 无权限或不存在
|
||||
schema:
|
||||
$ref: '#/definitions/response.Any'
|
||||
"500":
|
||||
description: 内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/response.Any'
|
||||
security:
|
||||
- SessionCookie: []
|
||||
summary: 获取访问日志 IP 分析
|
||||
tags:
|
||||
- openflare-observability
|
||||
/api/v1/d/access-logs/ip-summary/trend:
|
||||
get:
|
||||
description: 返回指定 IP 在时间范围内的访问趋势数据,需要管理员权限
|
||||
|
||||
Reference in New Issue
Block a user