refactor(q1): src/api 全量清零 any + types/monitor 扩展输入 DTO

ROADMAP Q1 推进(前端类型安全治理 in_progress):

- src/api/ 整个目录 any 清零(含 monitor/ deploy/ 子目录 12+ 文件)
  create/update 入参 any -> Record<string, unknown> / object
  mock 桩 trace/grafana 对接 types/ 标准类型(Trace/GrafanaDashboard)
  典型接口 LdapFormData/ProbeForm 等强类型表单用 object 接收
- types/monitor.ts 扩展 ~150 行接口:
  ZabbixDatasource / AlertSilence / 7 个输入 DTO
  Trace / TraceSpan / TraceServiceMetrics / GrafanaDashboard / DashboardPanel
  HealthProbeInput

验证:
- 整个 src/api/ 目录 any=0
- ESLint no-explicit-any: 995 -> 937 (本项目此轮贡献 -58)
- tsc -b 零错误, npm run build ✓ (17.06s)
- API 回归 8/8 核心端点通过, Docker 部署 healthy
This commit is contained in:
attacker committed 2026-06-26 03:37:56 +08:00
1 parent 480e677042
commit b553c7956d
436 files changed
+410 -1198

No files matched your search

+1
View File
@@ -0,0 +1 @@
import{j as a,Z as s}from"./index-o4rKtKfJ.js";function l({className:t,...e}){return a.jsx("div",{"code-path":"src/components/ui/table.tsx:7:5","data-slot":"table-container",className:"relative w-full overflow-x-auto",children:a.jsx("table",{"code-path":"src/components/ui/table.tsx:11:7","data-slot":"table",className:s("w-full caption-bottom text-sm",t),...e})})}function r({className:t,...e}){return a.jsx("thead",{"code-path":"src/components/ui/table.tsx:22:5","data-slot":"table-header",className:s("[&_tr]:border-b",t),...e})}function c({className:t,...e}){return a.jsx("tbody",{"code-path":"src/components/ui/table.tsx:32:5","data-slot":"table-body",className:s("[&_tr:last-child]:border-0",t),...e})}function n({className:t,...e}){return a.jsx("tr",{"code-path":"src/components/ui/table.tsx:55:5","data-slot":"table-row",className:s("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...e})}function d({className:t,...e}){return a.jsx("th",{"code-path":"src/components/ui/table.tsx:68:5","data-slot":"table-head",className:s("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}function b({className:t,...e}){return a.jsx("td",{"code-path":"src/components/ui/table.tsx:81:5","data-slot":"table-cell",className:s("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}export{l as T,r as a,n as b,d as c,c as d,b as e};