feat(i18n): 监控大屏 GrafanaDashboard 全量国际化 — 108 翻译键 (monitor.dashboard.*) + 4 组件子Tab全量迁移
- GrafanaDashboard.tsx (640L) 全量迁移: AgentTab/ZabbixTab/PrometheusTab/DashboardTab 四个组件
- 新增 monitor.dashboard.* 命名空间 (108 键): tab/agent/batch/confirm/creds/warn/status/col/pagination/zabbix/prometheus/custom
- 硬编码中文 UI 文案 → t() 翻译键: Tab标签/工具栏/批量部署对话框/确认框/toast消息/表格列头/状态Badge/凭据表单/警告文案/分页/空状态
- TABS 常量改 getTabs(t) 函数模式(支持语言切换实时更新)
- zh-CN/en-US 完全对齐: 4201 键
- tsc -b=0, npm build ✅ (19.77s), ESLint any=37 unused=0, 17/17 集成测试通过
This commit is contained in:
1 parent
be2cff5745
commit
0f0f2770e1
4 files changed
+388
-103
No files matched your search
@@ -2434,7 +2434,143 @@
|
||||
"totalItems": "{{count}} total",
|
||||
"minutesShort": "{{count}}m",
|
||||
"durationSeconds": "{{count}}s duration",
|
||||
"peopleCount": "{{count}} people"
|
||||
"peopleCount": "{{count}} people",
|
||||
"dashboard": {
|
||||
"title": "Monitoring Dashboard",
|
||||
"subtitle": "Agent hosts, Zabbix, Prometheus and custom dashboards",
|
||||
"tab": {
|
||||
"agent": "Agent Hosts",
|
||||
"dashboard": "Custom"
|
||||
},
|
||||
"refresh": "Refresh",
|
||||
"loading": "Loading...",
|
||||
"agent": {
|
||||
"loadingHosts": "Loading agent host list...",
|
||||
"emptyTitle": "No server assets",
|
||||
"emptyDesc": "Please add hosts in Server Management first, then install Agent here",
|
||||
"selected": "{{count}} selected",
|
||||
"installAgent": "Install Agent",
|
||||
"batchDeploy": "Batch Deploy",
|
||||
"batchUninstall": "Batch Uninstall",
|
||||
"deploying": "Deploying",
|
||||
"chart": "Chart",
|
||||
"toast": {
|
||||
"installed": "Agent installation submitted, running in background…",
|
||||
"installFailed": "Installation failed",
|
||||
"refreshFailed": "Failed to refresh agent host list: {{msg}}",
|
||||
"unknownError": "Unknown error",
|
||||
"submitFailed": "Submission failed",
|
||||
"batchUninstall": "Submitted: batch uninstalling Agent on {{count}} hosts, running in background, auto-refresh in 30s",
|
||||
"batchInstall": "Submitted: batch installing Agent on {{count}} hosts, running in background, auto-refresh in 30s",
|
||||
"batchUpgrade": "Submitted: batch upgrading Agent on {{count}} hosts, running in background, auto-refresh in 30s",
|
||||
"allInstalled": "All selected hosts already have Agent installed",
|
||||
"noOnline": "No online Agent among selected hosts, cannot upgrade",
|
||||
"ackRequired": "Please check \"I acknowledge\" first",
|
||||
"notLogin": "Not logged in"
|
||||
}
|
||||
},
|
||||
"confirm": {
|
||||
"uninstallTitle": "Batch Uninstall Agent",
|
||||
"uninstallDesc": "Confirm uninstalling AIOps Agent on {{count}} selected hosts? Uninstall will run asynchronously in the background.",
|
||||
"uninstall": "Uninstall"
|
||||
},
|
||||
"batch": {
|
||||
"title": "Batch Deploy Agent",
|
||||
"summary": "{{selected}} hosts selected (need install: {{install}}, upgrade: {{upgrade}})",
|
||||
"install": "⚡ Install ({{count}})",
|
||||
"upgrade": "🔄 Upgrade to latest ({{count}})",
|
||||
"willInstall": "Will Install",
|
||||
"willUpgrade": "Will Upgrade",
|
||||
"ack": "I acknowledge the above risks and precautions",
|
||||
"cancel": "Cancel",
|
||||
"confirmInstall": "Confirm Install",
|
||||
"confirmUpgrade": "Confirm Upgrade"
|
||||
},
|
||||
"status": {
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"notInstalled": "Not Installed"
|
||||
},
|
||||
"col": {
|
||||
"hostname": "Hostname",
|
||||
"version": "Current Version",
|
||||
"status": "Status",
|
||||
"action": "Action",
|
||||
"agentVersion": "Agent Version",
|
||||
"cpu": "CPU",
|
||||
"memory": "Memory",
|
||||
"disk": "Disk",
|
||||
"region": "Region"
|
||||
},
|
||||
"creds": {
|
||||
"hint": "The following hosts have no saved SSH credentials. Please provide temporary credentials for batch installation (this time only):",
|
||||
"authType": "Auth Method",
|
||||
"password": "Password",
|
||||
"sshKey": "SSH Private Key",
|
||||
"username": "Username",
|
||||
"passwordPlaceholder": "Enter SSH password"
|
||||
},
|
||||
"warn": {
|
||||
"thisInstall": "This installation",
|
||||
"thisUpgrade": "This upgrade",
|
||||
"intro": ", the host monitoring probe will deploy AIOps Agent. AIOps Agent is the next-generation data collector, providing host monitoring metric collection and observability data collection.",
|
||||
"upgradeNotice": "Please note the following before upgrading:",
|
||||
"installNotice": "Please note the following before installation:",
|
||||
"u1": "If your machine already has an older Agent installed, the upgrade will stop the old version and replace it with the latest.",
|
||||
"u2": "If your machine previously installed Agent but has been uninstalled, leftover collection configs may become active again. Please ensure obsolete configs are removed before upgrading.",
|
||||
"u3": "If your machine uses a custom-installed Agent (not the AIOps one-click install script), do not use batch upgrade directly.",
|
||||
"u4": "Before batch upgrading, please test single-machine canary upgrade first.",
|
||||
"i1": "Installation will auto-detect target host architecture (amd64/arm64), download the corresponding Agent binary and start the service.",
|
||||
"i2": "Please ensure the target host's SSH port (default 22) is accessible and valid SSH credentials are associated.",
|
||||
"i3": "Installation takes about 30-60 seconds, during which the target host's CPU load will briefly spike.",
|
||||
"i4": "If installation fails, check the target host's firewall rules and SSH service status, then retry.",
|
||||
"c1": "This operation is irreversible. Please ensure critical configs are backed up before proceeding.",
|
||||
"c2": "The operation will run asynchronously in the background. You can view detailed progress in Task Execution Records."
|
||||
},
|
||||
"pagination": {
|
||||
"total": "{{count}} total",
|
||||
"prev": "Previous",
|
||||
"next": "Next",
|
||||
"perPage": "page"
|
||||
},
|
||||
"zabbix": {
|
||||
"loading": "Loading Zabbix datasource...",
|
||||
"emptyTitle": "No Zabbix datasource configured",
|
||||
"goConfig": "Go to configure"
|
||||
},
|
||||
"prometheus": {
|
||||
"loading": "Loading Prometheus datasource...",
|
||||
"emptyTitle": "No Prometheus datasource configured"
|
||||
},
|
||||
"custom": {
|
||||
"selectDashboard": "Select dashboard",
|
||||
"defaultTag": "(Default)",
|
||||
"addPanel": "Add Panel",
|
||||
"create": "Create New",
|
||||
"emptyNoPanels": "No panels",
|
||||
"emptyNoDashboards": "No dashboards",
|
||||
"createTitle": "Create Dashboard",
|
||||
"name": "Name",
|
||||
"datasource": "Datasource",
|
||||
"cancel": "Cancel",
|
||||
"createBtn": "Create",
|
||||
"addPanelTitle": "Add Panel",
|
||||
"panelTitle": "Title",
|
||||
"panelType": "Type",
|
||||
"panelQuery": "Query",
|
||||
"typeGraph": "Line Chart",
|
||||
"typeStat": "Stat",
|
||||
"typeGauge": "Gauge",
|
||||
"typeTable": "Table",
|
||||
"addBtn": "Add",
|
||||
"toastRefreshFailed": "Failed to refresh custom dashboards: {{msg}}",
|
||||
"toastNameRequired": "Please enter a name",
|
||||
"toastCreateSuccess": "Created successfully",
|
||||
"toastCreateFailed": "Creation failed",
|
||||
"toastPanelAdded": "Panel added successfully",
|
||||
"toastPanelFailed": "Failed to add"
|
||||
}
|
||||
}
|
||||
},
|
||||
"task": {
|
||||
"cronJob": {
|
||||
@@ -4456,4 +4592,4 @@
|
||||
"agentCliCopied": "Copied",
|
||||
"agentCliHint": "For Agent CLI high-frequency calls"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2434,7 +2434,143 @@
|
||||
"totalItems": "共 {{count}} 条",
|
||||
"minutesShort": "{{count}}分",
|
||||
"durationSeconds": "持续 {{count}}秒",
|
||||
"peopleCount": "{{count}} 人"
|
||||
"peopleCount": "{{count}} 人",
|
||||
"dashboard": {
|
||||
"title": "监控大屏",
|
||||
"subtitle": "Agent 主机、Zabbix、Prometheus 与自定义仪表盘",
|
||||
"tab": {
|
||||
"agent": "Agent 主机",
|
||||
"dashboard": "自定义"
|
||||
},
|
||||
"refresh": "刷新",
|
||||
"loading": "加载中...",
|
||||
"agent": {
|
||||
"loadingHosts": "加载 Agent 主机列表...",
|
||||
"emptyTitle": "暂无服务器资产",
|
||||
"emptyDesc": "请先在「服务器管理」中添加主机,然后在此安装 Agent",
|
||||
"selected": "已选 {{count}} 项",
|
||||
"installAgent": "安装 Agent",
|
||||
"batchDeploy": "批量部署",
|
||||
"batchUninstall": "批量卸载",
|
||||
"deploying": "部署中",
|
||||
"chart": "图表",
|
||||
"toast": {
|
||||
"installed": "Agent 安装任务已提交,后台执行中…",
|
||||
"installFailed": "安装失败",
|
||||
"refreshFailed": "刷新 Agent 主机列表失败:{{msg}}",
|
||||
"unknownError": "未知错误",
|
||||
"submitFailed": "提交失败",
|
||||
"batchUninstall": "已提交:批量卸载 {{count}} 台主机的 Agent,后台执行中,30秒后自动刷新",
|
||||
"batchInstall": "已提交:批量安装 {{count}} 台主机的 Agent,后台执行中,30秒后自动刷新",
|
||||
"batchUpgrade": "已提交:批量升级 {{count}} 台主机的 Agent,后台执行中,30秒后自动刷新",
|
||||
"allInstalled": "所选主机均已安装 Agent,无需安装",
|
||||
"noOnline": "所选主机中没有在线 Agent,无法升级",
|
||||
"ackRequired": "请先确认并勾选「我已知悉」",
|
||||
"notLogin": "未登录"
|
||||
}
|
||||
},
|
||||
"confirm": {
|
||||
"uninstallTitle": "批量卸载 Agent",
|
||||
"uninstallDesc": "确定卸载选中的 {{count}} 台主机的 AIOps Agent?卸载将在后台异步执行。",
|
||||
"uninstall": "卸载"
|
||||
},
|
||||
"batch": {
|
||||
"title": "批量部署 Agent",
|
||||
"summary": "选中 {{selected}} 台主机(需安装: {{install}},待升级: {{upgrade}})",
|
||||
"install": "⚡ 安装 ({{count}})",
|
||||
"upgrade": "🔄 升级到最新版 ({{count}})",
|
||||
"willInstall": "即将安装",
|
||||
"willUpgrade": "即将升级",
|
||||
"ack": "我已知悉以上风险和注意事项",
|
||||
"cancel": "取消",
|
||||
"confirmInstall": "确认安装",
|
||||
"confirmUpgrade": "确认升级"
|
||||
},
|
||||
"status": {
|
||||
"online": "在线",
|
||||
"offline": "离线",
|
||||
"notInstalled": "未安装"
|
||||
},
|
||||
"col": {
|
||||
"hostname": "主机名",
|
||||
"version": "当前版本",
|
||||
"status": "状态",
|
||||
"action": "操作",
|
||||
"agentVersion": "Agent版本",
|
||||
"cpu": "CPU",
|
||||
"memory": "内存",
|
||||
"disk": "磁盘",
|
||||
"region": "区域"
|
||||
},
|
||||
"creds": {
|
||||
"hint": "以下主机未保存 SSH 凭据,请提供临时凭据用于批量安装(仅本次使用):",
|
||||
"authType": "认证方式",
|
||||
"password": "密码",
|
||||
"sshKey": "SSH 私钥",
|
||||
"username": "用户名",
|
||||
"passwordPlaceholder": "输入 SSH 密码"
|
||||
},
|
||||
"warn": {
|
||||
"thisInstall": "本次安装",
|
||||
"thisUpgrade": "本次升级",
|
||||
"intro": ",主机监控探针将部署 AIOps Agent。AIOps Agent 是 AIOps 平台推出的新一代数据采集器,提供主机监控指标采集和可观测数据采集能力。",
|
||||
"upgradeNotice": "升级前请注意以下事项:",
|
||||
"installNotice": "安装前请注意以下事项:",
|
||||
"u1": "如果您的机器已经安装旧版 Agent,升级操作将停止旧版并替换为最新版本。",
|
||||
"u2": "如果您的机器之前安装过 Agent 但已卸载,遗留有相关采集配置,本次升级可能导致配置重新生效。升级前请确保存量废弃配置已经移除。",
|
||||
"u3": "如果您的机器采用自定义安装的 Agent(非 AIOps 提供的一键安装脚本),请不要直接使用批量升级。",
|
||||
"u4": "批量升级前,请务必先单机灰度升级,确保升级成功且不影响业务后再操作。",
|
||||
"i1": "安装将自动检测目标主机架构(amd64/arm64),下载对应版本的 Agent 二进制并启动服务。",
|
||||
"i2": "请确保目标主机的 SSH 端口(默认 22)可访问,且已关联有效的 SSH 凭据。",
|
||||
"i3": "安装过程约 30-60 秒,期间目标主机 CPU 负载会短暂升高。",
|
||||
"i4": "若安装失败,请检查目标主机的防火墙规则和 SSH 服务状态后重试。",
|
||||
"c1": "操作不可回滚,请在操作前确认已备份关键配置。",
|
||||
"c2": "操作将在后台异步执行,您可以在「任务执行记录」中查看详细进度。"
|
||||
},
|
||||
"pagination": {
|
||||
"total": "共 {{count}} 条",
|
||||
"prev": "上一页",
|
||||
"next": "下一页",
|
||||
"perPage": "页"
|
||||
},
|
||||
"zabbix": {
|
||||
"loading": "加载 Zabbix 数据源...",
|
||||
"emptyTitle": "未配置 Zabbix 数据源",
|
||||
"goConfig": "前往配置"
|
||||
},
|
||||
"prometheus": {
|
||||
"loading": "加载 Prometheus 数据源...",
|
||||
"emptyTitle": "未配置 Prometheus 数据源"
|
||||
},
|
||||
"custom": {
|
||||
"selectDashboard": "选择仪表盘",
|
||||
"defaultTag": "(默认)",
|
||||
"addPanel": "添加面板",
|
||||
"create": "新建",
|
||||
"emptyNoPanels": "暂无面板",
|
||||
"emptyNoDashboards": "暂无仪表盘",
|
||||
"createTitle": "新建仪表盘",
|
||||
"name": "名称",
|
||||
"datasource": "数据源",
|
||||
"cancel": "取消",
|
||||
"createBtn": "创建",
|
||||
"addPanelTitle": "添加面板",
|
||||
"panelTitle": "标题",
|
||||
"panelType": "类型",
|
||||
"panelQuery": "查询",
|
||||
"typeGraph": "折线图",
|
||||
"typeStat": "数值",
|
||||
"typeGauge": "仪表盘",
|
||||
"typeTable": "表格",
|
||||
"addBtn": "添加",
|
||||
"toastRefreshFailed": "刷新自定义仪表盘失败:{{msg}}",
|
||||
"toastNameRequired": "请输入名称",
|
||||
"toastCreateSuccess": "创建成功",
|
||||
"toastCreateFailed": "创建失败",
|
||||
"toastPanelAdded": "面板添加成功",
|
||||
"toastPanelFailed": "添加失败"
|
||||
}
|
||||
}
|
||||
},
|
||||
"task": {
|
||||
"cronJob": {
|
||||
@@ -4456,4 +4592,4 @@
|
||||
"agentCliCopied": "已复制",
|
||||
"agentCliHint": "适合 Agent CLI 高频调用"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user