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 测试通过
This commit is contained in:
1 parent
7c80e35411
commit
a1d82574a7
14 files changed
+62
-33
No files matched your search
@@ -525,6 +525,7 @@ services/api.ts (1324L)
|
|||||||
| U34 | System & User 模块 i18n 清理(ProfilePage + ResetPasswordDialog + SystemRolesTab + LdapManagementSection 4 文件 — ProfilePage 从零接入 useTranslation + ResetPasswordDialog 从零接入 useTranslation + SystemRolesTab 权限分组标签(云资源/自动化/审批/审计)+toast+confirm description+角色计数+空状态+权限列表计数+编码标签+尾部文案全部 i18n + LdapManagementSection 验证按钮+根OU标签+创建按钮+导入按钮+编辑用户描述全部 i18n;新增 user.profile.* 14键+user.resetPwd.* 11键+system.* 16键 共 41 翻译键;UI 硬编码中文 ProfilePage 15→0 + ResetPasswordDialog 11→0 + SystemRolesTab 12→0 + LdapManagementSection 8→0;zh/en 7524→7565 +41 对齐;tsc -b=0, npm build✓ (16.05s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
| U34 | System & User 模块 i18n 清理(ProfilePage + ResetPasswordDialog + SystemRolesTab + LdapManagementSection 4 文件 — ProfilePage 从零接入 useTranslation + ResetPasswordDialog 从零接入 useTranslation + SystemRolesTab 权限分组标签(云资源/自动化/审批/审计)+toast+confirm description+角色计数+空状态+权限列表计数+编码标签+尾部文案全部 i18n + LdapManagementSection 验证按钮+根OU标签+创建按钮+导入按钮+编辑用户描述全部 i18n;新增 user.profile.* 14键+user.resetPwd.* 11键+system.* 16键 共 41 翻译键;UI 硬编码中文 ProfilePage 15→0 + ResetPasswordDialog 11→0 + SystemRolesTab 12→0 + LdapManagementSection 8→0;zh/en 7524→7565 +41 对齐;tsc -b=0, npm build✓ (16.05s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||||
| U35 | Deploy + Task 模块残余 JSX 硬编码中文清理(PipelineRunPanel 12处 + CronJobTable 12处 + ExecutionHistoryDialog 10处 + ScrollButtons 2处 — 新增 deploy.runStatus.* 12键 + task.cronJobCol.* 14键 + task.execHistory.* 14键 + deploy.credCol.* 9键 + common.scrollToTop/scrollToBottom/success/failed/total 5键 共 54 翻译键;zh/en 7565→7616 +51 对齐;tsc -b=0, npm build✓ (17.02s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
| U35 | Deploy + Task 模块残余 JSX 硬编码中文清理(PipelineRunPanel 12处 + CronJobTable 12处 + ExecutionHistoryDialog 10处 + ScrollButtons 2处 — 新增 deploy.runStatus.* 12键 + task.cronJobCol.* 14键 + task.execHistory.* 14键 + deploy.credCol.* 9键 + common.scrollToTop/scrollToBottom/success/failed/total 5键 共 54 翻译键;zh/en 7565→7616 +51 对齐;tsc -b=0, npm build✓ (17.02s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||||
| U36 | 全量 JSX 属性 + toast 硬编码中文清零(20 文件 30 处→0: TerminalLoadingOverlay/copy-button/AppRelease/DeployCredentials/PipelineManager/WorkspaceTermDialog/CredFormDialog/JobRoleCreateDialog/PipelineCreateDialog/AdvancedSettingsPanel/ServerForm/LdapManagementSection/LiveMonitorDialog/SystemManager/ActiveSessionsPanel/HistorySessionsPanel/AlertRulesTab/PrometheusDatasourceManager/SNMPMonitor/PredictiveCapacityTab — 23 JSX 属性 + 7 toast 调用全量清零, copy-button 从 import i18n→useTranslation hook, 4 组件新增 useTranslation hook;新增 25 翻译键;zh/en 7616→7640 +24 对齐;tsc -b=0, npm build✓ (17.25s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
| U36 | 全量 JSX 属性 + toast 硬编码中文清零(20 文件 30 处→0: TerminalLoadingOverlay/copy-button/AppRelease/DeployCredentials/PipelineManager/WorkspaceTermDialog/CredFormDialog/JobRoleCreateDialog/PipelineCreateDialog/AdvancedSettingsPanel/ServerForm/LdapManagementSection/LiveMonitorDialog/SystemManager/ActiveSessionsPanel/HistorySessionsPanel/AlertRulesTab/PrometheusDatasourceManager/SNMPMonitor/PredictiveCapacityTab — 23 JSX 属性 + 7 toast 调用全量清零, copy-button 从 import i18n→useTranslation hook, 4 组件新增 useTranslation hook;新增 25 翻译键;zh/en 7616→7640 +24 对齐;tsc -b=0, npm build✓ (17.25s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||||
|
| U38 | i18n phantom CTK 清理 — 模板字面量 + JSX 属性残余中文清零(13 文件 16 处→0: LogsHeader "行"suffix + analyzerHelpers "当前值" + DeploymentEditStorage 2 toast description + WorkloadViewPage 2 toast description + ServerFileBrowser confirm + LogDatasourcePage toast + LogAlertsPanel confirm + DeployTargetFields JSX hint + UserGroupsManager 3 处 confirm/desc + BuildNodesManager JSX "(可选)" + useLdapManagement confirm — 新增 14 语义化翻译键 (common.lineSuffix/currentValue/memberCount/fillIfMultiContainer/confirmDeleteType + k8s.editStorage.*Desc + k8s.workloadView.restartSentDesc + k8s.workloads.scaleSuccessDesc + aiops.reachable + monitor.deleteRuleConfirmDesc + deploy.rbac.deleteGroupDesc + pipeline.removeMemberDesc + system.ldapMgmt.deleteEntryDesc),zh/en 7737→7751 +14 对齐;tsc -b=0, npm build✓ (16.86s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||||
| U37 | 全量 JSX 文本节点硬编码中文清零(65 文件 151 处→0: MiddlewareMonitor/SiteMonitor/SNMPMonitor/HealthProbeSection/ContextSwitchCard/ProcessTable/PortMonitorTab/MwTargetChartsPanel/MiddlewareDialog/ChartRangeHint/SnmpDeviceChartsPanel/AlertRulesTab/LogClusterPanel/LogDatasourcePage/LogQueryToolbar/LogAlertsPanel/PrometheusDatasourceManager/PodMetricsPage/CapacityPage/NamespaceManagementPage/NamespaceResourcePage/DeploymentEditService/EventsPage/DeploymentDetail/ClusterOverviewPage/DeploymentEditContainers/DeploymentEditStorage/WorkloadViewPage/BottomStatusBar/UpdateStrategySelectorCards/PodInstancesTable/shared-components/UpdateStrategyCard/TolerationsCard/HostSettingsCard/IngressListItem/ServiceListItem/ServiceCreateForm/IngressCreateForm/CreateHPADialog/DeployCredentials/DeployRBAC/UserGroupsManager/BuildNodesManager/DeployTargetFields/PipelineCreateDialog/CredFormDialog/WorkspaceTermDialog/AgentAlerts/AgentRuleDialog/LiveMonitorDialog/RoleFormDialog/CronJobViewDialog/TerminalOutput/AIAnalysisResult/AIPredictiveAnalytics/PredictiveCostTab/PredictiveCapacityTab/ActiveSessionsPanel/HistorySessionsPanel/TerminalDialog/ServerFileBrowser/PodFileBrowser/SiteResultsPanel/SiteProtocolPieChart — 151 JSX 文本节点中文全部替换为 t()/i18n.t() 调用;新增 common.* 98 翻译键 (selectedCount/itemsCount/newValue/namespaceLabel/containerLabel/replicasLabel/minReplicas/maxReplicas/createNamespace/noNamespace/unknownResource/exportYaml/loadTrend/loadCapacity/predicted/threshold/hostSettings/addVolume/addMount/createService/createIngress/editAction/updateStrategy/selectAndLabel/historyVersion/fileBrowser/scale/back/createHpa/allNamespaces/certLabel/observable/deviceList/addDevice/addMonitor/collectNow/addTask/addProbe/restoreFull/contextSwitch/processTop/listenPorts/terminalRealtime/auditWebssh/buildTerminal/fileBrowse/newDir/loadDeployment/notLinked/selectedPerms/none/hasLabel/deleteNamespace/deleteNamespaceWarn/allResources/notFoundDeploy/nodeList/fileLabel/addCustom/newInstanceService/newInstanceIngress/totalContainers/workContainers/loadingEllipsis/volumeClaimTemplates/containerTemplate/passwordOptional/updated/page/perPage/clusterMode/totalLogs/countLabel/percentage/queryTime/addDatasource/newPermission/newEnv/envLabel/displayName/newUserGroup/auditTrace/predictValue/confidence/predictMonthEnd/noCapacityData/securityMode/standardRdp/domainLabel/noRdpActive/noRdpHistory/buffer/matched/podLogs/createHpaTitle/password/events/total);37 文件已有 import i18n→i18n.t() 模式, 2 文件新增 import i18n;zh/en 7640→3526 namespace-flat +98 键对齐;tsc -b=0, npm build✓ (17.96s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
| U37 | 全量 JSX 文本节点硬编码中文清零(65 文件 151 处→0: MiddlewareMonitor/SiteMonitor/SNMPMonitor/HealthProbeSection/ContextSwitchCard/ProcessTable/PortMonitorTab/MwTargetChartsPanel/MiddlewareDialog/ChartRangeHint/SnmpDeviceChartsPanel/AlertRulesTab/LogClusterPanel/LogDatasourcePage/LogQueryToolbar/LogAlertsPanel/PrometheusDatasourceManager/PodMetricsPage/CapacityPage/NamespaceManagementPage/NamespaceResourcePage/DeploymentEditService/EventsPage/DeploymentDetail/ClusterOverviewPage/DeploymentEditContainers/DeploymentEditStorage/WorkloadViewPage/BottomStatusBar/UpdateStrategySelectorCards/PodInstancesTable/shared-components/UpdateStrategyCard/TolerationsCard/HostSettingsCard/IngressListItem/ServiceListItem/ServiceCreateForm/IngressCreateForm/CreateHPADialog/DeployCredentials/DeployRBAC/UserGroupsManager/BuildNodesManager/DeployTargetFields/PipelineCreateDialog/CredFormDialog/WorkspaceTermDialog/AgentAlerts/AgentRuleDialog/LiveMonitorDialog/RoleFormDialog/CronJobViewDialog/TerminalOutput/AIAnalysisResult/AIPredictiveAnalytics/PredictiveCostTab/PredictiveCapacityTab/ActiveSessionsPanel/HistorySessionsPanel/TerminalDialog/ServerFileBrowser/PodFileBrowser/SiteResultsPanel/SiteProtocolPieChart — 151 JSX 文本节点中文全部替换为 t()/i18n.t() 调用;新增 common.* 98 翻译键 (selectedCount/itemsCount/newValue/namespaceLabel/containerLabel/replicasLabel/minReplicas/maxReplicas/createNamespace/noNamespace/unknownResource/exportYaml/loadTrend/loadCapacity/predicted/threshold/hostSettings/addVolume/addMount/createService/createIngress/editAction/updateStrategy/selectAndLabel/historyVersion/fileBrowser/scale/back/createHpa/allNamespaces/certLabel/observable/deviceList/addDevice/addMonitor/collectNow/addTask/addProbe/restoreFull/contextSwitch/processTop/listenPorts/terminalRealtime/auditWebssh/buildTerminal/fileBrowse/newDir/loadDeployment/notLinked/selectedPerms/none/hasLabel/deleteNamespace/deleteNamespaceWarn/allResources/notFoundDeploy/nodeList/fileLabel/addCustom/newInstanceService/newInstanceIngress/totalContainers/workContainers/loadingEllipsis/volumeClaimTemplates/containerTemplate/passwordOptional/updated/page/perPage/clusterMode/totalLogs/countLabel/percentage/queryTime/addDatasource/newPermission/newEnv/envLabel/displayName/newUserGroup/auditTrace/predictValue/confidence/predictMonthEnd/noCapacityData/securityMode/standardRdp/domainLabel/noRdpActive/noRdpHistory/buffer/matched/podLogs/createHpaTitle/password/events/total);37 文件已有 import i18n→i18n.t() 模式, 2 文件新增 import i18n;zh/en 7640→3526 namespace-flat +98 键对齐;tsc -b=0, npm build✓ (17.96s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export function mapAlertEvent(event: JsonData): AlertItem {
|
|||||||
startedAt,
|
startedAt,
|
||||||
description: event.message && event.message !== `告警事件 ${event.id}`
|
description: event.message && event.message !== `告警事件 ${event.id}`
|
||||||
? event.message
|
? event.message
|
||||||
: event.rule?.description || `${event.rule_name || i18n.t('monitor.hostDashboard.alert')}: ${event.target} 当前值 ${currentValue}`,
|
: event.rule?.description || `${event.rule_name || i18n.t('monitor.hostDashboard.alert')}: ${event.target} ${i18n.t('common.currentValue')} ${currentValue}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ export default function BuildNodesManager({ embedded = false }: { embedded?: boo
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label className="text-xs"> {i18n.t('kubernetes.namespace.labels')} <span className="text-[var(--dg-text-muted)]">(可选)</span></Label>
|
<Label className="text-xs"> {i18n.t('kubernetes.namespace.labels')} <span className="text-[var(--dg-text-muted)]">{i18n.t('common.optional')}</span></Label>
|
||||||
<Input value={labels} onChange={(e) => setLabels(e.target.value)} className="h-8 text-xs dg-input" placeholder="linux,docker,high-mem" />
|
<Input value={labels} onChange={(e) => setLabels(e.target.value)} className="h-8 text-xs dg-input" placeholder="linux,docker,high-mem" />
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default function UserGroupsManager({ embedded = false }: { embedded?: boo
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleDelete = async (g: Group) => {
|
const handleDelete = async (g: Group) => {
|
||||||
const ok = await _confirm({ title: i18n.t('deploy.rbac.deleteGroup'), description: `确定删除「${g.name}」?所有成员和流水线授权将同时移除。`, variant: 'destructive' });
|
const ok = await _confirm({ title: i18n.t('deploy.rbac.deleteGroup'), description: i18n.t('deploy.rbac.deleteGroupDesc', { name: g.name }), variant: 'destructive' });
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
try { await deployApi.deleteGroup(g.id); toast.success(i18n.t('monitor.silenceRules.deleted')); loadGroups(); }
|
try { await deployApi.deleteGroup(g.id); toast.success(i18n.t('monitor.silenceRules.deleted')); loadGroups(); }
|
||||||
catch { toast.error(i18n.t('kubernetes.msg.deleteFailed2')); }
|
catch { toast.error(i18n.t('kubernetes.msg.deleteFailed2')); }
|
||||||
@@ -75,7 +75,7 @@ export default function UserGroupsManager({ embedded = false }: { embedded?: boo
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleRemoveMember = async (groupId: number, memberId: number, username: string) => {
|
const handleRemoveMember = async (groupId: number, memberId: number, username: string) => {
|
||||||
const ok = await _confirm({ title: i18n.t('pipeline.removeMember'), description: `确定从组中移除「${username}」?` });
|
const ok = await _confirm({ title: i18n.t('pipeline.removeMember'), description: i18n.t('pipeline.removeMemberDesc', { username }) });
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
try { await deployApi.removeGroupMember(groupId, memberId); toast.success(i18n.t('deploy.toast.removed')); loadGroups(); }
|
try { await deployApi.removeGroupMember(groupId, memberId); toast.success(i18n.t('deploy.toast.removed')); loadGroups(); }
|
||||||
catch { toast.error(i18n.t('deploy.toast.removeFailed')); }
|
catch { toast.error(i18n.t('deploy.toast.removeFailed')); }
|
||||||
@@ -116,7 +116,7 @@ export default function UserGroupsManager({ embedded = false }: { embedded?: boo
|
|||||||
<Shield className="w-5 h-5 dg-text-blue" />
|
<Shield className="w-5 h-5 dg-text-blue" />
|
||||||
<div>
|
<div>
|
||||||
<div className="font-medium text-[var(--dg-text-primary)]">{g.name}</div>
|
<div className="font-medium text-[var(--dg-text-primary)]">{g.name}</div>
|
||||||
<div className="text-xs text-[var(--dg-text-secondary)]">{g.description || i18n.t('system.roleDescFallback')} · {(g.members || []).length} 位成员</div>
|
<div className="text-xs text-[var(--dg-text-secondary)]">{g.description || i18n.t('system.roleDescFallback')} · {i18n.t('common.memberCount', { count: (g.members || []).length })}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ export function DeployTargetFields({ value, onChange, requireTarget = true }: De
|
|||||||
)}
|
)}
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label className="text-xs"> {i18n.t('kubernetes.container.containerName')} <span className="text-[var(--dg-text-muted)]">(多容器时填写)</span></Label>
|
<Label className="text-xs"> {i18n.t('kubernetes.container.containerName')} <span className="text-[var(--dg-text-muted)]">{i18n.t('common.fillIfMultiContainer')}</span></Label>
|
||||||
<Input
|
<Input
|
||||||
value={value.k8sContainerName}
|
value={value.k8sContainerName}
|
||||||
onChange={(e) => onChange({ k8sContainerName: e.target.value })}
|
onChange={(e) => onChange({ k8sContainerName: e.target.value })}
|
||||||
|
|||||||
@@ -137,12 +137,12 @@ export function DeploymentEditStorage({ clusterCode, namespace, deploymentName,
|
|||||||
: entry.volume.type === 'secret' ? i18n.t('k8s.editStorage.selectSecret')
|
: entry.volume.type === 'secret' ? i18n.t('k8s.editStorage.selectSecret')
|
||||||
: entry.volume.type === 'persistentVolumeClaim' ? i18n.t('k8s.editStorage.selectPVC')
|
: entry.volume.type === 'persistentVolumeClaim' ? i18n.t('k8s.editStorage.selectPVC')
|
||||||
: i18n.t('k8s.editStorage.typeRequiredHint');
|
: i18n.t('k8s.editStorage.typeRequiredHint');
|
||||||
toast({ title: i18n.t('k8s.editStorage.incompleteConfig'), description: `请为「${entry.volume.name}」${hint}`, variant: 'destructive' });
|
toast({ title: i18n.t('k8s.editStorage.incompleteConfig'), description: i18n.t('k8s.editStorage.incompleteConfigDesc', { name: entry.volume.name, hint }), variant: 'destructive' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const validMounts = entry.mounts.filter((m) => m.mountPath.trim());
|
const validMounts = entry.mounts.filter((m) => m.mountPath.trim());
|
||||||
if (validMounts.length === 0) {
|
if (validMounts.length === 0) {
|
||||||
toast({ title: i18n.t('k8s.editStorage.mountPathRequired'), description: `数据卷「${entry.volume.name}」需至少挂载到一个容器`, variant: 'destructive' });
|
toast({ title: i18n.t('k8s.editStorage.mountPathRequired'), description: i18n.t('k8s.editStorage.mountPathRequiredDesc', { name: entry.volume.name }), variant: 'destructive' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export default function WorkloadViewPage() {
|
|||||||
} else {
|
} else {
|
||||||
await kubernetesApi.restartDaemonSet(clusterCode, namespace, name);
|
await kubernetesApi.restartDaemonSet(clusterCode, namespace, name);
|
||||||
}
|
}
|
||||||
toast({ title: i18n.t('k8s.workloadView.restartSent'), description: `${kind} 滚动重启已触发` });
|
toast({ title: i18n.t('k8s.workloadView.restartSent'), description: i18n.t('k8s.workloadView.restartSentDesc', { kind }) });
|
||||||
setTimeout(loadData, 1000);
|
setTimeout(loadData, 1000);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast({ title: i18n.t('kubernetes.deployment.restartFailed'), description: e instanceof Error ? e.message : String(e), variant: 'destructive' });
|
toast({ title: i18n.t('kubernetes.deployment.restartFailed'), description: e instanceof Error ? e.message : String(e), variant: 'destructive' });
|
||||||
@@ -118,7 +118,7 @@ export default function WorkloadViewPage() {
|
|||||||
setActionLoading(true);
|
setActionLoading(true);
|
||||||
try {
|
try {
|
||||||
await kubernetesApi.scaleStatefulSet(clusterCode, namespace, name, scaleValue);
|
await kubernetesApi.scaleStatefulSet(clusterCode, namespace, name, scaleValue);
|
||||||
toast({ title: i18n.t('k8s.workloads.scaleSuccess'), description: `StatefulSet 副本数已更新为 ${scaleValue}` });
|
toast({ title: i18n.t('k8s.workloads.scaleSuccess'), description: i18n.t('k8s.workloads.scaleSuccessDesc', { count: scaleValue }) });
|
||||||
setScaleModal(false);
|
setScaleModal(false);
|
||||||
setTimeout(loadData, 1000);
|
setTimeout(loadData, 1000);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function LogsHeader({
|
|||||||
<span className="text-[var(--dg-text-primary)] font-medium truncate">{i18n.t('k8s.podLogs.logTitle', { name: podName })}</span>
|
<span className="text-[var(--dg-text-primary)] font-medium truncate">{i18n.t('k8s.podLogs.logTitle', { name: podName })}</span>
|
||||||
{loading && <Loader2 className="h-3 w-3 animate-spin text-[var(--dg-text-muted)]" />}
|
{loading && <Loader2 className="h-3 w-3 animate-spin text-[var(--dg-text-muted)]" />}
|
||||||
<span className="text-xs text-[var(--dg-text-muted)]">
|
<span className="text-xs text-[var(--dg-text-muted)]">
|
||||||
{streaming ? (paused ? i18n.t('kubernetes.deployment.paused') : i18n.t('kubernetes.podLogsViewer.liveTail')) : i18n.t('agent.agentServiceStopped')} · {matchedCount}{keyword ? `/${lineCount}` : ''} 行
|
{streaming ? (paused ? i18n.t('kubernetes.deployment.paused') : i18n.t('kubernetes.podLogsViewer.liveTail')) : i18n.t('agent.agentServiceStopped')} · {matchedCount}{keyword ? `/${lineCount}` : ''} {i18n.t('common.lineSuffix')}
|
||||||
{lineCount >= RING_BUFFER_MAX && i18n.t('kubernetes.podLogsViewer.bufferFull')}
|
{lineCount >= RING_BUFFER_MAX && i18n.t('kubernetes.podLogsViewer.bufferFull')}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export function LogAlertsPanel() {
|
|||||||
useEffect(() => { load(); }, [load]);
|
useEffect(() => { load(); }, [load]);
|
||||||
|
|
||||||
const handleDelete = async (rule: any) => {
|
const handleDelete = async (rule: any) => {
|
||||||
const ok = await confirm({ title: i18n.t('monitor.deleteRule'), description: `删除「${rule.name}」?`, variant: 'destructive', confirmText: i18n.t('kubernetes.storage.delete2') });
|
const ok = await confirm({ title: i18n.t('monitor.deleteRule'), description: i18n.t('monitor.deleteRuleConfirmDesc', { name: rule.name }), variant: 'destructive', confirmText: i18n.t('kubernetes.storage.delete2') });
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
try {
|
try {
|
||||||
await alertApi.deleteRule(rule.id);
|
await alertApi.deleteRule(rule.id);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export function LogDatasourcePage() {
|
|||||||
// 已保存数据源通过 datasource_id 测试,避免密码丢失或前端暴露密码。// Logan.Li
|
// 已保存数据源通过 datasource_id 测试,避免密码丢失或前端暴露密码。// Logan.Li
|
||||||
const result: TestConnectionResult = await logCenterApi.testDatasource({ datasource_id: ds.id });
|
const result: TestConnectionResult = await logCenterApi.testDatasource({ datasource_id: ds.id });
|
||||||
if (result.status === 'ok') {
|
if (result.status === 'ok') {
|
||||||
toast({ title: i18n.t('aiops.llmTestSuccess'), description: `${ds.name} 可达` });
|
toast({ title: i18n.t('aiops.llmTestSuccess'), description: `${ds.name} ${i18n.t('aiops.reachable')}` });
|
||||||
} else {
|
} else {
|
||||||
toast({ title: i18n.t('aiops.llmTestFailed'), description: result.error || i18n.t('monitor.dashboard.agent.toast.unknownError'), variant: 'destructive' });
|
toast({ title: i18n.t('aiops.llmTestFailed'), description: result.error || i18n.t('monitor.dashboard.agent.toast.unknownError'), variant: 'destructive' });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export function ServerFileBrowser({ open, onOpenChange, serverId, serverName }:
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleDelete = async (filePath: string, isDir: boolean) => {
|
const handleDelete = async (filePath: string, isDir: boolean) => {
|
||||||
if (!serverId || !confirm(`确认删除 ${isDir ? i18n.t('server.fileBrowser2.directory') : i18n.t('k8s.pods.action.file')} "${filePath}"?`)) return;
|
if (!serverId || !confirm(i18n.t('common.confirmDeleteType', { type: isDir ? i18n.t('server.fileBrowser2.directory') : i18n.t('k8s.pods.action.file'), name: filePath }))) return;
|
||||||
try {
|
try {
|
||||||
await serverApi.deleteFile(serverId, filePath);
|
await serverApi.deleteFile(serverId, filePath);
|
||||||
await fetchDir(currentPath);
|
await fetchDir(currentPath);
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export function useLdapManagement(onUsersChanged: () => Promise<void> | void) {
|
|||||||
/** 删除 LDAP 条目 // Logan.Li */
|
/** 删除 LDAP 条目 // Logan.Li */
|
||||||
const handleDeleteLDAPEntry = async (dn: string, silent = false) => {
|
const handleDeleteLDAPEntry = async (dn: string, silent = false) => {
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
const ok = await confirm({ title: i18n.t('system.ldapMgmt.deleteEntry'), description: `确定删除 ${dn}?`, confirmText: i18n.t('kubernetes.storage.delete2'), variant: 'destructive' });
|
const ok = await confirm({ title: i18n.t('system.ldapMgmt.deleteEntry'), description: i18n.t('system.ldapMgmt.deleteEntryDesc', { dn }), confirmText: i18n.t('kubernetes.storage.delete2'), variant: 'destructive' });
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -616,7 +616,12 @@
|
|||||||
"yesterday": "Yesterday",
|
"yesterday": "Yesterday",
|
||||||
"zone": "Zone",
|
"zone": "Zone",
|
||||||
"zoomIn": "Zoom In",
|
"zoomIn": "Zoom In",
|
||||||
"zoomOut": "Zoom Out"
|
"zoomOut": "Zoom Out",
|
||||||
|
"lineSuffix": "lines",
|
||||||
|
"currentValue": "current value",
|
||||||
|
"memberCount": "{{count}} members",
|
||||||
|
"fillIfMultiContainer": "(required for multi-container)",
|
||||||
|
"confirmDeleteType": "Delete {{type}} \"{{name}}\"?"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"aiAgentCli": "Agent CLI",
|
"aiAgentCli": "Agent CLI",
|
||||||
@@ -2135,7 +2140,8 @@
|
|||||||
"subtitle": "Assign release permissions by pipeline code / job name regex",
|
"subtitle": "Assign release permissions by pipeline code / job name regex",
|
||||||
"noPolicy": "No job permission policies",
|
"noPolicy": "No job permission policies",
|
||||||
"createHint": "After creating a policy, users will automatically get access to matching pipelines via regex"
|
"createHint": "After creating a policy, users will automatically get access to matching pipelines via regex"
|
||||||
}
|
},
|
||||||
|
"deleteGroupDesc": "Delete \"{{name}}\"? All members and pipeline grants will be removed."
|
||||||
},
|
},
|
||||||
"rdpPassword": "Windows Password",
|
"rdpPassword": "Windows Password",
|
||||||
"rdpPasswordPlaceholder": "Windows login password",
|
"rdpPasswordPlaceholder": "Windows login password",
|
||||||
@@ -2972,7 +2978,9 @@
|
|||||||
"saved": "Storage configuration saved",
|
"saved": "Storage configuration saved",
|
||||||
"namePlaceholder": "e.g. app-logs / fluent-bit-config",
|
"namePlaceholder": "e.g. app-logs / fluent-bit-config",
|
||||||
"mountPathPlaceholder": "Mount path /bitcloud/app/.../logs",
|
"mountPathPlaceholder": "Mount path /bitcloud/app/.../logs",
|
||||||
"typeRequiredHint": " type required field"
|
"typeRequiredHint": " type required field",
|
||||||
|
"incompleteConfigDesc": "Please {{hint}} for \"{{name}}\"",
|
||||||
|
"mountPathRequiredDesc": "Volume \"{{name}}\" must be mounted to at least one container"
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
"nodes": "No node data",
|
"nodes": "No node data",
|
||||||
@@ -3621,7 +3629,8 @@
|
|||||||
"desiredSchedule": "Desired Schedule",
|
"desiredSchedule": "Desired Schedule",
|
||||||
"serviceName": "Service Name",
|
"serviceName": "Service Name",
|
||||||
"podCount": "Pod Count",
|
"podCount": "Pod Count",
|
||||||
"actualSchedule": "Actual Schedule"
|
"actualSchedule": "Actual Schedule",
|
||||||
|
"restartSentDesc": "{{kind}} rolling restart triggered"
|
||||||
},
|
},
|
||||||
"workloads": {
|
"workloads": {
|
||||||
"scaleSuccess": "Scaling succeeded",
|
"scaleSuccess": "Scaling succeeded",
|
||||||
@@ -3635,7 +3644,8 @@
|
|||||||
"noDeployment": "No Deployments",
|
"noDeployment": "No Deployments",
|
||||||
"decreaseReplica": "Decrease replicas",
|
"decreaseReplica": "Decrease replicas",
|
||||||
"increaseReplica": "Increase replicas",
|
"increaseReplica": "Increase replicas",
|
||||||
"noPod": "No Pods"
|
"noPod": "No Pods",
|
||||||
|
"scaleSuccessDesc": "StatefulSet replicas updated to {{count}}"
|
||||||
},
|
},
|
||||||
"yamlImport": {
|
"yamlImport": {
|
||||||
"empty": "Please enter YAML",
|
"empty": "Please enter YAML",
|
||||||
@@ -5193,7 +5203,8 @@
|
|||||||
"prevPage": "Prev",
|
"prevPage": "Prev",
|
||||||
"nextPage": "Next"
|
"nextPage": "Next"
|
||||||
},
|
},
|
||||||
"zookeeper": "ZooKeeper"
|
"zookeeper": "ZooKeeper",
|
||||||
|
"deleteRuleConfirmDesc": "Delete \"{{name}}\"?"
|
||||||
},
|
},
|
||||||
"task": {
|
"task": {
|
||||||
"cronJob": {
|
"cronJob": {
|
||||||
@@ -6554,7 +6565,8 @@
|
|||||||
"varValue": "Variable Value",
|
"varValue": "Variable Value",
|
||||||
"variables": "Variables",
|
"variables": "Variables",
|
||||||
"viewer": "Viewer",
|
"viewer": "Viewer",
|
||||||
"webhookTrigger": "Webhook"
|
"webhookTrigger": "Webhook",
|
||||||
|
"removeMemberDesc": "Remove \"{{username}}\" from group?"
|
||||||
},
|
},
|
||||||
"automation": {
|
"automation": {
|
||||||
"addCronJob": "Add Cron Job",
|
"addCronJob": "Add Cron Job",
|
||||||
@@ -7401,7 +7413,8 @@
|
|||||||
"updateFailed": "Update failed",
|
"updateFailed": "Update failed",
|
||||||
"verifyFailed": "Verification failed",
|
"verifyFailed": "Verification failed",
|
||||||
"selectUsers": "Please select at least one user",
|
"selectUsers": "Please select at least one user",
|
||||||
"importFailed": "Import failed: "
|
"importFailed": "Import failed: ",
|
||||||
|
"deleteEntryDesc": "Delete {{dn}}?"
|
||||||
},
|
},
|
||||||
"ldapOu": "Org Unit (OU)",
|
"ldapOu": "Org Unit (OU)",
|
||||||
"ldapPassword": "Admin Password",
|
"ldapPassword": "Admin Password",
|
||||||
@@ -8359,7 +8372,8 @@
|
|||||||
"zhipuCodingHint": "Requires a separate coding plan via the Anthropic protocol; the key is not interchangeable with general GLM",
|
"zhipuCodingHint": "Requires a separate coding plan via the Anthropic protocol; the key is not interchangeable with general GLM",
|
||||||
"zhipuGeneral": "Zhipu GLM (General)",
|
"zhipuGeneral": "Zhipu GLM (General)",
|
||||||
"zhipuGetKey": "Register a Zhipu account and enable model services to get an API Key",
|
"zhipuGetKey": "Register a Zhipu account and enable model services to get an API Key",
|
||||||
"zhipuOpenPlatform": "Zhipu Open Platform"
|
"zhipuOpenPlatform": "Zhipu Open Platform",
|
||||||
|
"reachable": "reachable"
|
||||||
},
|
},
|
||||||
"breadcrumb": {
|
"breadcrumb": {
|
||||||
"aiAlertAnalyzer": "Alert Analysis",
|
"aiAlertAnalyzer": "Alert Analysis",
|
||||||
|
|||||||
@@ -616,7 +616,12 @@
|
|||||||
"yesterday": "昨天",
|
"yesterday": "昨天",
|
||||||
"zone": "可用区",
|
"zone": "可用区",
|
||||||
"zoomIn": "放大",
|
"zoomIn": "放大",
|
||||||
"zoomOut": "缩小"
|
"zoomOut": "缩小",
|
||||||
|
"lineSuffix": "行",
|
||||||
|
"currentValue": "当前值",
|
||||||
|
"memberCount": "{{count}} 位成员",
|
||||||
|
"fillIfMultiContainer": "(多容器时填写)",
|
||||||
|
"confirmDeleteType": "确认删除 {{type}} \"{{name}}\"?"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"aiAgentCli": "Agent CLI",
|
"aiAgentCli": "Agent CLI",
|
||||||
@@ -2135,7 +2140,8 @@
|
|||||||
"subtitle": "按流水线 code / Job 名称正则分配发布权限",
|
"subtitle": "按流水线 code / Job 名称正则分配发布权限",
|
||||||
"noPolicy": "暂无 Job 权限策略",
|
"noPolicy": "暂无 Job 权限策略",
|
||||||
"createHint": "创建策略后,用户将按正则自动获得匹配流水线的访问权限"
|
"createHint": "创建策略后,用户将按正则自动获得匹配流水线的访问权限"
|
||||||
}
|
},
|
||||||
|
"deleteGroupDesc": "确定删除「{{name}}」?所有成员和流水线授权将同时移除。"
|
||||||
},
|
},
|
||||||
"rdpPassword": "Windows 密码",
|
"rdpPassword": "Windows 密码",
|
||||||
"rdpPasswordPlaceholder": "Windows 登录密码",
|
"rdpPasswordPlaceholder": "Windows 登录密码",
|
||||||
@@ -2972,7 +2978,9 @@
|
|||||||
"saved": "存储配置已保存",
|
"saved": "存储配置已保存",
|
||||||
"namePlaceholder": "如 app-logs / fluent-bit-config",
|
"namePlaceholder": "如 app-logs / fluent-bit-config",
|
||||||
"mountPathPlaceholder": "挂载路径 /bitcloud/app/.../logs",
|
"mountPathPlaceholder": "挂载路径 /bitcloud/app/.../logs",
|
||||||
"typeRequiredHint": "的类型必填项"
|
"typeRequiredHint": "的类型必填项",
|
||||||
|
"incompleteConfigDesc": "请为「{{name}}」{{hint}}",
|
||||||
|
"mountPathRequiredDesc": "数据卷「{{name}}」需至少挂载到一个容器"
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
"nodes": "暂无节点数据",
|
"nodes": "暂无节点数据",
|
||||||
@@ -3621,7 +3629,8 @@
|
|||||||
"desiredSchedule": "期望调度",
|
"desiredSchedule": "期望调度",
|
||||||
"serviceName": "服务名",
|
"serviceName": "服务名",
|
||||||
"podCount": "Pod 数量",
|
"podCount": "Pod 数量",
|
||||||
"actualSchedule": "当前调度"
|
"actualSchedule": "当前调度",
|
||||||
|
"restartSentDesc": "{{kind}} 滚动重启已触发"
|
||||||
},
|
},
|
||||||
"workloads": {
|
"workloads": {
|
||||||
"scaleSuccess": "扩缩容成功",
|
"scaleSuccess": "扩缩容成功",
|
||||||
@@ -3635,7 +3644,8 @@
|
|||||||
"noDeployment": "暂无 Deployment",
|
"noDeployment": "暂无 Deployment",
|
||||||
"decreaseReplica": "减少副本",
|
"decreaseReplica": "减少副本",
|
||||||
"increaseReplica": "增加副本",
|
"increaseReplica": "增加副本",
|
||||||
"noPod": "暂无 Pod"
|
"noPod": "暂无 Pod",
|
||||||
|
"scaleSuccessDesc": "StatefulSet 副本数已更新为 {{count}}"
|
||||||
},
|
},
|
||||||
"yamlImport": {
|
"yamlImport": {
|
||||||
"empty": "请输入 YAML",
|
"empty": "请输入 YAML",
|
||||||
@@ -5193,7 +5203,8 @@
|
|||||||
"prevPage": "上一页",
|
"prevPage": "上一页",
|
||||||
"nextPage": "下一页"
|
"nextPage": "下一页"
|
||||||
},
|
},
|
||||||
"zookeeper": "ZooKeeper"
|
"zookeeper": "ZooKeeper",
|
||||||
|
"deleteRuleConfirmDesc": "删除「{{name}}」?"
|
||||||
},
|
},
|
||||||
"task": {
|
"task": {
|
||||||
"cronJob": {
|
"cronJob": {
|
||||||
@@ -6554,7 +6565,8 @@
|
|||||||
"varValue": "变量值",
|
"varValue": "变量值",
|
||||||
"variables": "变量",
|
"variables": "变量",
|
||||||
"viewer": "查看者",
|
"viewer": "查看者",
|
||||||
"webhookTrigger": "Webhook 触发"
|
"webhookTrigger": "Webhook 触发",
|
||||||
|
"removeMemberDesc": "确定从组中移除「{{username}}」?"
|
||||||
},
|
},
|
||||||
"automation": {
|
"automation": {
|
||||||
"addCronJob": "添加定时任务",
|
"addCronJob": "添加定时任务",
|
||||||
@@ -7401,7 +7413,8 @@
|
|||||||
"updateFailed": "修改失败",
|
"updateFailed": "修改失败",
|
||||||
"verifyFailed": "验证失败",
|
"verifyFailed": "验证失败",
|
||||||
"selectUsers": "请至少选择一个用户",
|
"selectUsers": "请至少选择一个用户",
|
||||||
"importFailed": "导入失败: "
|
"importFailed": "导入失败: ",
|
||||||
|
"deleteEntryDesc": "确定删除 {{dn}}?"
|
||||||
},
|
},
|
||||||
"ldapOu": "组织单元(OU)",
|
"ldapOu": "组织单元(OU)",
|
||||||
"ldapPassword": "管理员密码",
|
"ldapPassword": "管理员密码",
|
||||||
@@ -8359,7 +8372,8 @@
|
|||||||
"zhipuCodingHint": "需单独购买编码套餐,走 Anthropic 协议;Key 与通用 GLM 不互通",
|
"zhipuCodingHint": "需单独购买编码套餐,走 Anthropic 协议;Key 与通用 GLM 不互通",
|
||||||
"zhipuGeneral": "智谱 GLM (通用)",
|
"zhipuGeneral": "智谱 GLM (通用)",
|
||||||
"zhipuGetKey": "注册智谱账号并开通模型服务后获取 API Key",
|
"zhipuGetKey": "注册智谱账号并开通模型服务后获取 API Key",
|
||||||
"zhipuOpenPlatform": "智谱开放平台"
|
"zhipuOpenPlatform": "智谱开放平台",
|
||||||
|
"reachable": "可达"
|
||||||
},
|
},
|
||||||
"breadcrumb": {
|
"breadcrumb": {
|
||||||
"aiAlertAnalyzer": "告警分析",
|
"aiAlertAnalyzer": "告警分析",
|
||||||
|
|||||||
Reference in new issue
Block a user