Commit Graph
7 Commits
Author SHA1 Message Date
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 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 55f216cfbb feat(i18n): 安全批量转换 135 文件 — 覆盖率 34%→62%
使用 i18n.t() 全局方式(避免 hook 定位问题):
- 288 目标文件中 135 个成功转换
- 2228 处中文替换为 i18n.t() 调用
- 1006 个新翻译 key 添加到 zh-CN.json + en-US.json
- 词典总量: 3554 keys (22 namespaces)
- tsc 零错误 + Vite 构建成功
- 6 个含代码示例/数据字符串的文件安全回退
2026-07-03 02:14:20 +08:00
LoganandClaude 471353e3d7 feat: 监控告警体系统一重构 + 自动化任务调度引擎 + 监控大屏拆分
告警中心
- 新增统一告警(alert_unified)、监控告警规则(monitor_alert_rule)、指标目录(alert_metric_catalog)
- 通知策略与消息分发(alert_notify_policy/dispatch/message)、静默规则
- 告警引擎按阈值/SNMP 拆分(alert_engine_monitor/snmp)

监控采集
- SNMP 常量/模板与历史指标(snmp templates/constants、snmp_metrics_history、snmp_collect)
- 中间件监控 Redis 采集与种子(middleware_monitor_redis/seed)
- 站点探测 pkg(siteprobe) + 站点视图(site_view)

自动化任务
- cron 调度器(cronscheduler)、脚本运行器(scriptrunner)、系统任务(systask)及运行记录(cron_job_run、system_task)

审计与凭证
- 审计设置(audit_setting) + 历史清理(auditcleaner)

前端
- 监控页面(host/middleware/site/snmp)拆分为子模块并大屏化
- 告警中心多 Tab(规则/指标目录/通知策略/静默)、任务管理组件重构、Agent CLI Markdown 渲染
- 移除旧脚本卡片/详情/日志组件,统一为 ScriptTable/ScriptCodeEditor/TerminalOutput

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-01 23:44:45 +08:00
Logan 8d46e8f352 feat: 新增日志中心、功能优化与代码重构
- 新增 log_datasource.go / log_proxy.go / user_api_token.go 后端控制器
- 新增 log_datasource.go model
- 新增 monitor/log-center.ts API 模块
- 新增 LogCenter 前端组件及页面
- 重构 deployment 相关组件 (HPDA/UpdateImageModal/bundle-yaml 等)
- 新增 ResetPasswordDialog / code-snippet-block / copy-button 等 UI 组件
- 重构多个 k8s 相关组件 (TopologyView/ResourceVisualEditor/PodFileBrowser 等)
- 更新多个 API 和工具函数 (auth.ts/monitor/index.ts/request.ts 等)
- 更新静态资源 (index.html + 新 JS/CSS bundle)
- 删除废弃静态资源文件
2026-06-26 23:18:05 +08:00
Logan.Li f45e203e21 refactor(frontend): P1-P2 架构统一 — utils/hooks/api 模块化
P1:
- utils/storage.ts、theme.ts、validate.ts + index 统一出口
- request/store/useTheme 接入 storage;清零 confirm/alert
- PipelineManager、TerminalAuditTab 拆分子模块(<700行红线)

P2:
- api/monitor、api/deploy 子目录化
- hooks/api 扩展:servers/pipelines/alerts/audit/sessionCommands
- PipelineManager、AuditOperationsTab 接入 TanStack Query
2026-06-26 00:18:14 +08:00
Logan.Li d19a03d427 refactor(frontend): services/api 迁至 src/api,http 迁至 utils/request
对齐 Vue 后台惯例:
- src/api/          域 API(原 services/api)
- src/utils/request.ts  HTTP 封装(原 services/http.ts)
- src/utils/export.ts  客户端导出工具
- src/utils/index.ts   工具统一出口

全局导入改为 @/api 与 @/utils/request,tsc + build 通过。
2026-06-26 00:09:07 +08:00