feat: Console 查看页与自有查询端点(里程碑 4)

- 服务端 AuditQueryEndpoint(CustomEndpoint,group=audit.example.com):
  GET /apis/audit.example.com/v1alpha1/auditlogs/-/query
  - 等值筛选(fieldSelector 白名单)、关键字(resourceName/path contains OR)、
    结果(success 2xx-3xx / failure 4xx+)、时间区间(含边界 ISO-8601)
  - 全部走索引 Query + PageRequestImpl,无内存分页;页大小上限 100
- 风险项 #2 源码级证实并按预案落地:原生 fieldSelector 仅支持 =/!=/IN
- API 使用 2.22+ 新 Queries/Condition 体系(QueryFactory 已 @Deprecated)
- Console 页面:列表(VEntity 行:操作者/动作徽标/资源/路径/状态码/IP)+
  七维筛选栏 + 分页(10/20/50)+ 只读详情抽屉(完整字段 + 原始 JSON)
- 端点测试 10 例(默认值/筛选组合/参数校验/排序收敛),UI 类型检查通过
This commit is contained in:
2026-11-21 16:34:41 +08:00
parent 95b744f6f6
commit 5fa1660c5f
6 changed files with 1117 additions and 2 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { definePlugin } from '@halo-dev/console-shared'
import { markRaw } from 'vue'
import { IconEye } from '@halo-dev/components'
import HomeView from '@/views/HomeView.vue'
import AuditLogList from '@/views/AuditLogList.vue'
export default definePlugin({
components: {},
@@ -9,7 +9,7 @@ export default definePlugin({
{
path: '/operation-audit',
name: 'OperationAudit',
component: HomeView,
component: AuditLogList,
meta: {
title: '操作审计',
searchable: true,