Q33: DashboardRecent 巨型组件拆分 (518L→25L barrel, 提取 dashboard-recent/ 7 文件)
DashboardRecent.tsx (518L) → 25L barrel re-export (-95%) 提取 7 个独立文件到 dashboard-recent/ 子目录: - types.ts (48L): DashboardRelease/Cluster/AutomationStats/OpsStats/PipelineStats 接口 - shared-components.tsx (35L): StatusDot + SeverityBadge 共享辅助组件 - AlertMessagesCard.tsx (72L): 告警消息卡片 (使用 shared-components) - CertificateExpiryCard.tsx (99L): 证书到期卡片 - ReleaseHistoryCard.tsx (99L): 发布历史卡片 - OpsOverviewCard.tsx (77L): 运维概览卡片 (6 快捷入口 tiles) - KubernetesClusterCard.tsx (97L): Kubernetes 集群卡片 向后兼容: DashboardRecent.tsx 改为 barrel re-export, Dashboard.tsx 的 import 无需修改。 验证: tsc -b=0, npm build✓ (18.18s), ESLint errors=0/any=0, go build=0, 17/17 集成测试通过
This commit is contained in:
1 parent
6c828c5992
commit
adb5a57bb2
9 files changed
+550
-515
No files matched your search
@@ -504,6 +504,7 @@ services/api.ts (1324L)
|
||||
| Q30 | 前端巨型组件拆分(CloudBilling 534L→295L (-45%),提取 cloud-billing/ 3 个文件 (OverviewTab 110L 概览统计:同步信息+成本告警横幅+趋势图+厂商分布 + RecordsTab 146L 成本记录表格+RecordsFilterToolbar筛选工具栏 + AlertRulesTab 91L 预警规则卡片网格)) | P0 | **done** |
|
||||
| Q31 | 前端巨型组件拆分(PromDsFormDialog 528L→294L (-44%),提取 6 个文件 (CollapsibleSection 42L 通用折叠包装器 DRY 3 个重复折叠模式 + AuthSection 107L 认证折叠 + HeadersSection 64L 自定义Headers + AlertingSection 58L 告警折叠 + MiscSection 47L 杂项折叠 + TestResultBanner 32L 测试结果横幅),3 个折叠区块全部使用共享 CollapsibleSection 消除重复 JSX)) | P0 | **done** |
|
||||
| Q32 | 前端巨型组件拆分(AuditOperationsTab 527L→275L (-48%),提取 audit-operations/ 3 个文件 (types 43L normalizeLog 纯函数+AuditStatistics 接口 + LogDetailDialog 85L 详情弹窗+DetailRow + StatisticsDialog 108L 统计弹窗+StatCard),清除死代码 useConfirm/_confirm/_handleShowStats/statsOpen/statistics/statsLoading,ESLint errors=0/any=0,tsc -b=0,npm build✓,go build=0,17/17 测试通过) | P0 | **done** |
|
||||
| Q33 | 前端巨型组件拆分(DashboardRecent 518L→25L (-95%),提取 dashboard-recent/ 7 个文件 (types 48L + shared-components(StatusDot/SeverityBadge) 35L + AlertMessagesCard 72L + CertificateExpiryCard 99L + ReleaseHistoryCard 99L + OpsOverviewCard 77L + KubernetesClusterCard 97L),主文件改为 barrel re-export 保持向后兼容,tsc -b=0,npm build✓,ESLint=0/0/0,go build=0,17/17 测试通过) | P0 | **done** |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user