attacker
|
d6ed1978ef
|
docs: ROADMAP U48 i18n locale 懒加载优化记录
|
2026-07-17 01:50:03 +08:00 |
|
attacker
|
ca036a85ca
|
feat(k8s): F7 集群详情EventsTab真实后端对接 + go vet修复
1. EventsTab.tsx: DEMO_EVENTS硬编码→kubernetesApi.getEvents真实K8s事件
- 复用 normalizeK8sEvent/formatEventRelative 工具(与 EventsPage 一致)
- 新增 loading/empty 状态 + 刷新按钮
- Warning事件优先排序 + 限100条防溢出
- KubernetesClusterDetail 传入 clusterCode prop
- 修复 Q28 组件拆分时遗留的 demo 数据未对接缺口
2. aiops_alert_analysis.go: log.Printf %s→%d 修复 go vet 失败
- AlertID 类型为 uint, %s 格式符不匹配致 go test 构建失败
- go vet ./... 全量零错误
验证: tsc -b=0, npm build✓ (18.00s), go build=0, go vet=0, 17/17测试通过
Events API 返回5条真实事件 (type=Normal, reason=Pulled, count=5487)
|
2026-07-16 21:23:19 +08:00 |
|
attacker
|
96ed39d122
|
feat(i18n): U47 最后3处残余硬编码中文清零 — 全前端非注释CJK=0 (cloud-server-import阿里云/腾讯云/华为云→i18n.t + TerminalSessionsTab批量删除→t + PreviewTable类型→t), 复用已有翻译键零新增, zh/en 8102=8102对齐, tsc -b=0, npm build✓ (18.02s), ESLint=0/43/any=0, go build=0, 17/17测试通过
|
2026-07-16 04:42:09 +08:00 |
|
attacker
|
21728be445
|
feat(i18n): U46 残余UI硬编码中文清零 — 6文件12处→0 (UserFormDialog/CredentialManager/RdpAuditViewer/LiveMonitorDialog/ServerFileBrowser/context-loaders) +17翻译键 zh/en 8085→8102对齐
|
2026-07-16 02:29:47 +08:00 |
|
attacker
|
6288fa0071
|
feat(i18n): U45 AI告警分析模块i18n补全 — analyzerHelpers 25处硬编码中文→i18n.t()插值 + 预测图标双语兼容
|
2026-07-15 07:47:45 +08:00 |
|
attacker
|
05ee051879
|
refactor(i18n): U44 残余硬编码中文清零 — 终端审计状态+凭证类型+流水线阶段+时间格式+CSV导出
20 文件 ~70 处 UI 硬编码中文清零:
- credential-manager/constants.ts: 8 凭证类型 label/desc → labelKey/descKey + i18n.t()
- pipeline-run-detail/types.ts: 6 阶段 label → i18n.t('deploy.stage.*') + labelKey
- pipeline-manager/constants.ts + pipeline-editor/types.ts: 分秒 duration → i18n.t('common.duration.minSec')
- LiveMonitorDialog: 6 终端状态消息 → t()
- RdpAuditViewer: 6 RDP审计状态 → i18n.t('monitor.rdp.*')
- WorkspaceTermDialog: 2 终端连接状态 → t()
- TerminalSessionsTab: 4 时长格式+状态标签 → i18n.t()/t()
- k8s-event-utils + QueryHistoryPanel: 6 相对时间 → i18n.t('common.duration.*Ago')
- export-audit.ts: 9 CSV导出表头 → i18n.t('system.auditExport.*')
- useAuditSettings: 4 审计保留策略消息 → i18n.t('system.auditSettings.*')
- event-handler.ts: 4 AgentCLI事件消息 → i18n.t('aiops.cli.*')
- 其他 9 文件: NotifyPolicyTab/RoleFormDialog/CronJobViewDialog/TerminalOutput/shared-components/prometheus-ds/helpers/CloudServerImport/AdvancedSettingsPanel/releaseManagerHelpers
新增 75 翻译键, zh/en 7987→8059 对齐
tsc -b=0, npm build✓ (17.13s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
|
2026-07-14 23:13:32 +08:00 |
|
attacker
|
39a4432f79
|
refactor(i18n): U43 深度残余硬编码中文 UI 文本清零 — 17 文件 ~40 处→0
趋势标签(上升/下降/平稳) + K8s 卡片标题(Pod级别/安全上下文/实例/详情) + data-table 默认值(搜索/暂无数据) + Deployment 编辑器标签(数据卷/挂载/只读写/manifest提示/镜像拉取凭证) + HostSettings 4 个命名空间描述 + 7 个 K8s 页面刷新按钮 + 资源编辑器新建/编辑 + Agent 执行命令描述 + 账单保存成功 toast + 容量预警标题
新增 common 30 语义化翻译键, zh/en 7898→7928 对齐
tsc -b=0, npm build✓ (16.55s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
|
2026-07-14 05:27:49 +08:00 |
|
attacker
|
c6e0d6ca57
|
refactor(i18n): U42 残余硬编码中文彻底清零 — 33文件54处→0, zh/en 7847→7898对齐
全量 JSX children + toast/confirm + sr-only 描述硬编码中文清零:
- Kubernetes模块: UpdateStrategyCard maxSurge/maxUnavailable说明 + IngressCreateForm host域名/Service端口 + ServiceCreateForm 端口配置/selector + DeploymentEditService 无selector/个关联/暂无Service/Ingress + ClusterOverviewPage 核 + KubernetesClusterDialog 已配置 + KubectlTerminal/ResourceVisualEditor/CreateHPADialog/DeploymentEditContainers/Storage + PodInstancesTable/UpdateStrategySelectorCards
- AI模块: PredictiveCapacityTab AI深度解读/紧急/警告/7天预测/预计N天 + PredictiveCostTab AI深度解读 + event-handler.ts 高危操作确认toast
- Deploy模块: DeployCredentials 启用/禁用 + DeployRBAC 删除角色confirm + WorkspaceTermDialog + CredFormDialog Windows用户
- Monitor模块: AlertRulesTab 删除confirm/分钟 + PrometheusDatasourceManager/LogDatasourcePage 删除confirm + QueryHistoryPanel 条
- System模块: ServerFileBrowser/TerminalDialog/RdpAuditViewer sr-only + SystemManager/CredentialManager/TerminalSessionsTab 删除confirm + SecuritySettingsTab 30分钟/2小时
- Task模块: CronJobViewDialog 次
新增 61 翻译键 (k8s.editAdvanced 6 + k8s.editService 11 + k8s.cluster 2 + k8s.misc 9 + aiops.capacity 9 + aiops.cost 1 + aiops.cli 2 + deploy 4 + monitor 5 + system 10 + task 1 + common 2)
tsc -b=0, npm build✓ (17.71s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
|
2026-07-14 00:51:36 +08:00 |
|
attacker
|
a7838aaf65
|
refactor(i18n): U41 残余硬编码中文清零 — 工具函数+审计RDP标签+AIOps分析+Monitor残余+审批选项
18 文件 ~35 处 UI 硬编码中文→t()/i18n.t() 调用:
- agent-utils.ts timeAgo() 秒前/分钟前/小时前
- utils.ts formatDistanceToNow() 分钟前/小时前/天前
- request.ts 响应解析失败错误消息
- ActiveSessionsPanel/HistorySessionsPanel RDP 在线/历史会话标签
- MetricsExplorer 清除/已选/最近1小时
- HostMonitor 当前主机 subtitle
- AIAnalysisResult 证据链 (新增 useTranslation hook)
- capacity-predict.ts 容量预测摘要模板
- ApprovalResourcePage 阿里云/腾讯云/华为云
- ApprovalPermissionPage 堡垒机
- site-monitor/helpers.ts 频率/时间/证书天数格式化
- site-monitor/analytics.ts 证书剩余/检查失败/延迟波动事件
- middleware-monitor MwTargetChartsPanel/MwTrendChart/helpers.ts
- snmp-monitor SnmpMetricTrendChart/SnmpDeviceChartsPanel
- host-monitor/utils.ts 图表点数标签 + PortPolicyDialog 系统进程说明
新增 34 翻译键 (common.duration.secAgo/hourAgo/dayAgo + common.selected/
responseParseError/rdpActiveSessions/rdpHistorySessions/rdpSessionCount/
evidenceChain/last1Hour/currentHost + monitor.lbl 10键 + monitor.siteMonitor
8键 + approval.provider 3键 + approval.permType 1键 +
monitor.portPolicyDialog.systemProcessDesc + aiops.capacity.summary)
zh/en 7813→7847 对齐; tsc -b=0, npm build✓ (17.31s), ESLint=0/43/any=0,
go build=0, 17/17 测试通过
|
2026-07-13 22:21:47 +08:00 |
|
attacker
|
4e2ba77aa8
|
refactor(i18n): U40 Monitor + Agent 子组件残余硬编码中文 i18n 补全 — 14 文件 ~50 处→0
- ContextSwitchCard: CTX/IRQ/次 → t()
- ProcessTable: agentWaitData/cpuUsagePercent → t()
- FDUsageCard: fdHandles → t()
- PortMonitorTab: 黑名单/白名单/策略配置/暂无端口数据 → t()
- PortPolicyDialog: 白名单全量上报/黑名单仅上报/端口列表/逗号分隔/白名单无需配置/已输入端口 → t()
- HostTimeRangePicker: 时间范围/自定义/取消/应用 → t()
- DualLineChart: 接收/发送 → t(), i18n.t→useTranslation hook
- ZoomableAreaChart: 暂无数据 → t()
- SiteResultsPanel: 选择任务/次/可用率/立即拨测/SSL证书预警/到期/剩余/阈值/天 → t()
- MiddlewareMonitor: Redis单机集群/上次更新/添加平台默认/暂无实例 → t()
- SiteMonitor: subtitle → t()
- SNMPMonitor: 标题/采集间隔/IP地址/OID模板/SNMP版本/确认/暂无设备/采集指标/暂无指标 → t()
- HealthProbeSection: TCP目标地址/TCP端口 → t()
- AgentAlerts: Agent告警/刷新/未恢复/已恢复/恢复/新建规则/创建第一条规则 → i18n.t()
新增 monitor.lbl 46 语义化翻译键 + agent.alerts 6 键
zh/en 7762→7814 对齐
tsc -b=0, npm build✓ (16.88s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
|
2026-07-13 19:45:45 +08:00 |
|
attacker
|
70a7c2907c
|
docs: ROADMAP — U39 残余 JSX 属性/模板字面量中文清零
|
2026-07-13 13:13:26 +08:00 |
|
attacker
|
a1d82574a7
|
refactor(i18n): U38 phantom CTK 清理 — 13 文件 16 处模板字面量/JSX 属性残余中文→i18n.t() 调用
13 文件 16 处 UI-facing phantom CTK (i18n.t() 模板字面量中的中文片段) 全部替换为语义化 i18n.t() 调用:
- LogsHeader: '行'suffix→common.lineSuffix
- analyzerHelpers: '当前值'→common.currentValue
- DeploymentEditStorage: 2 toast description→k8s.editStorage.*Desc (插值)
- WorkloadViewPage: 2 toast description→k8s.workloadView.restartSentDesc + k8s.workloads.scaleSuccessDesc (插值)
- ServerFileBrowser: confirm→common.confirmDeleteType (插值)
- LogDatasourcePage: toast '可达'→aiops.reachable
- LogAlertsPanel: confirm→monitor.deleteRuleConfirmDesc (插值)
- DeployTargetFields: JSX '(多容器时填写)'→common.fillIfMultiContainer
- UserGroupsManager: 3 处 confirm/desc→deploy.rbac.deleteGroupDesc + pipeline.removeMemberDesc + common.memberCount (插值)
- BuildNodesManager: JSX '(可选)'→common.optional (已有键复用)
- useLdapManagement: confirm→system.ldapMgmt.deleteEntryDesc (插值)
新增 14 语义化翻译键 (5 common + 2 k8s.editStorage + 1 k8s.workloadView + 1 k8s.workloads + 1 aiops + 1 monitor + 1 deploy.rbac + 1 pipeline + 1 system.ldapMgmt), zh/en 7737→7751 +14 对齐
tsc -b=0, npm build✓ (16.86s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
|
2026-07-13 08:55:28 +08:00 |
|
attacker
|
7c80e35411
|
refactor(i18n): U37 全量 JSX 文本节点硬编码中文清零 — 65 文件 151 处→0, 新增 common.* 98 翻译键, zh/en 对齐, tsc -b=0, npm build✓ (17.96s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
|
2026-07-13 06:39:08 +08:00 |
|
attacker
|
e274ba7b9b
|
docs: ROADMAP — U36 全量 JSX 属性 + toast 硬编码中文清零
|
2026-07-13 04:20:33 +08:00 |
|
attacker
|
8d64936caf
|
refactor(i18n): U35 Deploy + Task 模块残余 JSX 硬编码中文清理 — PipelineRunPanel 12处 + CronJobTable 12处 + ExecutionHistoryDialog 10处 + ScrollButtons 2处, 新增 54 翻译键(deploy.runStatus/task.cronJobCol/task.execHistory/deploy.credCol/common.*), zh/en 7565→7616 对齐, tsc -b=0, npm build✓ (17.02s), ESLint=0/43/0, go build=0, 17/17 测试通过
|
2026-07-12 23:47:22 +08:00 |
|
attacker
|
0dbb85f5b8
|
refactor(i18n): U34 System & User 模块 i18n 清理 — ProfilePage + ResetPasswordDialog + SystemRolesTab + LdapManagementSection 4 文件 UI 硬编码中文清零
- ProfilePage.tsx: 从零接入 useTranslation,基本信息/安全设置/密码修改/用户名邮箱手机/账号来源 15 处中文→t()
- ResetPasswordDialog.tsx: 从零接入 useTranslation,重置密码标题/描述/LDAP提示/新密码确认密码/确认重置 11 处中文→t()
- SystemRolesTab.tsx: 权限分组标签(云资源/自动化/审批/审计)+toast 校验+confirm description+角色计数+空状态+权限列表计数+编码标签+尾部文案 12 处中文→t()/i18n.t()
- LdapManagementSection.tsx: 验证按钮+根OU标签+创建按钮×2+导入按钮+编辑用户描述 8 处中文→t()
- 新增 user.profile.* 14键 + user.resetPwd.* 11键 + system.* 16键 共 41 翻译键
- zh/en 7524→7565 +41 对齐
- tsc -b=0, npm build✓ (16.05s), ESLint errors=0/any=0/unused=0, go build=0
- 17/17 集成回归测试通过
|
2026-07-12 21:29:58 +08:00 |
|
attacker
|
ad9acea1e5
|
refactor(i18n): U33 K8s 资源编辑器 + Pod 日志/Metrics 模板字面量中文清零
resource-visual-editors/ 5 文件 (ConfigMap/Secret/Service/Ingress/PvcEditor):
- 保存按钮文案 (保存配置/密钥/Service/Ingress/PVC)
- IngressEditor: (可选)/手工输入/帮助文本/常见示例/手动输入/继续手动输入
- PvcEditor: 访问模式描述 (单节点读写/多节点只读/多节点读写)
pod-logs-viewer/ 3 文件:
- ControlBar: 导出/刷新/实时/停止按钮
- LogContentArea: 加载中… 占位
- LogsHeader: 日志标题模板
PodLogsViewer: 6 处错误消息 + DialogTitle/Description
PodMetricsPage: subtitle 模板字面量 + 所有命名空间
PodExecTerminal: 连接错误消息
17 处 toast description 模板字面量中文→i18n.t() 插值:
- DeploymentEditAdvanced/Containers/Storage: 更新已提交
- DeploymentView: 回滚/伸缩
- DeploymentDetail: 伸缩/镜像更新
- DeploymentEditService: 资源删除
- ResourceVisualEditor/NamespaceResourcePage: 资源更新/YAML下载
- ClusterOverviewPage: 集群未找到
- DeploymentEditContainers: 容器名称/镜像为空
5 处 confirm description 中文→i18n.t() 插值:
- DeploymentView/EditService/Detail/WorkloadViewPage/MiddlewareMonitor/SiteMonitor/HealthProbeSection
5 处 subtitle 模板字面量中文→i18n.t():
- PodMetricsPage/CapacityPage/EventsPage/KubernetesNodes/ClusterOverviewPage
新增 k8s.rve 14键 + k8s.toast 18键 + k8s.podMetrics 4键 + k8s.podLogs 13键 = 49 翻译键
zh/en 7481→7524 完全对齐
tsc -b=0, npm build✓ (17.76s), ESLint errors=0/warnings=43/any=0, go build=0, 17/17 测试通过
|
2026-07-12 16:51:57 +08:00 |
|
attacker
|
5fbb5f824d
|
docs: ROADMAP — U32 全量 hash key 清理 + React Hooks 修复完成
|
2026-07-12 14:35:33 +08:00 |
|
attacker
|
4f2d279865
|
refactor(i18n): U31 AIOps Agent CLI 组件 i18n 修复 — Q7/Q35 拆分后丢失的 i18n 集成全部修复
6 个文件迁移 (AgentCLI + AgentCLIToolbar + AgentCLIHistory + AgentCLIEmptyState + ChatInputArea + agent-cli-constants.ts):
- 新增 aiops.cli.* 命名空间 100 翻译键 (10 子分类)
- SAFETY_MODES/TIPS_HOST/TIPS_KUBERNETES 常量改为 getSafetyModes(t)/getTipsHost(t)/getTipsKubernetes(t) 工厂函数
- 全部 UI 硬编码中文清零 (66→0)
- zh/en 7381→7481 +100 键对齐
- tsc -b=0, npm build✓ (18.21s), ESLint=0/53/0, go build=0, 17/17 测试通过
|
2026-07-12 12:17:47 +08:00 |
|
attacker
|
6dfddb426c
|
docs: 更新 ROADMAP — U30 i18n 损坏调用修复完成
|
2026-07-12 09:49:46 +08:00 |
|
attacker
|
b812b3b20c
|
refactor(i18n): U27 多模块 phantom key 批量清理 — Cloud/Deploy/Agent/Monitor/System 5 模块 25 文件, 180 个 phantom key → 51 残留, 129 个替换为语义化键, 新增 12 子命名空间, zh/en 7185→7294 +109 键对齐, tsc -b=0, npm build✓ (16.31s), ESLint=0/0/0, go build=0, 17/17 测试通过
|
2026-07-12 03:00:20 +08:00 |
|
attacker
|
7f5295cfc2
|
refactor(i18n): U26 Kubernetes 模块 phantom key 大规模清理 — 32 文件 171 phantom key → 8 残留(均为误匹配), 163 个替换为 k8s.* 语义化键, 新增 19 子命名空间 + 扩展 8 个已有, zh/en 6990→7185 +195 键对齐, tsc -b=0, npm build✓ (17.59s), ESLint=0/53/0, go build=0, 17/17 测试通过
|
2026-07-12 00:43:20 +08:00 |
|
attacker
|
d21eac9117
|
refactor(i18n): U24 Monitor 模块 i18n hook 迁移 — 26 个 .tsx 文件从全局 i18n.t() 迁移到 useTranslation() hook + 89 个 phantom 中文文本键替换为 monitor.lbl.* 语义化键
- 新增 monitor.lbl 翻译子命名空间 89 键(HostMonitor/Middleware/Site/SNMP/Shared)
- 26 .tsx: import i18n → useTranslation() hook + i18n.t('中文') → t('monitor.lbl.semanticKey')
- 模块级代码(TABS/METRIC_CATEGORIES)保留 i18n.t() + 语义化键
- 1 .ts helpers 文件 phantom 键替换
- zh/en 6886→6975 +89 键对齐
- tsc -b=0, npm build✓ (17.16s), ESLint=0/53/0, go build=0, Docker healthy
|
2026-07-11 20:15:44 +08:00 |
|
attacker
|
de6f9454fc
|
refactor(i18n): U23 Task 模块 i18n 治理 — 4 文件 phantom key + hash key + 硬编码中文清零
- CronJobManager/CronJobFormDialog/ScriptManager/RemoteExecPage
从 import i18n 全局调用改为 useTranslation() hook
- 42 处 phantom key (i18n.t('Chinese text') → 语义化键)
- 28 个孤儿 hash key 清理 (cronjobformdial.s*/remoteexecpaget.s*)
- 50+ 处硬编码 JSX 中文 → t() 调用
- 新增 task.cronJob.*/task.scriptList.*/task.remoteExec.* 子命名空间
- zh/en 6825→6886 keys 对齐
- tsc -b=0, npm build✓ (17.46s), ESLint=0/45/0, go build=0
- 17/17 集成回归测试通过
|
2026-07-11 17:48:04 +08:00 |
|
attacker
|
f953ba3248
|
fix(U20): ESLint static-components 清零 + CredDetailDialog 内联组件修复 + i18n 损坏修复
- CredDetailDialog.tsx: Field 内联组件提取为模块级 CredField (react-hooks/static-components 23→0)
- 修复 8 处被批量正则损坏的 i18n.t() 调用 (i18n.t('>名称:</span>') → 语义化键)
- 6 处硬编码中文清零 (凭据详情/密钥数据/无/创建时间/更新时间/安全提示)
- 新增 deploy.cred.sensitiveWarn i18n 键 (zh/en 对齐)
- ESLint warnings 66→43 (-35%), errors=0, any=0, unused=0
- tsc -b=0, npm build✓ (17.29s), go build=0, 17/17 测试通过
|
2026-07-11 10:22:34 +08:00 |
|
attacker
|
bb2b50276a
|
refactor(i18n): U19 i18n hash 键治理 — 删除 866 死键 + 重命名 21 高频键
死键清理: 从 zh-CN.json 和 en-US.json 移除 866 个重构遗弃的 unreferenced
hash keys (filename.hash 格式)。这些键在组件迁移到语义化键后成为孤儿。
Live 键重命名 (21 个):
ui.datatable.s1a2b3c4d → selectedCount
ui.datatable.s2b3c4d5e → columns
ui.datatable.s3c4d5e6f → totalCount
aiops.predictive.s{1-3} → metricsTab/capacityTab/costTab
aiops.predictivecost.s{1-3} → aiFailed/overview/aiInsight
task.systemtaskspanel.s{1-3} → monitor/cleanup/finops
aiops.agentcli.s{1-3} → archLayer/archDesc/securityLayer
system.useldapmanageme.s{1-2} → ouExists/createOuFailed
common.requestts.sd3ab821c → common.request.tokenExpired
k8s.editAdvanced.s0c1fec65 → secondsPlaceholder
k8s.{kubectl,podExec}.sc8107726 → connectErrorAnsi
影响: zh/en 7597→6731 keys 对齐, 文件 328KB→276KB (-16%)
仍有 172 个 live hash keys 待后续重命名
tsc -b=0, npm build✓ (17.45s), ESLint=0/66/0, go build=0, 17/17 测试通过
|
2026-07-11 08:08:07 +08:00 |
|
attacker
|
be1011eb58
|
refactor(i18n): U17 K8s 残余组件 i18n 补全 — NodeDetailPage 16 处硬编码中文清零 + 8 个 hash 键替换为语义化 k8s.nodeDetail.* + DeploymentWorkload 12 处 toast/confirm 硬编码中文清零. 新增 k8s.nodeDetail 命名空间 21 键 + k8s.deploymentDetail 扩展 12 键(含插值). zh/en 7564→7597 对齐. 组件从 i18n.t() 全局改为 useTranslation() hook. tsc -b=0, npm build✓, ESLint=0, 17/17 测试通过
|
2026-07-11 03:33:31 +08:00 |
|
attacker
|
f178609d09
|
refactor(quality): Q38 UnifiedQueryPanel 529L→353L (-33%) — 提取 useLogQueryEngine + useLogExport 自定义 Hooks,全项目最后一个 ≥500L 业务组件清零
- useLogQueryEngine.ts (295L): 查询执行引擎 Hook — 封装 loading/entries/statTable/clusters/histogramData/totalCount/queryTime/hasMore/liveTail/hasQueried 状态 + handleRun/handleLoadMore/fetchHistogram/runLiveTailTick + Live Tail useEffect(3s)
- useLogExport.ts (62L): 导出/复制 Hook — formatEntryLine + handleExportLogs(Blob) + handleCopyLogs(clipboard)
- 主文件保留: 数据源加载/URL bootstrap+sync/Loki 标签名/ES mapping effects + 派生数据 + 非查询回调 + JSX 子组件编排
- 首次使用 custom Hook 提取模式进行组件拆分
- tsc -b=0, npm build✓ (16.69s), ESLint=0/66/0, go build=0, 17/17 测试通过
|
2026-07-10 23:01:40 +08:00 |
|
attacker
|
34050f5188
|
refactor(quality): Q37 k8s-yaml-utils.ts 工具文件拆分 — 504L→451L + k8s-helpers.ts 67L 新文件
提取 7 个通用工具函数到 k8s-helpers.ts (parseScalar/STATUS_COLORS/statusColor/aggregateByImage/formatK8sTime/elapsedSeconds/formatDuration),barrel re-export 保持 8 个消费者零修改,tsc -b=0,npm build✓ (17.49s),ESLint=0/66/0,go build=0,17/17 测试通过
|
2026-07-10 20:39:25 +08:00 |
|
attacker
|
4113079e24
|
docs: ROADMAP.md 添加 U15 模块记录
|
2026-07-10 18:29:45 +08:00 |
|
attacker
|
a2edf6aa9f
|
refactor(quality): Q36 predictUtils.ts 巨型工具文件拆分 — 716L→49L barrel re-export (-93%)
提取 3 个域文件:
- predict-types.ts 140L: 类型定义 + 共享常量 (METRIC_DEFS/TIME_RANGE_*)
- capacity-predict.ts 194L: 容量预测 (linearRegression + extractSeries + computePredictions + capacityRecommendation + trendColorClass + buildCapacityInsightPrompt)
- cost-predict.ts 434L: 云成本预测 (monthStartDate + daysRemainingInMonth + aggregateDailyCosts + sumMonthCost + costRecommendation + computeCostPredictions + buildCostInsightPrompt + 私有函数 forecastMonthEnd/detectBillingPattern/recentRunRate/topServicesByCost/budgetRiskAction)
predictUtils.ts 改为 barrel re-export 保持向后兼容, 3 个消费者 (AIPredictiveAnalytics/PredictiveCostTab/PredictiveCapacityTab) import 路径无需修改。
零逻辑变更, tsc -b=0, npm build✓ (17.26s), ESLint errors=0/warnings=66/any=0, go build=0, 17/17 集成测试通过
|
2026-07-10 12:06:58 +08:00 |
|
attacker
|
4283fb93c1
|
refactor: Q35 AgentCLI 巨型组件拆分 — 521L→399L (-23%)
提取 agent-cli/ 子目录 2 个文件:
- event-handler.ts (149L): createWsEventHandler 工厂函数封装 8 种 WS 事件分发
(session/progress/thought_delta/thought/tool_call/tool_result/confirm/done/error/aborted)
+ 高危命令确认逻辑 (handleConfirm)
- ChatInputArea.tsx (44L): 受控输入区组件 (textarea + 发送/停止按钮)
附: 导出 ConfirmOptions 接口供跨模块引用
验证: tsc -b=0, npm build✓ (17.67s), ESLint=0/66/0, go build=0, 17/17 测试通过
|
2026-07-10 07:53:25 +08:00 |
|
attacker
|
c7d050f1bc
|
Q34: AIOpsAssistant 巨型组件拆分 (505L→288L, 提取 aiops-assistant/ 5 文件)
AIOpsAssistant.tsx (505L) → 288L (-43%)
提取 5 个独立文件到 aiops-assistant/ 子目录:
- types.ts (39L): Message/QuickAction 接口 + defaultConfig + fmtTime
- context-loaders.ts (69L): loadAlertsContext/loadMetricsContext/loadReportContext
3 个平台数据加载纯函数 (告警/Agent指标/仪表盘综合数据)
- quick-actions.tsx (17L): quickActions 数组 (4 快捷操作)
- ChatMessage.tsx (47L): 消息气泡 (streaming/thinking/error 三态 + 光标)
- AssistantSidebar.tsx (76L): 快捷操作卡片 + 能力清单卡片
验证: tsc -b=0, npm build✓ (17.68s), ESLint errors=0/any=0,
go build=0, 17/17 集成测试通过
|
2026-07-10 01:23:34 +08:00 |
|
attacker
|
adb5a57bb2
|
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 集成测试通过
|
2026-07-10 01:18:10 +08:00 |
|
attacker
|
6c828c5992
|
refactor(quality): 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✓ (17.34s), go build=0, 17/17 测试通过
|
2026-07-09 23:05:57 +08:00 |
|
attacker
|
195b6945b4
|
refactor(quality): Q31 前端巨型组件拆分 — PromDsFormDialog 528L→294L (-44%), 提取 prometheus-ds/ 6 个文件 (CollapsibleSection 42L 通用折叠包装器 DRY 3 个重复折叠模式 + AuthSection 107L 认证折叠 + HeadersSection 64L 自定义Headers + AlertingSection 58L 告警折叠 + MiscSection 47L 杂项折叠 + TestResultBanner 32L 测试结果横幅), Auth/Alerting/Misc 三个折叠区块统一使用 CollapsibleSection 消除 ~30 行重复折叠 JSX, updateForm 泛型化 <K extends keyof> 类型安全提升, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓ (17.65s), go build=0, 17/17 测试通过
|
2026-07-09 20:51:11 +08:00 |
|
attacker
|
45f7342d1e
|
refactor(quality): Q30 前端巨型组件拆分 — CloudBilling 534L→295L (-45%), 提取 cloud-billing/ 3 个文件 (OverviewTab 110L 概览统计:同步信息+成本告警横幅+趋势图+厂商分布 + RecordsTab 146L 成本记录表格+RecordsFilterToolbar筛选工具栏 + AlertRulesTab 91L 预警规则卡片网格), 筛选工具栏提取为独立受控组件, 3个Tab全部受控展示组件零独立状态, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓ (17.81s), go build=0, 17/17 测试通过
|
2026-07-09 18:36:13 +08:00 |
|
attacker
|
803bffd0e3
|
refactor(quality): Q29 前端巨型组件拆分 — AlertCenter 542L→312L (-42%), 提取 4 个受控组件 (AlertsToolbar 89L 筛选工具栏 + AlertsTab 149L 告警列表表格+分页 + ContactsTab 87L 联系人卡片网格 + ContactGroupsTab 88L 联系组卡片网格), 客户端搜索过滤逻辑移入 AlertsTab, 删除确认逻辑下沉到子组件, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓ (18.71s), go build=0, 17/17 测试通过
|
2026-07-09 12:23:59 +08:00 |
|
attacker
|
4c44fdde8b
|
refactor(quality): Q28 前端巨型组件拆分 — KubernetesClusterDetail 547L→130L (-76%), 提取 cluster-detail/ 8 个文件 (types(computeClusterMetrics/buildTrendData 纯函数) + OverviewTab + NodesTab + PodsTab + DeploymentsTab + ServicesTab + IngressesTab + EventsTab), useMemo 聚合计算逻辑提取为模块级纯函数, demo 事件数据提取为模块级常量, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓ (18.18s), go build=0, 17/17 测试通过
|
2026-07-09 08:07:35 +08:00 |
|
attacker
|
470832342e
|
refactor(quality): Q27 前端巨型组件拆分 — HostMonitor 547L→224L (-59%), 提取 host-monitor/tabs/ 8 个文件 (BasicTab + DiskTab + NetworkTab + PortMonitorTab + ProcessTable + FDUsageCard + ContextSwitchCard + ProcessTab), TABS 常量数组提取为模块级, PCT_REF_LINES 常量提升到 types.ts, 端口/进程数组类型 JsonData→JsonData[] 类型安全升级, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓ (17.64s), go build=0, 17/17 测试通过
|
2026-07-09 05:48:54 +08:00 |
|
attacker
|
03a84049fb
|
refactor(quality): Q26 前端巨型组件拆分 — PodLogsViewer 553L→331L (-40%), 提取 pod-logs-viewer/ 5 个文件 (types.tsx(highlightKeyword 纯函数) + LogsHeader(66L) + ControlBar(178L) + LogContentArea(64L) + BottomStatusBar(42L)), renderLine 内联函数提取为模块级 highlightKeyword 纯函数, catch 类型安全升级 (e?.message→e instanceof Error), 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓ (17.34s), 17/17 测试通过
|
2026-07-09 03:37:35 +08:00 |
|
attacker
|
e5f969d2c7
|
docs: ROADMAP 更新 Q23-Q25 巨型组件拆分完成记录
|
2026-07-09 01:19:27 +08:00 |
|
attacker
|
e14b6d0e10
|
refactor(quality): Q22 前端巨型组件拆分 — WorkloadViewPage 572L→348L (-39%), 提取 workload-view/ 5 个独立文件 (types(parseWorkloadStats 纯函数) + shared-components(StatCard/LabelBadges/ContainerInfo) + UpdateStrategySelectorCards + PodInstancesTable + ScaleDialog), ~40 行 manifest 字段提取为纯函数, catch 类型安全升级, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 22:59:58 +08:00 |
|
attacker
|
b4591de97c
|
refactor(quality): Q21 前端巨型组件拆分 — DeploymentEditAdvanced 590L→289L (-51%), 提取 types(parseAdvancedManifest+buildAdvancedManifest 纯函数) + UpdateStrategyCard/TolerationsCard/PodMiscCard/PodSecurityCard/HostSettingsCard 5 个受控 Card 组件, manifest 解析(106L)和序列化(121L)提取为纯函数, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 20:37:03 +08:00 |
|
attacker
|
a530d3898c
|
refactor(quality): Q20 前端巨型组件拆分 — TopologyView 596L→472L (-21%), 提取 types + TopologyCanvas + NodeDetailDialog + EditNodeDialog 4 个独立文件, 移除文件级 eslint-disable + any→ClusterInfo 具体接口类型, 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 18:21:41 +08:00 |
|
attacker
|
42340edce2
|
refactor(quality): Q19 前端巨型组件拆分 — GrafanaDashboard 624L→78L (-87%), 提取 grafana-dashboard/ 5 个独立文件 (types + datasource-toolbar + BatchDeployDialog + AgentTab + ExternalDatasourceTab), DRY 合并 Zabbix/Prometheus Tab 为通用 ExternalDatasourceTab (render-prop 模式), 移除文件级 eslint-disable + 类型安全升级 (any→具体接口), 零逻辑变更, ESLint errors=0/warnings=65/any=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 09:45:39 +08:00 |
|
attacker
|
69447e4d66
|
refactor(quality): Q18 前端巨型组件拆分 — TraceManager 605L→331L (-45%), 提取 types + trace-helpers + SpanTreeNode + TraceDetailDialog + SpanDetailDialog 5 个独立文件, 修复 SpanTreeNode 内联定义反模式(每次 render 重建组件函数), 零逻辑变更, ESLint errors=0/warnings=64/any=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 07:26:04 +08:00 |
|
attacker
|
6f1c79fd51
|
refactor(quality): Q17 前端巨型组件拆分 — DeploymentEditService 627L→394L (-37%), 提取 types + ServiceCreateForm + IngressCreateForm + ServiceListItem + IngressListItem 5 个独立文件, 端口增删改逻辑下沉到 ServiceCreateForm, 移除文件级 eslint-disable, 零逻辑变更, ESLint errors=0/warnings=64/any=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 05:15:39 +08:00 |
|
attacker
|
4905724338
|
refactor(quality): Q16 前端巨型组件拆分 — RdpDialog 642L→442L (-31%), 提取 types + rdpp-utils + RdpDialogHeader 3 个独立文件, 清理 RDP_DIALOG_VERTICAL_GAP 死代码, 零逻辑变更, ESLint errors=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 03:05:13 +08:00 |
|
attacker
|
1f3b419d62
|
refactor(quality): Q15 PipelineEditor 巨型组件拆分 (676L→406L, -40%), 提取 types + TaskCard + TaskEditorPanel + PipelineLogDialog + RunsHistoryTab + PipelineMembersTab 6 个独立文件, 零逻辑变更, ESLint errors=0, tsc -b=0, npm build✓, 17/17 测试通过
|
2026-07-08 00:53:40 +08:00 |
|