mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 07:06:36 +08:00
feat(access-logs): 重构访问日志为概览与明细双 Tab
新增访问日志概览 API 与前端页面:汇总请求量/访问量/带宽趋势与 Top 排行, 明细列表保留检索;排行榜改为紧凑列表样式。
This commit is contained in:
@@ -1937,6 +1937,60 @@ definitions:
|
||||
total_record:
|
||||
type: integer
|
||||
type: object
|
||||
observability.AccessLogOverview:
|
||||
properties:
|
||||
generated_at:
|
||||
type: string
|
||||
hours:
|
||||
type: integer
|
||||
summary:
|
||||
$ref: '#/definitions/observability.AccessLogOverviewSummary'
|
||||
top_hosts:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
top_ips:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
top_paths:
|
||||
items:
|
||||
$ref: '#/definitions/observability.DistributionItem'
|
||||
type: array
|
||||
trends:
|
||||
$ref: '#/definitions/observability.AccessLogOverviewTrends'
|
||||
type: object
|
||||
observability.AccessLogOverviewMetricPoint:
|
||||
properties:
|
||||
bucket_started_at:
|
||||
type: string
|
||||
value:
|
||||
type: integer
|
||||
type: object
|
||||
observability.AccessLogOverviewSummary:
|
||||
properties:
|
||||
bandwidth_served:
|
||||
type: integer
|
||||
total_requests:
|
||||
type: integer
|
||||
total_visits:
|
||||
type: integer
|
||||
type: object
|
||||
observability.AccessLogOverviewTrends:
|
||||
properties:
|
||||
bandwidth:
|
||||
items:
|
||||
$ref: '#/definitions/observability.AccessLogOverviewMetricPoint'
|
||||
type: array
|
||||
requests:
|
||||
items:
|
||||
$ref: '#/definitions/observability.AccessLogOverviewMetricPoint'
|
||||
type: array
|
||||
visits:
|
||||
items:
|
||||
$ref: '#/definitions/observability.AccessLogOverviewMetricPoint'
|
||||
type: array
|
||||
type: object
|
||||
observability.AccessLogView:
|
||||
properties:
|
||||
host:
|
||||
@@ -7160,6 +7214,55 @@ paths:
|
||||
summary: 获取访问日志 IP 趋势
|
||||
tags:
|
||||
- openflare-observability
|
||||
/api/v1/d/access-logs/overview:
|
||||
get:
|
||||
description: 返回访问日志汇总指标、趋势与 Top 排行,需要管理员权限
|
||||
parameters:
|
||||
- description: 节点 ID
|
||||
in: query
|
||||
name: node_id
|
||||
type: string
|
||||
- description: 请求 Host
|
||||
in: query
|
||||
name: host
|
||||
type: string
|
||||
- description: 统计时间范围(小时)
|
||||
in: query
|
||||
name: hours
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 访问日志概览
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/response.Any'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/observability.AccessLogOverview'
|
||||
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: 获取访问日志概览
|
||||
tags:
|
||||
- openflare-observability
|
||||
/api/v1/d/acme-accounts/default:
|
||||
get:
|
||||
description: 返回系统默认 ACME 账号配置,需要管理员权限
|
||||
|
||||
Reference in New Issue
Block a user