- 新增 storage/policy.py 落盘策略:按大小/类型决定文件存 MinIO 或内联数据库 - 数据处理源文件与生成结果写入 MinIO 并登记 storage_objects,支持失败回滚 - 算力节点训练产物按版本归档到 MinIO,登记 model_artifacts - 数据转换任务输入输出对象化,支持从 MinIO 读写 - 新增审批中心(申请/我的/策略)、组织与权限、运行日志整合页面 - schema 与 docker 配置、前端路由侧边栏、治理文档同步更新 Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { get } from '../request'
|
||
import request from '../request'
|
||
|
||
export interface AuditLog {
|
||
id: string
|
||
tenant_id?: string
|
||
project_id?: string
|
||
actor_id?: string
|
||
action?: string
|
||
target_type?: string
|
||
target_id?: string
|
||
detail?: string
|
||
client_ip?: string
|
||
time?: string
|
||
}
|
||
|
||
export interface AuditQuery {
|
||
tenant_id?: string
|
||
project_id?: string
|
||
actor_id?: string
|
||
action?: string
|
||
target_type?: string
|
||
target_id?: string
|
||
keyword?: string
|
||
start_time?: string
|
||
end_time?: string
|
||
limit?: number
|
||
offset?: number
|
||
}
|
||
|
||
/** 审计日志查询:使用 get 辅助函数,拦截器已解包,直接返回 { items, total } */
|
||
export const getAuditLogs = (query: AuditQuery = {}) =>
|
||
get<{ items: AuditLog[]; total: number }>('/system/audit-logs', query)
|
||
|
||
/** 审计日志导出 CSV:blob 响应走完整 axios response,需手动取 data */
|
||
export const exportAuditLogs = (query: AuditQuery = {}) =>
|
||
request<Blob>({
|
||
url: '/system/audit-logs/export',
|
||
method: 'get',
|
||
params: query,
|
||
responseType: 'blob',
|
||
}).then((res) => res.data)
|