refactor(i18n): U32 全量 hash key 清理 — 151 个 hash key → 语义化键 + React Hooks 警告 53→43
- 151 个 hash-style flat key (s+hex 后缀) 全部重命名为语义化 nested key
- monitor 58 个: alertChannelDialog/alertManager/alertRulesTab/chartRangeHint/
esIndexPicker/helpers/hostMonitor/logAlertSpanel/logClusterPanel/logDingAssistant/
logQueryToolbar/logRbac/lokiLabelBrowse/metricsExplorer/middlewareMonit/
mwOverviewChart/portPolicyDialog/prometheusDashb/queryHistoryPan/savedQueriesPan/
siteMonitor/snmpMonitor/snmpOverviewChart/zabbixDashboard/zabbixDatasource
- kubernetes 42 个: deploymentBundle/deploymentEditAdvanced/deploymentEditService/
deploymentView/deploymentWorkload/eventsPage/kubernetesCluster/namespaceManage/
namespaceResource/podExecTerminal/podFileBrowser/podLogsViewer/podMetricsPage/
resourceVisualEditor/workloadViewPage
- aiops 17 个: agentCliMessage/aiAnalysisResult/analyzerHelpers/assistant/predictUtils
- agent 12 个: agentAlerts/agentMonitor/hostDetailDialog
- cloud 13 个: billingRecordDialog/billingRuleDialog/platformManager
- pipeline 6 个: buildNodesManage/deployRbac/deployTargetField
- system 3 个: auditSetting
- 58 个源文件中的 147 处 t()/i18n.t() 调用更新为语义化键路径
- 3 个命名空间冲突修复 (monitor.hostMonitor/agent.agentMonitor/aiops.aiAnalysisResult
原 string 值提升为 .title 子键)
- React Hooks 警告修复 (53→43, -10):
- exhaustive-deps 4→0: useMemo/useCallback 添加 t 到 deps 数组
- preserve-manual-memoization 5→0: 变量遮蔽修复 (filter(t)→filter(tg))
- 1 个冗余 eslint-disable 指令移除 (CronJobManager)
- zh/en 7480=7480 完全对齐, 0 个 hash key 残留
- tsc -b=0, npm build✓ (17.59s), ESLint errors=0/warnings=43/any=0
- go build=0, 17/17 集成测试通过, Docker healthy
This commit is contained in:
1 parent
4f2d279865
commit
ff426d908b
63 files changed
+674
-477
No files matched your search
@@ -218,7 +218,7 @@ export const aiApi = {
|
|||||||
useUserStore.getState().logout();
|
useUserStore.getState().logout();
|
||||||
throw new Error(i18n.t('common.request.tokenExpired'));
|
throw new Error(i18n.t('common.request.tokenExpired'));
|
||||||
}
|
}
|
||||||
if (!res.body) throw new Error(i18n.t('aiops.assistantts.s16f94bee'));
|
if (!res.body) throw new Error(i18n.t('aiops.assistant.streamUnavailable'));
|
||||||
const reader = res.body.getReader();
|
const reader = res.body.getReader();
|
||||||
const decoder = new TextDecoder('utf-8');
|
const decoder = new TextDecoder('utf-8');
|
||||||
let buffer = '';
|
let buffer = '';
|
||||||
@@ -244,10 +244,10 @@ export const aiApi = {
|
|||||||
// {code, message}
|
// {code, message}
|
||||||
try {
|
try {
|
||||||
const obj = JSON.parse(data);
|
const obj = JSON.parse(data);
|
||||||
throw new Error(obj.message || i18n.t('aiops.assistantts.sfeeaa489'));
|
throw new Error(obj.message || i18n.t('aiops.assistant.streamError'));
|
||||||
} catch (parseErr) {
|
} catch (parseErr) {
|
||||||
if (parseErr instanceof Error && parseErr.message) throw parseErr;
|
if (parseErr instanceof Error && parseErr.message) throw parseErr;
|
||||||
throw new Error(i18n.t('aiops.assistantts.sfeeaa489'));
|
throw new Error(i18n.t('aiops.assistant.streamError'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (eventType === 'done') {
|
if (eventType === 'done') {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export function AgentAlerts() {
|
|||||||
|
|
||||||
<Tabs value={activeTab} onValueChange={setActiveTab} className="w-full">
|
<Tabs value={activeTab} onValueChange={setActiveTab} className="w-full">
|
||||||
<TabsList className="bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)]">
|
<TabsList className="bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)]">
|
||||||
<TabsTrigger value="events" className="data-[state=active]:bg-[var(--dg-bg-active)]"> {i18n.t('kubernetes.eventspagetsx.s0e5b83cc')} </TabsTrigger>
|
<TabsTrigger value="events" className="data-[state=active]:bg-[var(--dg-bg-active)]"> {i18n.t('kubernetes.eventsPage.alertEvents')} </TabsTrigger>
|
||||||
<TabsTrigger value="rules" className="data-[state=active]:bg-[var(--dg-bg-active)]"> {i18n.t('monitor.alertRules')} </TabsTrigger>
|
<TabsTrigger value="rules" className="data-[state=active]:bg-[var(--dg-bg-active)]"> {i18n.t('monitor.alertRules')} </TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
|
|
||||||
@@ -185,11 +185,11 @@ export function AgentAlerts() {
|
|||||||
{alert.hostname || '--'}
|
{alert.hostname || '--'}
|
||||||
</span>
|
</span>
|
||||||
<span className="inline-flex items-center gap-1">
|
<span className="inline-flex items-center gap-1">
|
||||||
<span className="dg-text-secondary"> {i18n.t('agent.agentalertstsx.sbfdcf242')} </span> {getMetricLabel(alert.metric)}
|
<span className="dg-text-secondary"> {i18n.t('agent.agentAlerts.metric')} </span> {getMetricLabel(alert.metric)}
|
||||||
</span>
|
</span>
|
||||||
{alert.value != null && (
|
{alert.value != null && (
|
||||||
<span className="inline-flex items-center gap-1">
|
<span className="inline-flex items-center gap-1">
|
||||||
<span className="dg-text-secondary"> {i18n.t('agent.agentalertstsx.s2d13763b')} </span> {alert.value}
|
<span className="dg-text-secondary"> {i18n.t('agent.agentAlerts.currentValue')} </span> {alert.value}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<span className="inline-flex items-center gap-1">
|
<span className="inline-flex items-center gap-1">
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ export function AgentMonitor() {
|
|||||||
{/* 页头 */}
|
{/* 页头 */}
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-xl font-semibold text-[var(--dg-text-primary)]">{t("agent.agentmonitortsx.s1a2b3c4d")}</h2>
|
<h2 className="text-xl font-semibold text-[var(--dg-text-primary)]">{t("agent.agentMonitor.title")}</h2>
|
||||||
<p className="text-sm dg-text-secondary mt-0.5"> {i18n.t('agent.agentmonitortsx.sa75d7519')} </p>
|
<p className="text-sm dg-text-secondary mt-0.5"> {i18n.t('agent.agentMonitor.subtitle')} </p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export function HostDetailDialog({
|
|||||||
<Badge className="bg-red-500/15 dg-text-red border border-red-500/30"> {i18n.t('agent.agentOffline')} </Badge>
|
<Badge className="bg-red-500/15 dg-text-red border border-red-500/30"> {i18n.t('agent.agentOffline')} </Badge>
|
||||||
)}
|
)}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogDescription className="sr-only"> {i18n.t('agent.hostdetaildialo.sffa4f720')} </DialogDescription>
|
<DialogDescription className="sr-only"> {i18n.t('agent.hostDetailDialog.desc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
@@ -109,9 +109,9 @@ export function HostDetailDialog({
|
|||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent className="dg-input">
|
<SelectContent className="dg-input">
|
||||||
<SelectItem value="1"> {i18n.t('agent.hostdetaildialo.s3851af2c')} </SelectItem>
|
<SelectItem value="1"> {i18n.t('agent.hostDetailDialog.last1h')} </SelectItem>
|
||||||
<SelectItem value="6"> {i18n.t('agent.hostdetaildialo.s2d59b172')} </SelectItem>
|
<SelectItem value="6"> {i18n.t('agent.hostDetailDialog.last6h')} </SelectItem>
|
||||||
<SelectItem value="24"> {i18n.t('agent.hostdetaildialo.s768a1b34')} </SelectItem>
|
<SelectItem value="24"> {i18n.t('agent.hostDetailDialog.last24h')} </SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
@@ -121,7 +121,7 @@ export function HostDetailDialog({
|
|||||||
<Loader2 className="h-5 w-5 animate-spin dg-text-muted" />
|
<Loader2 className="h-5 w-5 animate-spin dg-text-muted" />
|
||||||
</div>
|
</div>
|
||||||
) : chartData.length === 0 ? (
|
) : chartData.length === 0 ? (
|
||||||
<div className="h-full flex items-center justify-center text-sm dg-text-muted"> {i18n.t('agent.hostdetaildialo.sdc73dbe9')} </div>
|
<div className="h-full flex items-center justify-center text-sm dg-text-muted"> {i18n.t('agent.hostDetailDialog.noHistoryData')} </div>
|
||||||
) : (
|
) : (
|
||||||
<ResponsiveContainer width="100%" height="100%">
|
<ResponsiveContainer width="100%" height="100%">
|
||||||
<AreaChart data={chartData} margin={{ top: 5, right: 5, bottom: 0, left: -20 }}>
|
<AreaChart data={chartData} margin={{ top: 5, right: 5, bottom: 0, left: -20 }}>
|
||||||
@@ -161,7 +161,7 @@ export function HostDetailDialog({
|
|||||||
端口发现 ({ports.length})
|
端口发现 ({ports.length})
|
||||||
</span>
|
</span>
|
||||||
{ports.length === 0 ? (
|
{ports.length === 0 ? (
|
||||||
<p className="text-xs dg-text-muted"> {i18n.t('agent.hostdetaildialo.se7887d60')} </p>
|
<p className="text-xs dg-text-muted"> {i18n.t('agent.hostDetailDialog.noPortData')} </p>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-wrap gap-1.5 max-h-32 overflow-y-auto">
|
<div className="flex flex-wrap gap-1.5 max-h-32 overflow-y-auto">
|
||||||
{ports.map((p, idx) => (
|
{ports.map((p, idx) => (
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function AIAnalysisResult({ selectedAlert, isAnalyzing, analysis, onAutoF
|
|||||||
<CardHeader className="border-b border-[var(--dg-border)] pb-3">
|
<CardHeader className="border-b border-[var(--dg-border)] pb-3">
|
||||||
<CardTitle className="text-[var(--dg-text-primary)] flex items-center gap-2">
|
<CardTitle className="text-[var(--dg-text-primary)] flex items-center gap-2">
|
||||||
<Sparkles className="h-5 w-5 dg-text-purple" />
|
<Sparkles className="h-5 w-5 dg-text-purple" />
|
||||||
{i18n.t('aiops.aiAnalysisResult')}
|
{i18n.t('aiops.aiAnalysisResult.title')}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<ScrollArea className="flex-1">
|
<ScrollArea className="flex-1">
|
||||||
@@ -28,13 +28,13 @@ export function AIAnalysisResult({ selectedAlert, isAnalyzing, analysis, onAutoF
|
|||||||
{!selectedAlert ? (
|
{!selectedAlert ? (
|
||||||
<div className="flex flex-col items-center justify-center h-64 dg-text-muted">
|
<div className="flex flex-col items-center justify-center h-64 dg-text-muted">
|
||||||
<Brain className="h-16 w-16 mb-4 opacity-30" />
|
<Brain className="h-16 w-16 mb-4 opacity-30" />
|
||||||
<p> {i18n.t('aiops.aianalysisresul.s52bbd52d')} </p>
|
<p> {i18n.t('aiops.aiAnalysisResult.selectAlertHint')} </p>
|
||||||
</div>
|
</div>
|
||||||
) : isAnalyzing ? (
|
) : isAnalyzing ? (
|
||||||
<div className="flex flex-col items-center justify-center h-64">
|
<div className="flex flex-col items-center justify-center h-64">
|
||||||
<Loader2 className="h-8 w-8 animate-spin dg-text-purple mb-4" />
|
<Loader2 className="h-8 w-8 animate-spin dg-text-purple mb-4" />
|
||||||
<p className="dg-text-secondary">{i18n.t('aiops.analyzingRootCause')}</p>
|
<p className="dg-text-secondary">{i18n.t('aiops.analyzingRootCause')}</p>
|
||||||
<p className="text-xs dg-text-muted mt-2"> {i18n.t('aiops.aianalysisresul.sf7d04a0f')} </p>
|
<p className="text-xs dg-text-muted mt-2"> {i18n.t('aiops.aiAnalysisResult.correlatingHint')} </p>
|
||||||
</div>
|
</div>
|
||||||
) : analysis ? (
|
) : analysis ? (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ function ThoughtBlock({
|
|||||||
{open ? <ChevronDown className="w-3.5 h-3.5" /> : <ChevronRight className="w-3.5 h-3.5" />}
|
{open ? <ChevronDown className="w-3.5 h-3.5" /> : <ChevronRight className="w-3.5 h-3.5" />}
|
||||||
<Brain className="w-3.5 h-3.5 dg-text-purple" />
|
<Brain className="w-3.5 h-3.5 dg-text-purple" />
|
||||||
{!hideRoundLabel && round != null && <span className="dg-text-muted">{i18n.t('aiops.roundThinking', { round })}</span>}
|
{!hideRoundLabel && round != null && <span className="dg-text-muted">{i18n.t('aiops.roundThinking', { round })}</span>}
|
||||||
{hideRoundLabel && <span className="dg-text-muted"> {i18n.t('aiops.agentclimessage.s21d68b2d')} </span>}
|
{hideRoundLabel && <span className="dg-text-muted"> {i18n.t('aiops.agentCliMessage.thinking')} </span>}
|
||||||
{streaming && <Loader2 className="w-3 h-3 dg-text-purple animate-spin" />}
|
{streaming && <Loader2 className="w-3 h-3 dg-text-purple animate-spin" />}
|
||||||
<span className="ml-1 dg-text-muted truncate">{!open && preview}</span>
|
<span className="ml-1 dg-text-muted truncate">{!open && preview}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export function generateAIAnalysis(alert: AlertItem): AIAnalysis {
|
|||||||
`考虑临时扩容或将部分流量调度到其他节点`,
|
`考虑临时扩容或将部分流量调度到其他节点`,
|
||||||
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
||||||
],
|
],
|
||||||
autoFixScript: `#!/bin/bash\n# CPU 高负载诊断脚本 - ${target}\necho "${i18n.t('aiops.analysis.topCpuProcess')}"\nps aux --sort=-%cpu | head -11\necho ""\necho "${i18n.t('aiops.analyzerhelpers.sc4e238d7')}"\nuptime\necho ""\necho "${i18n.t('aiops.analyzerhelpers.sfaca56f5')}"\nPID=$(ps aux --sort=-%cpu | sed -n '2p' | awk '{print $2}')\nif [ -n "$PID" ]; then\n echo "${i18n.t('aiops.analyzerhelpers.s303a9855')}"\n cat /proc/$PID/cmdline | tr '\\0' ' '\n echo ""\nfi\n`,
|
autoFixScript: `#!/bin/bash\n# CPU 高负载诊断脚本 - ${target}\necho "${i18n.t('aiops.analysis.topCpuProcess')}"\nps aux --sort=-%cpu | head -11\necho ""\necho "${i18n.t('aiops.analyzerHelpers.systemLoad')}"\nuptime\necho ""\necho "${i18n.t('aiops.analyzerHelpers.highCpuProcessDetail')}"\nPID=$(ps aux --sort=-%cpu | sed -n '2p' | awk '{print $2}')\nif [ -n "$PID" ]; then\n echo "${i18n.t('aiops.analyzerHelpers.topCpuProcess')}"\n cat /proc/$PID/cmdline | tr '\\0' ' '\n echo ""\nfi\n`,
|
||||||
similarCases: 0,
|
similarCases: 0,
|
||||||
confidence: 0,
|
confidence: 0,
|
||||||
};
|
};
|
||||||
@@ -90,7 +90,7 @@ export function generateAIAnalysis(alert: AlertItem): AIAnalysis {
|
|||||||
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
||||||
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
||||||
],
|
],
|
||||||
autoFixScript: `#!/bin/bash\n# 磁盘清理脚本 - ${target}\necho "${i18n.t('aiops.analyzerhelpers.s5b91c16b')}"\ndf -h /\necho ""\necho "${i18n.t('aiops.analyzerhelpers.s3b1993da')}"\nfind /var/log -name "*.log" -mtime +30 -delete 2>/dev/null\nfind /var/log -name "*.gz" -mtime +30 -delete 2>/dev/null\necho ""\necho "${i18n.t('aiops.analyzerhelpers.sb513e117')}"\njournalctl --vacuum-time=7d 2>/dev/null\necho ""\necho "${i18n.t('aiops.analyzerhelpers.s4c139c9f')}"\ndf -h /\n`,
|
autoFixScript: `#!/bin/bash\n# 磁盘清理脚本 - ${target}\necho "${i18n.t('aiops.analyzerHelpers.diskBeforeClean')}"\ndf -h /\necho ""\necho "${i18n.t('aiops.analyzerHelpers.cleanOldLogs')}"\nfind /var/log -name "*.log" -mtime +30 -delete 2>/dev/null\nfind /var/log -name "*.gz" -mtime +30 -delete 2>/dev/null\necho ""\necho "${i18n.t('aiops.analyzerHelpers.cleanSystemCache')}"\njournalctl --vacuum-time=7d 2>/dev/null\necho ""\necho "${i18n.t('aiops.analyzerHelpers.diskAfterClean')}"\ndf -h /\n`,
|
||||||
similarCases: 0,
|
similarCases: 0,
|
||||||
confidence: 0,
|
confidence: 0,
|
||||||
};
|
};
|
||||||
@@ -127,7 +127,7 @@ export function generateAIAnalysis(alert: AlertItem): AIAnalysis {
|
|||||||
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
||||||
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
i18n.t('aiops.analysis.checkAbnormalTasks'),
|
||||||
],
|
],
|
||||||
autoFixScript: `#!/bin/bash\n# 服务恢复脚本 - ${target}\necho "${i18n.t('aiops.analyzerhelpers.se59337b9')}"\nsystemctl list-units --state=failed\necho ""\necho "${i18n.t('aiops.analyzerhelpers.scdd631f0')}"\nss -tlnp | grep -E ':(80|443|8080|3306|6379|9090)'\necho ""\necho "${i18n.t('aiops.analyzerhelpers.sad3e7bba')}"\nsystemctl reset-failed\n`,
|
autoFixScript: `#!/bin/bash\n# 服务恢复脚本 - ${target}\necho "${i18n.t('aiops.analyzerHelpers.checkServiceStatus')}"\nsystemctl list-units --state=failed\necho ""\necho "${i18n.t('aiops.analyzerHelpers.checkPortListen')}"\nss -tlnp | grep -E ':(80|443|8080|3306|6379|9090)'\necho ""\necho "${i18n.t('aiops.analyzerHelpers.restartFailedService')}"\nsystemctl reset-failed\n`,
|
||||||
similarCases: 0,
|
similarCases: 0,
|
||||||
confidence: 0,
|
confidence: 0,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ export function costRecommendation(trend: 'up' | 'down' | 'stable', ratio: numbe
|
|||||||
function budgetRiskAction(metric: 'daily' | 'monthly', provider: string): string {
|
function budgetRiskAction(metric: 'daily' | 'monthly', provider: string): string {
|
||||||
const scope = provider && provider !== i18n.t('aiops.predictutilsts.sg5a3d8e1') ? `${provider} ` : '';
|
const scope = provider && provider !== i18n.t('aiops.predictutilsts.sg5a3d8e1') ? `${provider} ` : '';
|
||||||
if (metric === 'daily') {
|
if (metric === 'daily') {
|
||||||
return i18n.t('aiops.predictutilsts.se4b7a5d2', { scope });
|
return i18n.t('aiops.predictUtils.dailyCostHint', { scope });
|
||||||
}
|
}
|
||||||
return i18n.t('aiops.predictutilsts.sf2d8c6b4', { scope });
|
return i18n.t('aiops.predictUtils.monthlyBillHint', { scope });
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MonthEndForecast {
|
interface MonthEndForecast {
|
||||||
|
|||||||
@@ -93,12 +93,12 @@ export function BillingRecordDialog({ open, onOpenChange, editingRecord, onSucce
|
|||||||
<DialogContent className="max-w-md">
|
<DialogContent className="max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>{editingRecord ? i18n.t('cloud.billingRecordDialog.editRecord') : i18n.t('cloud.recordCost')}</DialogTitle>
|
<DialogTitle>{editingRecord ? i18n.t('cloud.billingRecordDialog.editRecord') : i18n.t('cloud.recordCost')}</DialogTitle>
|
||||||
<DialogDescription> {i18n.t('cloud.billingrecorddi.s09e541fd')} </DialogDescription>
|
<DialogDescription> {i18n.t('cloud.billingRecordDialog.desc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<div className="grid grid-cols-2 gap-3">
|
<div className="grid grid-cols-2 gap-3">
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingrecorddi.sb11d8416')} </Label>
|
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingRecordDialog.providerLabel')} </Label>
|
||||||
<Select value={form.provider} onValueChange={(v) => setForm({ ...form, provider: v })}>
|
<Select value={form.provider} onValueChange={(v) => setForm({ ...form, provider: v })}>
|
||||||
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
@@ -109,13 +109,13 @@ export function BillingRecordDialog({ open, onOpenChange, editingRecord, onSucce
|
|||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingrecorddi.s3abdefe2')} </Label>
|
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingRecordDialog.dateLabel')} </Label>
|
||||||
<Input type="date" className="mt-1" value={form.billing_date} onChange={(e) => setForm({ ...form, billing_date: e.target.value })} />
|
<Input type="date" className="mt-1" value={form.billing_date} onChange={(e) => setForm({ ...form, billing_date: e.target.value })} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-2 gap-3">
|
<div className="grid grid-cols-2 gap-3">
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingrecorddi.s6f252687')} </Label>
|
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingRecordDialog.costLabel')} </Label>
|
||||||
<Input type="number" step="0.01" className="mt-1" placeholder="0.00" value={form.cost} onChange={(e) => setForm({ ...form, cost: e.target.value })} />
|
<Input type="number" step="0.01" className="mt-1" placeholder="0.00" value={form.cost} onChange={(e) => setForm({ ...form, cost: e.target.value })} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export function BillingRuleDialog({ open, onOpenChange, editingRule, onSuccess }
|
|||||||
<DialogContent className="max-w-md">
|
<DialogContent className="max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>{editingRule ? i18n.t('cloud.billingRuleDialog.editRule') : i18n.t('cloud.billingRuleDialog.addRule')}</DialogTitle>
|
<DialogTitle>{editingRule ? i18n.t('cloud.billingRuleDialog.editRule') : i18n.t('cloud.billingRuleDialog.addRule')}</DialogTitle>
|
||||||
<DialogDescription> {i18n.t('cloud.billingruledial.s75227f20')} </DialogDescription>
|
<DialogDescription> {i18n.t('cloud.billingRuleDialog.desc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<div>
|
<div>
|
||||||
@@ -97,7 +97,7 @@ export function BillingRuleDialog({ open, onOpenChange, editingRule, onSuccess }
|
|||||||
<Select value={form.provider || 'all'} onValueChange={(v) => setForm({ ...form, provider: v === 'all' ? '' : v })}>
|
<Select value={form.provider || 'all'} onValueChange={(v) => setForm({ ...form, provider: v === 'all' ? '' : v })}>
|
||||||
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="all"> {i18n.t('cloud.billingruledial.sc356f198')} </SelectItem>
|
<SelectItem value="all"> {i18n.t('cloud.billingRuleDialog.allProviders')} </SelectItem>
|
||||||
{Object.entries(providerLabels).map(([k, v]) => (
|
{Object.entries(providerLabels).map(([k, v]) => (
|
||||||
<SelectItem key={k} value={k}>{v}</SelectItem>
|
<SelectItem key={k} value={k}>{v}</SelectItem>
|
||||||
))}
|
))}
|
||||||
@@ -117,19 +117,19 @@ export function BillingRuleDialog({ open, onOpenChange, editingRule, onSuccess }
|
|||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-2 gap-3">
|
<div className="grid grid-cols-2 gap-3">
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingruledial.sd7650ece')} </Label>
|
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingRuleDialog.compare')} </Label>
|
||||||
<Select value={form.operator} onValueChange={(v) => setForm({ ...form, operator: v })}>
|
<Select value={form.operator} onValueChange={(v) => setForm({ ...form, operator: v })}>
|
||||||
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="mt-1"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value=">"> {i18n.t('cloud.billingruledial.s3dba9756')} </SelectItem>
|
<SelectItem value=">"> {i18n.t('cloud.billingRuleDialog.gt')} </SelectItem>
|
||||||
<SelectItem value=">="> {i18n.t('cloud.billingruledial.s8e1e26d1')} </SelectItem>
|
<SelectItem value=">="> {i18n.t('cloud.billingRuleDialog.gte')} </SelectItem>
|
||||||
<SelectItem value="<"> {i18n.t('cloud.billingruledial.s0196c18c')} </SelectItem>
|
<SelectItem value="<"> {i18n.t('cloud.billingRuleDialog.lt')} </SelectItem>
|
||||||
<SelectItem value="<="> {i18n.t('cloud.billingruledial.s45c301a8')} </SelectItem>
|
<SelectItem value="<="> {i18n.t('cloud.billingRuleDialog.lte')} </SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingruledial.s11f9fb4c')} </Label>
|
<Label className="text-sm text-[var(--dg-text-secondary)]"> {i18n.t('cloud.billingRuleDialog.thresholdLabel')} </Label>
|
||||||
<Input type="number" step="0.01" className="mt-1" placeholder="500.00" value={form.threshold} onChange={(e) => setForm({ ...form, threshold: e.target.value })} />
|
<Input type="number" step="0.01" className="mt-1" placeholder="500.00" value={form.threshold} onChange={(e) => setForm({ ...form, threshold: e.target.value })} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ export function PlatformManager() {
|
|||||||
<DialogTitle> {i18n.t('k8s.actionModal.confirmDelete')} </DialogTitle>
|
<DialogTitle> {i18n.t('k8s.actionModal.confirmDelete')} </DialogTitle>
|
||||||
<DialogDescription className="sr-only"> {i18n.t('aiops.llmModelDesc')} </DialogDescription>
|
<DialogDescription className="sr-only"> {i18n.t('aiops.llmModelDesc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<p className="text-sm dg-text-secondary"> {i18n.t('cloud.platformmanager.s452abbb1')} </p>
|
<p className="text-sm dg-text-secondary"> {i18n.t('cloud.platformManager.deleteConfirm')} </p>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button variant="ghost" onClick={() => setDeleteId(null)}> {i18n.t('rbac.jobRole.cancel')} </Button>
|
<Button variant="ghost" onClick={() => setDeleteId(null)}> {i18n.t('rbac.jobRole.cancel')} </Button>
|
||||||
<Button variant="destructive" onClick={confirmDelete}> {i18n.t('kubernetes.storage.delete2')} </Button>
|
<Button variant="destructive" onClick={confirmDelete}> {i18n.t('kubernetes.storage.delete2')} </Button>
|
||||||
|
|||||||
@@ -202,13 +202,13 @@ export default function BuildNodesManager({ embedded = false }: { embedded?: boo
|
|||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Cpu className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
<Cpu className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
||||||
<span className="text-sm font-medium text-[var(--dg-text-primary)]">{i18n.t('deploy.buildNodes.masterBuiltin')}</span>
|
<span className="text-sm font-medium text-[var(--dg-text-primary)]">{i18n.t('deploy.buildNodes.masterBuiltin')}</span>
|
||||||
<Badge variant="outline" className="text-[10px]"> {i18n.t('pipeline.buildnodesmanag.sa419fe03')} </Badge>
|
<Badge variant="outline" className="text-[10px]"> {i18n.t('pipeline.buildNodesManage.defaultSchedule')} </Badge>
|
||||||
<span className="text-xs text-[var(--dg-text-muted)]">
|
<span className="text-xs text-[var(--dg-text-muted)]">
|
||||||
{i18n.t('deploy.buildNodes.executorUsage', { running: master.running_count, max: master.max_executors })}
|
{i18n.t('deploy.buildNodes.executorUsage', { running: master.running_count, max: master.max_executors })}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Label className="text-xs text-[var(--dg-text-muted)] shrink-0"> {i18n.t('pipeline.buildnodesmanag.s8e408e28')} </Label>
|
<Label className="text-xs text-[var(--dg-text-muted)] shrink-0"> {i18n.t('pipeline.buildNodesManage.maxConcurrency')} </Label>
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
min={1}
|
min={1}
|
||||||
@@ -308,11 +308,11 @@ export default function BuildNodesManager({ embedded = false }: { embedded?: boo
|
|||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-2 gap-2">
|
<div className="grid grid-cols-2 gap-2">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label className="text-xs"> {i18n.t('pipeline.buildnodesmanag.s8e408e28')} </Label>
|
<Label className="text-xs"> {i18n.t('pipeline.buildNodesManage.maxConcurrency')} </Label>
|
||||||
<Input value={maxExecutors} onChange={(e) => setMaxExecutors(e.target.value)} type="number" min={1} className="h-8 text-xs dg-input" />
|
<Input value={maxExecutors} onChange={(e) => setMaxExecutors(e.target.value)} type="number" min={1} className="h-8 text-xs dg-input" />
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label className="text-xs"> {i18n.t('pipeline.buildnodesmanag.sbcfcd088')} </Label>
|
<Label className="text-xs"> {i18n.t('pipeline.buildNodesManage.workspacePath')} </Label>
|
||||||
<Input value={workspacePath} onChange={(e) => setWorkspacePath(e.target.value)} className="h-8 text-xs font-mono dg-input" />
|
<Input value={workspacePath} onChange={(e) => setWorkspacePath(e.target.value)} className="h-8 text-xs font-mono dg-input" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ export default function DeployRBAC() {
|
|||||||
icon={<Shield className="h-10 w-10" />}
|
icon={<Shield className="h-10 w-10" />}
|
||||||
title={i18n.t('deploy.rbac.policy.noPolicy')}
|
title={i18n.t('deploy.rbac.policy.noPolicy')}
|
||||||
description={i18n.t('deploy.rbac.policy.createHint')}
|
description={i18n.t('deploy.rbac.policy.createHint')}
|
||||||
action={<Button onClick={() => setCreateOpen(true)}><Plus className="h-4 w-4 mr-1" /> {i18n.t('monitor.logrbactsx.s6058845c')} </Button>}
|
action={<Button onClick={() => setCreateOpen(true)}><Plus className="h-4 w-4 mr-1" /> {i18n.t('monitor.logRbac.newPermission')} </Button>}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@@ -313,7 +313,7 @@ export default function DeployRBAC() {
|
|||||||
</div>
|
</div>
|
||||||
{selectedUser ? (
|
{selectedUser ? (
|
||||||
assignments.length === 0 ? (
|
assignments.length === 0 ? (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deployrbactsx.sef9548ee')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deployRbac.noJobPermission')} </p>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1.5">
|
||||||
{assignments.map((a) => {
|
{assignments.map((a) => {
|
||||||
@@ -334,7 +334,7 @@ export default function DeployRBAC() {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)] flex items-center gap-1"><Users className="w-3.5 h-3.5" /> {i18n.t('monitor.logrbactsx.s9be00c95')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)] flex items-center gap-1"><Users className="w-3.5 h-3.5" /> {i18n.t('monitor.logRbac.selectUserHint')} </p>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -369,7 +369,7 @@ export default function DeployRBAC() {
|
|||||||
</Badge>
|
</Badge>
|
||||||
))}
|
))}
|
||||||
{previewRoleId !== null && previewMatches.length === 0 && (
|
{previewRoleId !== null && previewMatches.length === 0 && (
|
||||||
<span className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logrbactsx.s64096f4d')} </span>
|
<span className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logRbac.noMatchHint')} </span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ export function DeployTargetFields({ value, onChange, requireTarget = true }: De
|
|||||||
<Loader2 className="h-4 w-4 animate-spin mr-1.5" />加载中
|
<Loader2 className="h-4 w-4 animate-spin mr-1.5" />加载中
|
||||||
</div>
|
</div>
|
||||||
) : filteredServers.length === 0 ? (
|
) : filteredServers.length === 0 ? (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)] text-center py-8"> {i18n.t('pipeline.deploytargetfie.sb4240171')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)] text-center py-8"> {i18n.t('pipeline.deployTargetField.noHostAvailable')} </p>
|
||||||
) : (
|
) : (
|
||||||
<div className="p-1.5 space-y-1">
|
<div className="p-1.5 space-y-1">
|
||||||
{filteredServers.map((srv) => {
|
{filteredServers.map((srv) => {
|
||||||
@@ -242,7 +242,7 @@ export function DeployTargetFields({ value, onChange, requireTarget = true }: De
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
<p className="text-[10px] text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deploytargetfie.sb2b6db98')} </p>
|
<p className="text-[10px] text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deployTargetField.scpDeployHint')} </p>
|
||||||
<div className="grid grid-cols-2 gap-2">
|
<div className="grid grid-cols-2 gap-2">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label className="text-xs"> {i18n.t('kubernetes.container.containerName')} </Label>
|
<Label className="text-xs"> {i18n.t('kubernetes.container.containerName')} </Label>
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ export function DeploymentEditAdvanced({ clusterCode, namespace, deploymentName,
|
|||||||
};
|
};
|
||||||
const base = buildAdvancedManifest(rawManifest, state);
|
const base = buildAdvancedManifest(rawManifest, state);
|
||||||
await saveDeploymentManifest(clusterCode, namespace, deploymentName, base);
|
await saveDeploymentManifest(clusterCode, namespace, deploymentName, base);
|
||||||
toast({ title: i18n.t('kubernetes.deploymentedita.s9762d0a4'), description: `${deploymentName} 更新已提交` });
|
toast({ title: i18n.t('kubernetes.deploymentEditAdvanced.saved'), description: `${deploymentName} 更新已提交` });
|
||||||
onSaved(base);
|
onSaved(base);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast({ title: i18n.t('kubernetes.msg.saveFailed'), description: e instanceof Error ? e.message : String(e), variant: 'destructive' });
|
toast({ title: i18n.t('kubernetes.msg.saveFailed'), description: e instanceof Error ? e.message : String(e), variant: 'destructive' });
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ export function DeploymentEditService({ clusterCode, namespace, deploymentName,
|
|||||||
<CardContent className="p-3">
|
<CardContent className="p-3">
|
||||||
<div className="flex items-center gap-2 text-xs dg-text-secondary">
|
<div className="flex items-center gap-2 text-xs dg-text-secondary">
|
||||||
<Network className="h-3.5 w-3.5 dg-text-blue" />
|
<Network className="h-3.5 w-3.5 dg-text-blue" />
|
||||||
<span> {i18n.t('kubernetes.deploymentedits.sb8eef7f0')} </span>
|
<span> {i18n.t('kubernetes.deploymentEditService.selectorLabel')} </span>
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{Object.entries(selectorLabels).map(([k, v]) => (
|
{Object.entries(selectorLabels).map(([k, v]) => (
|
||||||
<code key={k} className="bg-[var(--dg-bg-tertiary)] px-1.5 py-0.5 rounded text-[var(--dg-text-secondary)] text-[11px]">{k}={v}</code>
|
<code key={k} className="bg-[var(--dg-bg-tertiary)] px-1.5 py-0.5 rounded text-[var(--dg-text-secondary)] text-[11px]">{k}={v}</code>
|
||||||
@@ -289,7 +289,7 @@ export function DeploymentEditService({ clusterCode, namespace, deploymentName,
|
|||||||
<Plus className="h-3 w-3 mr-1" />创建 Service
|
<Plus className="h-3 w-3 mr-1" />创建 Service
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-xs dg-text-muted mt-1"> {i18n.t('kubernetes.deploymentedits.sd0ad85b8')} </p>
|
<p className="text-xs dg-text-muted mt-1"> {i18n.t('kubernetes.deploymentEditService.selectorHint')} </p>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="pt-0">
|
<CardContent className="pt-0">
|
||||||
{matchedSvcs.length === 0 && showCreate !== 'service' ? (
|
{matchedSvcs.length === 0 && showCreate !== 'service' ? (
|
||||||
@@ -387,7 +387,7 @@ export function DeploymentEditService({ clusterCode, namespace, deploymentName,
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="flex justify-end gap-2 pt-2">
|
<div className="flex justify-end gap-2 pt-2">
|
||||||
<Button size="sm" variant="outline" className="h-7 text-xs border-[var(--dg-border)] dg-text-secondary" onClick={onCancel}> {i18n.t('kubernetes.deploymentedits.s3a77522f')} </Button>
|
<Button size="sm" variant="outline" className="h-7 text-xs border-[var(--dg-border)] dg-text-secondary" onClick={onCancel}> {i18n.t('kubernetes.deploymentEditService.backToView')} </Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export function DeploymentEditStorage({ clusterCode, namespace, deploymentName,
|
|||||||
<div className="p-3 space-y-2.5 border-b border-[var(--dg-border)]/80">
|
<div className="p-3 space-y-2.5 border-b border-[var(--dg-border)]/80">
|
||||||
<div className="flex items-center gap-2 flex-wrap">
|
<div className="flex items-center gap-2 flex-wrap">
|
||||||
<VIcon className={`h-4 w-4 ${vtype?.color || 'dg-text-secondary'}`} />
|
<VIcon className={`h-4 w-4 ${vtype?.color || 'dg-text-secondary'}`} />
|
||||||
<span className="text-xs dg-text-secondary shrink-0"> {i18n.t('kubernetes.deploymentedits.sa3119d33')} </span>
|
<span className="text-xs dg-text-secondary shrink-0"> {i18n.t('kubernetes.deploymentEditService.volumeName')} </span>
|
||||||
<Input
|
<Input
|
||||||
value={vol.name}
|
value={vol.name}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -322,7 +322,7 @@ export function DeploymentEditStorage({ clusterCode, namespace, deploymentName,
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="text-[11px] dg-text-muted shrink-0"> {i18n.t('kubernetes.deploymentedits.sf4b25a22')} </span>
|
<span className="text-[11px] dg-text-muted shrink-0"> {i18n.t('kubernetes.deploymentEditService.subPath')} </span>
|
||||||
<Input
|
<Input
|
||||||
value={mount.subPath}
|
value={mount.subPath}
|
||||||
onChange={(e) => updateMount(i, mi, { subPath: e.target.value })}
|
onChange={(e) => updateMount(i, mi, { subPath: e.target.value })}
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export function DeploymentView(props: DeploymentViewProps) {
|
|||||||
{pods[0].node_name || pods[0].node || '-'}
|
{pods[0].node_name || pods[0].node || '-'}
|
||||||
</button>
|
</button>
|
||||||
} />
|
} />
|
||||||
<InfoItem label={i18n.t('kubernetes.deploymentviewt.s6d2d954e')} value={<span className="font-mono">{pods[0].ip || pods[0].pod_ip || '-'}</span>} />
|
<InfoItem label={i18n.t('kubernetes.deploymentView.podIp')} value={<span className="font-mono">{pods[0].ip || pods[0].pod_ip || '-'}</span>} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<InfoItem label={i18n.t('system.userCreatedAt')} value={formatK8sTime(deployment?.created_at || deployment?.creationTimestamp)} />
|
<InfoItem label={i18n.t('system.userCreatedAt')} value={formatK8sTime(deployment?.created_at || deployment?.creationTimestamp)} />
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ export function DeploymentWorkload({ clusterCode, namespace, deploymentName, mod
|
|||||||
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={onBack}><ArrowLeft className="h-4 w-4 mr-1" /> {i18n.t('common.back')} </Button>
|
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={onBack}><ArrowLeft className="h-4 w-4 mr-1" /> {i18n.t('common.back')} </Button>
|
||||||
{modeTabs}
|
{modeTabs}
|
||||||
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={loadData}><RefreshCw className="h-4 w-4" /></Button>
|
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={loadData}><RefreshCw className="h-4 w-4" /></Button>
|
||||||
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={() => { setNewImage(deployment?.image || ''); setModal({ kind: 'image' }); }}><ImageIcon className="h-3.5 w-3.5 mr-1" /> {i18n.t('kubernetes.deploymentworkl.sf2e0208b')} </Button>
|
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={() => { setNewImage(deployment?.image || ''); setModal({ kind: 'image' }); }}><ImageIcon className="h-3.5 w-3.5 mr-1" /> {i18n.t('kubernetes.deploymentWorkload.adjustImage')} </Button>
|
||||||
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={handleRestart}><RotateCw className="h-3.5 w-3.5 mr-1" /> {i18n.t('agent.agentServiceRestart')} </Button>
|
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={handleRestart}><RotateCw className="h-3.5 w-3.5 mr-1" /> {i18n.t('agent.agentServiceRestart')} </Button>
|
||||||
<Button variant="outline" size="sm" className="dg-btn-secondary" disabled={!!actionLoading} onClick={handleTogglePause}>
|
<Button variant="outline" size="sm" className="dg-btn-secondary" disabled={!!actionLoading} onClick={handleTogglePause}>
|
||||||
{deployment?.paused ? <><Play className="h-3.5 w-3.5 mr-1 dg-text-green" /> {i18n.t('kubernetes.deployment.resume')} </> : <><Pause className="h-3.5 w-3.5 mr-1 dg-text-orange" /> {i18n.t('kubernetes.job.suspend')} </>}
|
{deployment?.paused ? <><Play className="h-3.5 w-3.5 mr-1 dg-text-green" /> {i18n.t('kubernetes.deployment.resume')} </> : <><Pause className="h-3.5 w-3.5 mr-1 dg-text-orange" /> {i18n.t('kubernetes.job.suspend')} </>}
|
||||||
@@ -352,7 +352,7 @@ export function DeploymentWorkload({ clusterCode, namespace, deploymentName, mod
|
|||||||
<Badge className={isHealthy ? 'bg-emerald-500/20 dg-text-green border-emerald-500/30' : 'bg-amber-500/20 dg-text-yellow border-amber-500/30'}>
|
<Badge className={isHealthy ? 'bg-emerald-500/20 dg-text-green border-emerald-500/30' : 'bg-amber-500/20 dg-text-yellow border-amber-500/30'}>
|
||||||
{isHealthy ? <CheckCircle className="h-3 w-3 mr-1" /> : <AlertTriangle className="h-3 w-3 mr-1" />}{ready}/{total}
|
{isHealthy ? <CheckCircle className="h-3 w-3 mr-1" /> : <AlertTriangle className="h-3 w-3 mr-1" />}{ready}/{total}
|
||||||
</Badge>
|
</Badge>
|
||||||
{deployment?.paused && <Badge className="bg-orange-500/20 dg-text-orange border-orange-500/30"><Pause className="h-3 w-3 mr-1" /> {i18n.t('kubernetes.deploymentworkl.s8be2521d')} </Badge>}
|
{deployment?.paused && <Badge className="bg-orange-500/20 dg-text-orange border-orange-500/30"><Pause className="h-3 w-3 mr-1" /> {i18n.t('kubernetes.deploymentWorkload.paused')} </Badge>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* ============ 主体:view / edit / yaml ============ */}
|
{/* ============ 主体:view / edit / yaml ============ */}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ export default function EventsPage() {
|
|||||||
|
|
||||||
const filterToolbar = (selectedReason || selectedKind) ? (
|
const filterToolbar = (selectedReason || selectedKind) ? (
|
||||||
<div className="flex items-center gap-2 text-xs">
|
<div className="flex items-center gap-2 text-xs">
|
||||||
<span className="text-[var(--dg-text-muted)]"> {i18n.t('kubernetes.eventspagetsx.s841389c5')} </span>
|
<span className="text-[var(--dg-text-muted)]"> {i18n.t('kubernetes.eventsPage.filterLabel')} </span>
|
||||||
{selectedReason && (
|
{selectedReason && (
|
||||||
<button type="button" className="inline-flex items-center gap-1 rounded border border-[var(--dg-border)] px-2 py-0.5 text-[var(--dg-text-secondary)] hover:bg-[var(--dg-bg-tertiary)]" onClick={() => setSelectedReason('')}>
|
<button type="button" className="inline-flex items-center gap-1 rounded border border-[var(--dg-border)] px-2 py-0.5 text-[var(--dg-text-secondary)] hover:bg-[var(--dg-bg-tertiary)]" onClick={() => setSelectedReason('')}>
|
||||||
原因 {selectedReason} <X className="h-3 w-3" />
|
原因 {selectedReason} <X className="h-3 w-3" />
|
||||||
@@ -206,18 +206,18 @@ export default function EventsPage() {
|
|||||||
<Select value={selectedNs} onValueChange={(v) => { setSelectedNs(v); setSelectedReason(''); setSelectedKind(''); }}>
|
<Select value={selectedNs} onValueChange={(v) => { setSelectedNs(v); setSelectedReason(''); setSelectedKind(''); }}>
|
||||||
<SelectTrigger className="w-36 h-9 dg-input"><SelectValue placeholder={i18n.t('kubernetes.namespace.title')} /></SelectTrigger>
|
<SelectTrigger className="w-36 h-9 dg-input"><SelectValue placeholder={i18n.t('kubernetes.namespace.title')} /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="all"> {i18n.t('kubernetes.podmetricspaget.s58173b22')} </SelectItem>
|
<SelectItem value="all"> {i18n.t('kubernetes.podMetricsPage.allNamespaces')} </SelectItem>
|
||||||
{namespaces.map((n) => <SelectItem key={n} value={n}>{n}</SelectItem>)}
|
{namespaces.map((n) => <SelectItem key={n} value={n}>{n}</SelectItem>)}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<Select value={timeWindow} onValueChange={setTimeWindow}>
|
<Select value={timeWindow} onValueChange={setTimeWindow}>
|
||||||
<SelectTrigger className="w-32 h-9 dg-input"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="w-32 h-9 dg-input"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="0"> {i18n.t('kubernetes.eventspagetsx.s98c99f62')} </SelectItem>
|
<SelectItem value="0"> {i18n.t('kubernetes.eventsPage.allTime')} </SelectItem>
|
||||||
<SelectItem value="1"> {i18n.t('monitor.helpersts.sf972b7b1')} </SelectItem>
|
<SelectItem value="1"> {i18n.t('monitor.helpers.last1h')} </SelectItem>
|
||||||
<SelectItem value="6"> {i18n.t('monitor.siteProtocol.rangeDefault')} </SelectItem>
|
<SelectItem value="6"> {i18n.t('monitor.siteProtocol.rangeDefault')} </SelectItem>
|
||||||
<SelectItem value="24"> {i18n.t('monitor.helpersts.s6e99b786')} </SelectItem>
|
<SelectItem value="24"> {i18n.t('monitor.helpers.last24h')} </SelectItem>
|
||||||
<SelectItem value="168"> {i18n.t('monitor.helpersts.sd765efc4')} </SelectItem>
|
<SelectItem value="168"> {i18n.t('monitor.helpers.last7d')} </SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={() => { loadEvents(); loadSummary(); }} disabled={loading}>
|
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={() => { loadEvents(); loadSummary(); }} disabled={loading}>
|
||||||
@@ -270,7 +270,7 @@ export default function EventsPage() {
|
|||||||
<Select value={filterType} onValueChange={setFilterType}>
|
<Select value={filterType} onValueChange={setFilterType}>
|
||||||
<SelectTrigger className="w-28 h-8 dg-input text-xs"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="w-28 h-8 dg-input text-xs"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="all"> {i18n.t('kubernetes.eventspagetsx.sfb995166')} </SelectItem>
|
<SelectItem value="all"> {i18n.t('kubernetes.eventsPage.allTypes')} </SelectItem>
|
||||||
<SelectItem value="Warning">Warning</SelectItem>
|
<SelectItem value="Warning">Warning</SelectItem>
|
||||||
<SelectItem value="Normal">Normal</SelectItem>
|
<SelectItem value="Normal">Normal</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export function KubernetesClusterDialog({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.kubernetesclust.sbf23eb8e')} </Label>
|
<Label className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.kubernetesCluster.versionOptional')} </Label>
|
||||||
<Input
|
<Input
|
||||||
value={formData.version}
|
value={formData.version}
|
||||||
onChange={(e) => setFormData({ ...formData, version: e.target.value })}
|
onChange={(e) => setFormData({ ...formData, version: e.target.value })}
|
||||||
@@ -189,7 +189,7 @@ export function KubernetesClusterDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.kubernetesclust.saaa159b7')} </Label>
|
<Label className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.kubernetesCluster.accessMethod')} </Label>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
value={String(formData.config_type)}
|
value={String(formData.config_type)}
|
||||||
onValueChange={(v) => setFormData({ ...formData, config_type: Number(v) })}
|
onValueChange={(v) => setFormData({ ...formData, config_type: Number(v) })}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ export default function NamespaceManagementPage() {
|
|||||||
<TableRow className="border-[var(--dg-border)] hover:bg-transparent">
|
<TableRow className="border-[var(--dg-border)] hover:bg-transparent">
|
||||||
<TableHead className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.secret.secretName')} </TableHead>
|
<TableHead className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.secret.secretName')} </TableHead>
|
||||||
<TableHead className="text-[var(--dg-text-secondary)]"> {i18n.t('system.terminalStatus')} </TableHead>
|
<TableHead className="text-[var(--dg-text-secondary)]"> {i18n.t('system.terminalStatus')} </TableHead>
|
||||||
<TableHead className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.namespacemanage.sa01a9963')} </TableHead>
|
<TableHead className="text-[var(--dg-text-secondary)]"> {i18n.t('kubernetes.namespaceManage.age')} </TableHead>
|
||||||
<TableHead className="text-[var(--dg-text-secondary)] text-center">Deploy</TableHead>
|
<TableHead className="text-[var(--dg-text-secondary)] text-center">Deploy</TableHead>
|
||||||
<TableHead className="text-[var(--dg-text-secondary)] text-center">Pods</TableHead>
|
<TableHead className="text-[var(--dg-text-secondary)] text-center">Pods</TableHead>
|
||||||
<TableHead className="text-[var(--dg-text-secondary)] text-center">Svc</TableHead>
|
<TableHead className="text-[var(--dg-text-secondary)] text-center">Svc</TableHead>
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export default function NamespaceResourcePage() {
|
|||||||
const searchToolbar = (
|
const searchToolbar = (
|
||||||
<div className="relative w-56 flex-1 min-w-[200px] max-w-xs">
|
<div className="relative w-56 flex-1 min-w-[200px] max-w-xs">
|
||||||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dg-text-muted" />
|
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dg-text-muted" />
|
||||||
<Input placeholder={i18n.t('kubernetes.namespaceresour.s64e327ed')} value={search} onChange={(e) => setSearch(e.target.value)} className="pl-9 h-9 dg-input" />
|
<Input placeholder={i18n.t('kubernetes.namespaceResource.searchPlaceholder')} value={search} onChange={(e) => setSearch(e.target.value)} className="pl-9 h-9 dg-input" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function PodDetailDialog({ pod, onClose }: PodDetailDialogProps) {
|
|||||||
|
|
||||||
{/* 现状详情(Conditions) */}
|
{/* 现状详情(Conditions) */}
|
||||||
<div>
|
<div>
|
||||||
<h4 className="text-sm font-medium text-[var(--dg-text-primary)] mb-3"> {i18n.t('kubernetes.namespaceresour.s1d8d6e2e')} </h4>
|
<h4 className="text-sm font-medium text-[var(--dg-text-primary)] mb-3"> {i18n.t('kubernetes.namespaceResource.conditionsDetail')} </h4>
|
||||||
{cond.length === 0 ? (
|
{cond.length === 0 ? (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)] py-2"> {i18n.t('aiops.assistantNoData')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)] py-2"> {i18n.t('aiops.assistantNoData')} </p>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ export function PodFileBrowser({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex-1 overflow-auto p-3">
|
<div className="flex-1 overflow-auto p-3">
|
||||||
<pre className="text-xs text-[var(--dg-text-secondary)] font-mono whitespace-pre-wrap break-all bg-[var(--dg-bg-primary)] rounded p-3">
|
<pre className="text-xs text-[var(--dg-text-secondary)] font-mono whitespace-pre-wrap break-all bg-[var(--dg-bg-primary)] rounded p-3">
|
||||||
{preview.content || i18n.t('kubernetes.podfilebrowsert.sf42649da')}
|
{preview.content || i18n.t('kubernetes.podFileBrowser.emptyFile')}
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ export function ResourceVisualEditor({ clusterCode, namespace, resource, name, o
|
|||||||
<div className="flex-1 flex items-center justify-center text-center text-[var(--dg-text-muted)]">
|
<div className="flex-1 flex items-center justify-center text-center text-[var(--dg-text-muted)]">
|
||||||
<div>
|
<div>
|
||||||
<p> {i18n.t('k8s.rve.hostPlaceholder')} </p>
|
<p> {i18n.t('k8s.rve.hostPlaceholder')} </p>
|
||||||
<Button variant="outline" size="sm" className="mt-4" onClick={() => setMode('yaml')}> {i18n.t('kubernetes.resourcevisuale.s54c78d4f')} </Button>
|
<Button variant="outline" size="sm" className="mt-4" onClick={() => setMode('yaml')}> {i18n.t('kubernetes.resourceVisualEditor.switchToYaml')} </Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -271,7 +271,7 @@ export function ResourceVisualEditor({ clusterCode, namespace, resource, name, o
|
|||||||
) : (
|
) : (
|
||||||
<div className="text-center py-12 text-[var(--dg-text-muted)]">
|
<div className="text-center py-12 text-[var(--dg-text-muted)]">
|
||||||
<p> {i18n.t('k8s.rve.keyPlaceholder')} </p>
|
<p> {i18n.t('k8s.rve.keyPlaceholder')} </p>
|
||||||
<Button variant="outline" size="sm" className="mt-4" onClick={() => setMode('yaml')}> {i18n.t('kubernetes.resourcevisuale.s54c78d4f')} </Button>
|
<Button variant="outline" size="sm" className="mt-4" onClick={() => setMode('yaml')}> {i18n.t('kubernetes.resourceVisualEditor.switchToYaml')} </Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export default function WorkloadViewPage() {
|
|||||||
<Badge variant="outline" className="border-[var(--dg-border)] text-[var(--dg-text-secondary)]">{namespace}</Badge>
|
<Badge variant="outline" className="border-[var(--dg-border)] text-[var(--dg-text-secondary)]">{namespace}</Badge>
|
||||||
{isHealthy
|
{isHealthy
|
||||||
? <Badge className="bg-[var(--dg-green)]/20 text-[var(--dg-green)] border-[var(--dg-green)]/30"> {i18n.t('k8s.clusters.statusHealthy')} </Badge>
|
? <Badge className="bg-[var(--dg-green)]/20 text-[var(--dg-green)] border-[var(--dg-green)]/30"> {i18n.t('k8s.clusters.statusHealthy')} </Badge>
|
||||||
: <Badge className="bg-[var(--dg-orange)]/20 text-[var(--dg-orange)] border-[var(--dg-orange)]/30"> {i18n.t('kubernetes.workloadviewpag.sf339d471')} </Badge>}
|
: <Badge className="bg-[var(--dg-orange)]/20 text-[var(--dg-orange)] border-[var(--dg-orange)]/30"> {i18n.t('kubernetes.workloadViewPage.updating')} </Badge>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!loading && (mode === 'yaml' ? (
|
{!loading && (mode === 'yaml' ? (
|
||||||
@@ -198,7 +198,7 @@ export default function WorkloadViewPage() {
|
|||||||
<div className="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-3">
|
<div className="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-3">
|
||||||
{isSts ? (
|
{isSts ? (
|
||||||
<>
|
<>
|
||||||
<StatCard label={i18n.t('kubernetes.workloadviewpag.sea639697')} value={`${readyReplicas}/${replicas}`} color={isHealthy ? STATUS_COLORS.green : STATUS_COLORS.orange} sub={isHealthy ? i18n.t('kubernetes.workloadviewpag.s23c944c1') : i18n.t('kubernetes.workloadviewpag.sac100213')} />
|
<StatCard label={i18n.t('kubernetes.workloadViewPage.replicasReady')} value={`${readyReplicas}/${replicas}`} color={isHealthy ? STATUS_COLORS.green : STATUS_COLORS.orange} sub={isHealthy ? i18n.t('kubernetes.workloadViewPage.allReady') : i18n.t('kubernetes.workloadViewPage.partialReady')} />
|
||||||
<StatCard label={i18n.t('kubernetes.hpa.currentReplicas')} value={currentReplicas} color={STATUS_COLORS.blue} />
|
<StatCard label={i18n.t('kubernetes.hpa.currentReplicas')} value={currentReplicas} color={STATUS_COLORS.blue} />
|
||||||
<StatCard label={i18n.t('kubernetes.deployment.updatedReplicas')} value={updatedReplicas} color={STATUS_COLORS.green} />
|
<StatCard label={i18n.t('kubernetes.deployment.updatedReplicas')} value={updatedReplicas} color={STATUS_COLORS.green} />
|
||||||
<StatCard label={i18n.t('k8s.workloadView.currentReplicas')} value={stats.spec.serviceName || '-'} color="var(--dg-text-secondary)" />
|
<StatCard label={i18n.t('k8s.workloadView.currentReplicas')} value={stats.spec.serviceName || '-'} color="var(--dg-text-secondary)" />
|
||||||
@@ -277,7 +277,7 @@ export default function WorkloadViewPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{containers.length === 0 ? (
|
{containers.length === 0 ? (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)] py-3"> {i18n.t('kubernetes.workloadviewpag.se4b61048')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)] py-3"> {i18n.t('kubernetes.workloadViewPage.noContainerData')} </p>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<p className="text-[11px] text-[var(--dg-text-muted)] mb-1 uppercase tracking-wide">Containers</p>
|
<p className="text-[11px] text-[var(--dg-text-muted)] mb-1 uppercase tracking-wide">Containers</p>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export async function saveDeploymentBundleYaml(
|
|||||||
yamlText: string,
|
yamlText: string,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { manifests } = await parseEditableManifests(yamlText);
|
const { manifests } = await parseEditableManifests(yamlText);
|
||||||
if (manifests.length === 0) throw new Error(i18n.t('kubernetes.deploymentbundl.s47161e05'));
|
if (manifests.length === 0) throw new Error(i18n.t('kubernetes.deploymentBundle.yamlEmpty'));
|
||||||
|
|
||||||
for (const manifest of manifests) {
|
for (const manifest of manifests) {
|
||||||
const kind = String(manifest.kind || '').toLowerCase();
|
const kind = String(manifest.kind || '').toLowerCase();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function TolerationsCard({ tolerations, onAdd, onRemove, onUpdate }: Tole
|
|||||||
<Card className="dg-card">
|
<Card className="dg-card">
|
||||||
<CardHeader className="pb-3">
|
<CardHeader className="pb-3">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<CardTitle className="text-sm text-[var(--dg-text-primary)]"> {i18n.t('kubernetes.deploymentedita.s13a8310b')} </CardTitle>
|
<CardTitle className="text-sm text-[var(--dg-text-primary)]"> {i18n.t('kubernetes.deploymentEditAdvanced.tolerations')} </CardTitle>
|
||||||
<Button size="sm" variant="outline" className="h-7 border-[var(--dg-border)] text-[var(--dg-text-secondary)] text-xs"
|
<Button size="sm" variant="outline" className="h-7 border-[var(--dg-border)] text-[var(--dg-text-secondary)] text-xs"
|
||||||
onClick={onAdd}>
|
onClick={onAdd}>
|
||||||
<Plus className="h-3 w-3 mr-1" />添加
|
<Plus className="h-3 w-3 mr-1" />添加
|
||||||
@@ -27,7 +27,7 @@ export function TolerationsCard({ tolerations, onAdd, onRemove, onUpdate }: Tole
|
|||||||
</div>
|
</div>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="pt-0 space-y-2">
|
<CardContent className="pt-0 space-y-2">
|
||||||
{tolerations.length === 0 && <p className="text-xs dg-text-muted"> {i18n.t('kubernetes.deploymentedita.s8bc06bde')} </p>}
|
{tolerations.length === 0 && <p className="text-xs dg-text-muted"> {i18n.t('kubernetes.deploymentEditAdvanced.noTolerations')} </p>}
|
||||||
{tolerations.map((t, i) => (
|
{tolerations.map((t, i) => (
|
||||||
<div key={i} className="grid grid-cols-[1fr_80px_1fr_100px_80px_auto] gap-2 items-center">
|
<div key={i} className="grid grid-cols-[1fr_80px_1fr_100px_80px_auto] gap-2 items-center">
|
||||||
<Input value={t.key} placeholder="key" onChange={e => onUpdate(i, { key: e.target.value })}
|
<Input value={t.key} placeholder="key" onChange={e => onUpdate(i, { key: e.target.value })}
|
||||||
@@ -42,7 +42,7 @@ export function TolerationsCard({ tolerations, onAdd, onRemove, onUpdate }: Tole
|
|||||||
className="h-7 dg-input text-xs font-mono" />
|
className="h-7 dg-input text-xs font-mono" />
|
||||||
<select value={t.effect} onChange={e => onUpdate(i, { effect: e.target.value })}
|
<select value={t.effect} onChange={e => onUpdate(i, { effect: e.target.value })}
|
||||||
className="h-7 bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)] rounded text-xs text-[var(--dg-text-secondary)] px-1">
|
className="h-7 bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)] rounded text-xs text-[var(--dg-text-secondary)] px-1">
|
||||||
<option value=""> {i18n.t('kubernetes.deploymentedita.s2a6eb2dd')} </option>
|
<option value=""> {i18n.t('kubernetes.deploymentEditAdvanced.any')} </option>
|
||||||
<option value="NoSchedule">NoSchedule</option>
|
<option value="NoSchedule">NoSchedule</option>
|
||||||
<option value="PreferNoSchedule">PreferNoSchedule</option>
|
<option value="PreferNoSchedule">PreferNoSchedule</option>
|
||||||
<option value="NoExecute">NoExecute</option>
|
<option value="NoExecute">NoExecute</option>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function IngressListItem({ ing, matched, onEdit, onDelete }: Props) {
|
|||||||
{matched ? <CheckCircle className="h-4 w-4 dg-text-purple" /> : <GitBranch className="h-4 w-4 dg-text-muted" />}
|
{matched ? <CheckCircle className="h-4 w-4 dg-text-purple" /> : <GitBranch className="h-4 w-4 dg-text-muted" />}
|
||||||
<span className="text-sm font-semibold text-[var(--dg-text-primary)]">{ing.name}</span>
|
<span className="text-sm font-semibold text-[var(--dg-text-primary)]">{ing.name}</span>
|
||||||
<Badge variant="outline" className="border-[var(--dg-border)] dg-text-secondary text-[10px]">{ing.className}</Badge>
|
<Badge variant="outline" className="border-[var(--dg-border)] dg-text-secondary text-[10px]">{ing.className}</Badge>
|
||||||
{matched && <Badge className="bg-purple-500/20 text-purple-300 border-purple-500/30 text-[10px]"> {i18n.t('kubernetes.deploymentedits.s1c3cf7f5')} </Badge>}
|
{matched && <Badge className="bg-purple-500/20 text-purple-300 border-purple-500/30 text-[10px]"> {i18n.t('kubernetes.deploymentEditService.associated')} </Badge>}
|
||||||
<Button size="sm" variant="ghost" className="h-6 text-xs dg-text-green ml-auto"
|
<Button size="sm" variant="ghost" className="h-6 text-xs dg-text-green ml-auto"
|
||||||
onClick={onEdit}>
|
onClick={onEdit}>
|
||||||
<Pencil className="h-3 w-3 mr-1" />编辑
|
<Pencil className="h-3 w-3 mr-1" />编辑
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export function ServiceCreateForm({ svcForm, setSvcForm, selectorLabels, deploym
|
|||||||
|
|
||||||
{/* 快速预设 */}
|
{/* 快速预设 */}
|
||||||
<div>
|
<div>
|
||||||
<Label className="dg-text-muted text-[11px] mb-1 block"> {i18n.t('kubernetes.deploymentedits.s83907cde')} </Label>
|
<Label className="dg-text-muted text-[11px] mb-1 block"> {i18n.t('kubernetes.deploymentEditService.quickAddPorts')} </Label>
|
||||||
<div className="flex gap-1.5">
|
<div className="flex gap-1.5">
|
||||||
{PORT_PRESETS.map(p => (
|
{PORT_PRESETS.map(p => (
|
||||||
<button key={p.name} onClick={() => addPort(p)}
|
<button key={p.name} onClick={() => addPort(p)}
|
||||||
@@ -134,7 +134,7 @@ export function ServiceCreateForm({ svcForm, setSvcForm, selectorLabels, deploym
|
|||||||
<code key={k} className="bg-[var(--dg-bg-tertiary)] px-1 py-0.5 rounded dg-text-secondary ml-1">{k}={v}</code>
|
<code key={k} className="bg-[var(--dg-bg-tertiary)] px-1 py-0.5 rounded dg-text-secondary ml-1">{k}={v}</code>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<span className="dg-text-muted italic"> {i18n.t('kubernetes.deploymentedits.s5847b0f9')} </span>
|
<span className="dg-text-muted italic"> {i18n.t('kubernetes.deploymentEditService.notDetected')} </span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function ServiceListItem({ svc, matched, onEdit, onDelete }: Props) {
|
|||||||
{matched ? <CheckCircle className="h-4 w-4 dg-text-blue" /> : <Network className="h-4 w-4 dg-text-muted" />}
|
{matched ? <CheckCircle className="h-4 w-4 dg-text-blue" /> : <Network className="h-4 w-4 dg-text-muted" />}
|
||||||
<span className="text-sm font-semibold text-[var(--dg-text-primary)]">{svc.name}</span>
|
<span className="text-sm font-semibold text-[var(--dg-text-primary)]">{svc.name}</span>
|
||||||
<Badge variant="outline" className="border-[var(--dg-border)] dg-text-secondary text-[10px]">{svc.type}</Badge>
|
<Badge variant="outline" className="border-[var(--dg-border)] dg-text-secondary text-[10px]">{svc.type}</Badge>
|
||||||
{matched && <Badge className="bg-blue-500/20 text-blue-300 border-blue-500/30 text-[10px]"> {i18n.t('kubernetes.deploymentedits.s1c3cf7f5')} </Badge>}
|
{matched && <Badge className="bg-blue-500/20 text-blue-300 border-blue-500/30 text-[10px]"> {i18n.t('kubernetes.deploymentEditService.associated')} </Badge>}
|
||||||
<code className="text-[11px] dg-text-muted ml-auto">{svc.clusterIP}</code>
|
<code className="text-[11px] dg-text-muted ml-auto">{svc.clusterIP}</code>
|
||||||
<Button size="sm" variant="ghost" className="h-6 text-xs dg-text-green"
|
<Button size="sm" variant="ghost" className="h-6 text-xs dg-text-green"
|
||||||
onClick={onEdit}>
|
onClick={onEdit}>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export function BottomStatusBar({
|
|||||||
className={cn('flex items-center gap-1', autoScroll ? 'dg-text-green' : 'text-[var(--dg-text-muted)]')}
|
className={cn('flex items-center gap-1', autoScroll ? 'dg-text-green' : 'text-[var(--dg-text-muted)]')}
|
||||||
onClick={onToggleAutoScroll}
|
onClick={onToggleAutoScroll}
|
||||||
>
|
>
|
||||||
<Maximize2 className="h-3 w-3" />{autoScroll ? i18n.t('kubernetes.podlogsviewerts.sd7eb1e98') : i18n.t('kubernetes.podlogsviewerts.s130db316')}
|
<Maximize2 className="h-3 w-3" />{autoScroll ? i18n.t('kubernetes.podLogsViewer.followBottom') : i18n.t('kubernetes.podLogsViewer.followPaused')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ export function LogsHeader({
|
|||||||
<span className="text-[var(--dg-text-primary)] font-medium truncate">日志 — {podName}</span>
|
<span className="text-[var(--dg-text-primary)] font-medium truncate">日志 — {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.podlogsviewerts.sd9c71f71')) : 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}` : ''} 行
|
||||||
{lineCount >= RING_BUFFER_MAX && i18n.t('kubernetes.podlogsviewerts.sf3280b73')}
|
{lineCount >= RING_BUFFER_MAX && i18n.t('kubernetes.podLogsViewer.bufferFull')}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ export interface LogLine {
|
|||||||
export const RING_BUFFER_MAX = 10000;
|
export const RING_BUFFER_MAX = 10000;
|
||||||
|
|
||||||
export const TAIL_OPTIONS = [
|
export const TAIL_OPTIONS = [
|
||||||
{ value: '100', label: i18n.t('kubernetes.podlogsviewerts.s58b02a7a') },
|
{ value: '100', label: i18n.t('kubernetes.podLogsViewer.last100') },
|
||||||
{ value: '500', label: i18n.t('kubernetes.podlogsviewerts.s9a036801') },
|
{ value: '500', label: i18n.t('kubernetes.podLogsViewer.last500') },
|
||||||
{ value: '1000', label: i18n.t('kubernetes.podlogsviewerts.sf89a330c') },
|
{ value: '1000', label: i18n.t('kubernetes.podLogsViewer.last1000') },
|
||||||
{ value: '0', label: i18n.t('system.auditAll') },
|
{ value: '0', label: i18n.t('system.auditAll') },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function ScaleDialog({
|
|||||||
return (
|
return (
|
||||||
<div className="fixed inset-0 bg-black/60 z-50 flex items-center justify-center" onClick={onClose}>
|
<div className="fixed inset-0 bg-black/60 z-50 flex items-center justify-center" onClick={onClose}>
|
||||||
<div className="bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-lg p-6 w-80" onClick={e => e.stopPropagation()}>
|
<div className="bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-lg p-6 w-80" onClick={e => e.stopPropagation()}>
|
||||||
<h3 className="text-sm font-semibold text-[var(--dg-text-primary)] mb-4"> {i18n.t('kubernetes.workloadviewpag.s7f541ee2')} </h3>
|
<h3 className="text-sm font-semibold text-[var(--dg-text-primary)] mb-4"> {i18n.t('kubernetes.workloadViewPage.scaleStatefulSet')} </h3>
|
||||||
<div className="flex items-center justify-center gap-4 mb-4">
|
<div className="flex items-center justify-center gap-4 mb-4">
|
||||||
<Button variant="outline" size="icon" className="h-9 w-9" onClick={() => onScaleValueChange(Math.max(0, scaleValue - 1))}>
|
<Button variant="outline" size="icon" className="h-9 w-9" onClick={() => onScaleValueChange(Math.max(0, scaleValue - 1))}>
|
||||||
<Minus className="h-4 w-4" />
|
<Minus className="h-4 w-4" />
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export function AlertChannelDialog({
|
|||||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||||
<DialogContent className="dg-input max-w-2xl">
|
<DialogContent className="dg-input max-w-2xl">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle className="text-[var(--dg-text-primary)]"> {i18n.t('monitor.alertchanneldia.s976ad48f')} </DialogTitle>
|
<DialogTitle className="text-[var(--dg-text-primary)]"> {i18n.t('monitor.alertChannelDialog.title')} </DialogTitle>
|
||||||
<DialogDescription className="dg-text-muted">
|
<DialogDescription className="dg-text-muted">
|
||||||
管理告警通知渠道(钉钉/企业微信/邮件/短信/Webhook),配置后可在告警规则中引用
|
管理告警通知渠道(钉钉/企业微信/邮件/短信/Webhook),配置后可在告警规则中引用
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
@@ -176,7 +176,7 @@ export function AlertChannelDialog({
|
|||||||
{ch.test_status === 'success' ? (
|
{ch.test_status === 'success' ? (
|
||||||
<span className="text-[11px] dg-text-green"> {i18n.t('monitor.alertChannels.testPassed')} </span>
|
<span className="text-[11px] dg-text-green"> {i18n.t('monitor.alertChannels.testPassed')} </span>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-[11px] dg-text-muted"> {i18n.t('monitor.alertchanneldia.s8c852a4c')} </span>
|
<span className="text-[11px] dg-text-muted"> {i18n.t('monitor.alertChannelDialog.notTested')} </span>
|
||||||
)}
|
)}
|
||||||
<div className="flex items-center gap-1" onClick={(e) => e.stopPropagation()}>
|
<div className="flex items-center gap-1" onClick={(e) => e.stopPropagation()}>
|
||||||
<Button
|
<Button
|
||||||
@@ -247,7 +247,7 @@ export function AlertChannelDialog({
|
|||||||
onCheckedChange={(v) => setChannelForm({ ...channelForm, enabled: v })}
|
onCheckedChange={(v) => setChannelForm({ ...channelForm, enabled: v })}
|
||||||
className="data-[state=checked]:bg-emerald-600"
|
className="data-[state=checked]:bg-emerald-600"
|
||||||
/>
|
/>
|
||||||
<Label className="dg-text-secondary text-xs"> {i18n.t('monitor.alertchanneldia.sbdab1c59')} </Label>
|
<Label className="dg-text-secondary text-xs"> {i18n.t('monitor.alertChannelDialog.enableChannel')} </Label>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ export function AlertManager() {
|
|||||||
>
|
>
|
||||||
<Card className="dg-card">
|
<Card className="dg-card">
|
||||||
<CardHeader className="pb-2">
|
<CardHeader className="pb-2">
|
||||||
<CardTitle className="text-[var(--dg-text-primary)]"> {i18n.t('monitor.alertmanagertsx.s358b05d0')} </CardTitle>
|
<CardTitle className="text-[var(--dg-text-primary)]"> {i18n.t('monitor.alertManager.trendTitle')} </CardTitle>
|
||||||
<CardDescription className="dg-text-muted"> {i18n.t('monitor.alertmanagertsx.s615fa6cb')} </CardDescription>
|
<CardDescription className="dg-text-muted"> {i18n.t('monitor.alertManager.last24hStats')} </CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<div className="h-[200px]">
|
<div className="h-[200px]">
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export function AlertRulesTab({
|
|||||||
</TableHead>
|
</TableHead>
|
||||||
<TableHead className="dg-text-secondary"> {i18n.t('monitor.ruleName')} </TableHead>
|
<TableHead className="dg-text-secondary"> {i18n.t('monitor.ruleName')} </TableHead>
|
||||||
<TableHead className="dg-text-secondary"> {i18n.t('monitor.dashboard.custom.datasource')} </TableHead>
|
<TableHead className="dg-text-secondary"> {i18n.t('monitor.dashboard.custom.datasource')} </TableHead>
|
||||||
<TableHead className="dg-text-secondary"> {i18n.t('monitor.alertrulestabts.s65939ccd')} </TableHead>
|
<TableHead className="dg-text-secondary"> {i18n.t('monitor.alertRulesTab.condition')} </TableHead>
|
||||||
<TableHead className="dg-text-secondary"> {i18n.t('kubernetes.event.eventLevel')} </TableHead>
|
<TableHead className="dg-text-secondary"> {i18n.t('kubernetes.event.eventLevel')} </TableHead>
|
||||||
<TableHead className="dg-text-secondary"> {i18n.t('monitor.alertDuration')} </TableHead>
|
<TableHead className="dg-text-secondary"> {i18n.t('monitor.alertDuration')} </TableHead>
|
||||||
<TableHead className="dg-text-secondary"> {i18n.t('monitor.notificationChannel')} </TableHead>
|
<TableHead className="dg-text-secondary"> {i18n.t('monitor.notificationChannel')} </TableHead>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export function EsIndexPicker({ datasourceId, value, onChange }: Props) {
|
|||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
className="h-10 px-2 text-xs rounded flex items-center gap-1 font-mono min-w-[150px] max-w-[220px]"
|
className="h-10 px-2 text-xs rounded flex items-center gap-1 font-mono min-w-[150px] max-w-[220px]"
|
||||||
style={{ background: 'var(--dg-bg-tertiary)', border: '1px solid var(--dg-border)', color: 'var(--dg-text-primary)' }}
|
style={{ background: 'var(--dg-bg-tertiary)', border: '1px solid var(--dg-border)', color: 'var(--dg-text-primary)' }}
|
||||||
title={i18n.t('monitor.esindexpickerts.sa0eff8ea')}
|
title={i18n.t('monitor.esIndexPicker.selectHint')}
|
||||||
>
|
>
|
||||||
<span className="truncate flex-1 text-left">{value || i18n.t('monitor.selectIndex')}</span>
|
<span className="truncate flex-1 text-left">{value || i18n.t('monitor.selectIndex')}</span>
|
||||||
{loading ? <Loader2 className="h-3 w-3 animate-spin shrink-0" /> : <ChevronDown className="h-3 w-3 shrink-0" />}
|
{loading ? <Loader2 className="h-3 w-3 animate-spin shrink-0" /> : <ChevronDown className="h-3 w-3 shrink-0" />}
|
||||||
@@ -60,7 +60,7 @@ export function EsIndexPicker({ datasourceId, value, onChange }: Props) {
|
|||||||
<input
|
<input
|
||||||
value={search}
|
value={search}
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
placeholder={i18n.t('monitor.esindexpickerts.s9ae0c004')}
|
placeholder={i18n.t('monitor.esIndexPicker.searchPlaceholder')}
|
||||||
className="flex-1 bg-transparent text-xs outline-none font-mono"
|
className="flex-1 bg-transparent text-xs outline-none font-mono"
|
||||||
style={{ color: 'var(--dg-text-primary)' }}
|
style={{ color: 'var(--dg-text-primary)' }}
|
||||||
/>
|
/>
|
||||||
@@ -90,7 +90,7 @@ export function EsIndexPicker({ datasourceId, value, onChange }: Props) {
|
|||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
{!loading && filtered.length === 0 && (
|
{!loading && filtered.length === 0 && (
|
||||||
<p className="text-xs px-2 py-3 text-center" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.esindexpickerts.saf5cc132')} </p>
|
<p className="text-xs px-2 py-3 text-center" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.esIndexPicker.noMatch')} </p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export function LogAlertsPanel() {
|
|||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<p className="text-sm text-[var(--dg-text-muted)]"> {i18n.t('monitor.logalertspanelt.s5bc514d8')} </p>
|
<p className="text-sm text-[var(--dg-text-muted)]"> {i18n.t('monitor.logAlertSpanel.desc')} </p>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Button variant="outline" size="sm" onClick={load} disabled={loading}>
|
<Button variant="outline" size="sm" onClick={load} disabled={loading}>
|
||||||
<RefreshCw className={`h-4 w-4 mr-1 ${loading ? 'animate-spin' : ''}`} />刷新
|
<RefreshCw className={`h-4 w-4 mr-1 ${loading ? 'animate-spin' : ''}`} />刷新
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export function LogClusterPanel({ clusters }: Props) {
|
|||||||
{/* 头部 */}
|
{/* 头部 */}
|
||||||
<div className="flex items-center justify-between px-4 py-2" style={{ background: 'var(--dg-bg-tertiary)', borderBottom: '1px solid var(--dg-border)' }}>
|
<div className="flex items-center justify-between px-4 py-2" style={{ background: 'var(--dg-bg-tertiary)', borderBottom: '1px solid var(--dg-border)' }}>
|
||||||
<span className="text-xs" style={{ color: 'var(--dg-text-muted)' }}>共 {clusters.length} 个聚类模式,总计 {total.toLocaleString()} 条日志</span>
|
<span className="text-xs" style={{ color: 'var(--dg-text-muted)' }}>共 {clusters.length} 个聚类模式,总计 {total.toLocaleString()} 条日志</span>
|
||||||
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.logclusterpanel.s38112792')} </span>
|
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.logClusterPanel.desc')} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 聚类列表 */}
|
{/* 聚类列表 */}
|
||||||
@@ -91,7 +91,7 @@ export function LogClusterPanel({ clusters }: Props) {
|
|||||||
{/* 展开详情 */}
|
{/* 展开详情 */}
|
||||||
{expanded[i] && (
|
{expanded[i] && (
|
||||||
<div className="px-4 py-3 animate-fade-in" style={{ background: 'var(--dg-bg-primary)', paddingLeft: '48px' }}>
|
<div className="px-4 py-3 animate-fade-in" style={{ background: 'var(--dg-bg-primary)', paddingLeft: '48px' }}>
|
||||||
<p className="text-[10px] mb-1" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.logclusterpanel.se909e426')} </p>
|
<p className="text-[10px] mb-1" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.logClusterPanel.sampleLog')} </p>
|
||||||
<div className="p-2 rounded text-[11px] font-mono break-all" style={{ background: 'var(--dg-bg-tertiary)', color: 'var(--dg-text-secondary)' }}>
|
<div className="p-2 rounded text-[11px] font-mono break-all" style={{ background: 'var(--dg-bg-tertiary)', color: 'var(--dg-text-secondary)' }}>
|
||||||
{cluster.sample}
|
{cluster.sample}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ export function LogDingAssistant({ onRuleCreated }: { onRuleCreated?: () => void
|
|||||||
size="lg"
|
size="lg"
|
||||||
className="h-12 rounded-full shadow-lg bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-white gap-2 px-5"
|
className="h-12 rounded-full shadow-lg bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-white gap-2 px-5"
|
||||||
onClick={() => setOpen(true)}
|
onClick={() => setOpen(true)}
|
||||||
title={i18n.t('monitor.logdingassistan.s26b79b6b')}
|
title={i18n.t('monitor.logDingAssistant.addAlert')}
|
||||||
>
|
>
|
||||||
<Sparkles className="h-5 w-5" />
|
<Sparkles className="h-5 w-5" />
|
||||||
<span className="font-medium"> {i18n.t('monitor.logdingassistan.s1a663141')} </span>
|
<span className="font-medium"> {i18n.t('monitor.logDingAssistant.ding')} </span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<LogAlertFromQueryDialog
|
<LogAlertFromQueryDialog
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export function LogQueryToolbar({
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div className="flex items-center gap-1 ml-1">
|
<div className="flex items-center gap-1 ml-1">
|
||||||
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.logquerytoolbar.s8b76adb2')} </span>
|
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.logQueryToolbar.goTo')} </span>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value={jumpPage}
|
value={jumpPage}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ export default function LogRBAC() {
|
|||||||
icon={<Shield className="h-10 w-10" />}
|
icon={<Shield className="h-10 w-10" />}
|
||||||
title={i18n.t('monitor.logRbac.noPolicies')}
|
title={i18n.t('monitor.logRbac.noPolicies')}
|
||||||
description={i18n.t('monitor.logRbac.noPoliciesDesc')}
|
description={i18n.t('monitor.logRbac.noPoliciesDesc')}
|
||||||
action={<Button onClick={() => setCreateOpen(true)}><Plus className="h-4 w-4 mr-1" /> {i18n.t('monitor.logrbactsx.s6058845c')} </Button>}
|
action={<Button onClick={() => setCreateOpen(true)}><Plus className="h-4 w-4 mr-1" /> {i18n.t('monitor.logRbac.newPermission')} </Button>}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@@ -319,7 +319,7 @@ export default function LogRBAC() {
|
|||||||
</div>
|
</div>
|
||||||
{selectedUser ? (
|
{selectedUser ? (
|
||||||
assignments.length === 0 ? (
|
assignments.length === 0 ? (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logrbactsx.sa120fc78')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logRbac.noPermissionAssigned')} </p>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1.5">
|
||||||
{assignments.map((a) => {
|
{assignments.map((a) => {
|
||||||
@@ -340,7 +340,7 @@ export default function LogRBAC() {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)] flex items-center gap-1"><Users className="w-3.5 h-3.5" /> {i18n.t('monitor.logrbactsx.s9be00c95')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)] flex items-center gap-1"><Users className="w-3.5 h-3.5" /> {i18n.t('monitor.logRbac.selectUserHint')} </p>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -373,7 +373,7 @@ export default function LogRBAC() {
|
|||||||
</Badge>
|
</Badge>
|
||||||
))}
|
))}
|
||||||
{previewRoleId !== null && previewMatches.length === 0 && (
|
{previewRoleId !== null && previewMatches.length === 0 && (
|
||||||
<span className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logrbactsx.s64096f4d')} </span>
|
<span className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logRbac.noMatchHint')} </span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export function LokiLabelBrowser({ datasourceId, query, timeRange, onQueryChange
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-1 overflow-y-auto max-h-48 p-1">
|
<div className="flex-1 overflow-y-auto max-h-48 p-1">
|
||||||
{!activeLabel && <p className="text-[11px] px-2 py-4 text-center" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.lokilabelbrowse.s088b9477')} </p>}
|
{!activeLabel && <p className="text-[11px] px-2 py-4 text-center" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.lokiLabelBrowse.selectLabelHint')} </p>}
|
||||||
{loadingValues && <div className="flex justify-center py-6"><Loader2 className="h-4 w-4 animate-spin" /></div>}
|
{loadingValues && <div className="flex justify-center py-6"><Loader2 className="h-4 w-4 animate-spin" /></div>}
|
||||||
{!loadingValues && activeLabel && values.map((v) => (
|
{!loadingValues && activeLabel && values.map((v) => (
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ export function QueryHistoryPanel({ visible, onClose, onSelect, onCreateAlert }:
|
|||||||
{history.length === 0 ? (
|
{history.length === 0 ? (
|
||||||
<div className="flex flex-col items-center justify-center h-48 gap-2">
|
<div className="flex flex-col items-center justify-center h-48 gap-2">
|
||||||
<Clock className="h-8 w-8" style={{ color: 'var(--dg-border)' }} />
|
<Clock className="h-8 w-8" style={{ color: 'var(--dg-border)' }} />
|
||||||
<span className="text-xs" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.queryhistorypan.s1e60bc17')} </span>
|
<span className="text-xs" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.queryHistoryPan.emptyHistory')} </span>
|
||||||
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.queryhistorypan.s3895021f')} </span>
|
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.queryHistoryPan.autoRecordHint')} </span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="divide-y" style={{ borderColor: 'var(--dg-border)' }}>
|
<div className="divide-y" style={{ borderColor: 'var(--dg-border)' }}>
|
||||||
@@ -139,7 +139,7 @@ export function QueryHistoryPanel({ visible, onClose, onSelect, onCreateAlert }:
|
|||||||
onClick={() => onSelect(item)}
|
onClick={() => onSelect(item)}
|
||||||
className="h-6 w-6 flex items-center justify-center rounded transition-colors"
|
className="h-6 w-6 flex items-center justify-center rounded transition-colors"
|
||||||
style={{ background: 'var(--dg-bg-tertiary)', color: 'var(--dg-green)' }}
|
style={{ background: 'var(--dg-bg-tertiary)', color: 'var(--dg-green)' }}
|
||||||
title={i18n.t('monitor.queryhistorypan.s4fb36a61')}
|
title={i18n.t('monitor.queryHistoryPan.runQuery')}
|
||||||
>
|
>
|
||||||
<Play className="h-3 w-3" />
|
<Play className="h-3 w-3" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export function SavedQueriesPanel({ visible, onClose, onSelect }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex-1 overflow-y-auto p-3 space-y-2">
|
<div className="flex-1 overflow-y-auto p-3 space-y-2">
|
||||||
{items.length === 0 ? (
|
{items.length === 0 ? (
|
||||||
<p className="text-xs text-center py-8" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.savedqueriespan.s9c8dc62b')} </p>
|
<p className="text-xs text-center py-8" style={{ color: 'var(--dg-text-muted)' }}> {i18n.t('monitor.savedQueriesPan.emptySaved')} </p>
|
||||||
) : items.map((item) => (
|
) : items.map((item) => (
|
||||||
<div
|
<div
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function useAuditSettings() {
|
|||||||
setApprovalRequired(policy.approvalRequired);
|
setApprovalRequired(policy.approvalRequired);
|
||||||
useSessionSecurityStore.getState().setPolicy(policy);
|
useSessionSecurityStore.getState().setPolicy(policy);
|
||||||
} catch {
|
} catch {
|
||||||
toast.error(i18n.t("system.useauditsetting.s32e8a76e"));
|
toast.error(i18n.t("system.auditSetting.loadFailed"));
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ export function useAuditSettings() {
|
|||||||
if (
|
if (
|
||||||
!RETENTION_OPTIONS.includes(days as (typeof RETENTION_OPTIONS)[number])
|
!RETENTION_OPTIONS.includes(days as (typeof RETENTION_OPTIONS)[number])
|
||||||
) {
|
) {
|
||||||
toast.error(i18n.t("system.useauditsetting.s51680af0"));
|
toast.error(i18n.t("system.auditSetting.invalidRetentionDays"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setApplying(true);
|
setApplying(true);
|
||||||
@@ -134,7 +134,7 @@ export function useAuditSettings() {
|
|||||||
detail =
|
detail =
|
||||||
s.total > 0
|
s.total > 0
|
||||||
? `,清理 ${s.total} 条`
|
? `,清理 ${s.total} 条`
|
||||||
: i18n.t("system.useauditsetting.s7d55bd57");
|
: i18n.t("system.auditSetting.noExpiredRecords");
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// ignore
|
// ignore
|
||||||
|
|||||||
@@ -56,11 +56,10 @@ export function CronJobManager() {
|
|||||||
|
|
||||||
const _confirm = useConfirm();
|
const _confirm = useConfirm();
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
const pageTabs = useMemo(() => [
|
const pageTabs = useMemo(() => [
|
||||||
{ id: 'user', label: t('task.cronJobStats.userJobs'), badge: jobs.length || undefined },
|
{ id: 'user', label: t('task.cronJobStats.userJobs'), badge: jobs.length || undefined },
|
||||||
{ id: 'system', label: t('automation.systemTask'), badge: systemTaskCount || undefined },
|
{ id: 'system', label: t('automation.systemTask'), badge: systemTaskCount || undefined },
|
||||||
], [jobs.length, systemTaskCount]);
|
], [jobs.length, systemTaskCount, t]);
|
||||||
|
|
||||||
const openCreate = () => {
|
const openCreate = () => {
|
||||||
setEditJob(null);
|
setEditJob(null);
|
||||||
|
|||||||
+259
-160
@@ -3709,7 +3709,10 @@
|
|||||||
"title": "Monitoring",
|
"title": "Monitoring",
|
||||||
"subtitle": "Comprehensive Monitoring & Alerting",
|
"subtitle": "Comprehensive Monitoring & Alerting",
|
||||||
"resourceMonitor": "Resource Monitor",
|
"resourceMonitor": "Resource Monitor",
|
||||||
"hostMonitor": "Host Monitor",
|
"hostMonitor": {
|
||||||
|
"loadingData": "Loading monitor data...",
|
||||||
|
"title": "Host Monitor"
|
||||||
|
},
|
||||||
"hostMetrics": "Host Metrics",
|
"hostMetrics": "Host Metrics",
|
||||||
"hostList": "Host List",
|
"hostList": "Host List",
|
||||||
"hostDetail": "Host Details",
|
"hostDetail": "Host Details",
|
||||||
@@ -4110,64 +4113,6 @@
|
|||||||
"toastPanelFailed": "Failed to add"
|
"toastPanelFailed": "Failed to add"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"middlewaremonit.sbbe62a10": "No middleware monitoring targets",
|
|
||||||
"middlewaremonit.se5caf12b": "Add Platform Default",
|
|
||||||
"middlewaremonit.s63edd678": "Add Manually",
|
|
||||||
"middlewaremonit.s8ec8a6e8": "Add Now",
|
|
||||||
"sitemonitortsx.sb2da5804": "Alerting",
|
|
||||||
"sitemonitortsx.s62a0023a": "Probe task does not exist or has been deleted",
|
|
||||||
"sitemonitortsx.s30319e1c": "Probe Tasks",
|
|
||||||
"sitemonitortsx.sa5e6b654": "Click to view details",
|
|
||||||
"sitemonitortsx.s6173cf9a": "Configure probe tasks by protocol type, the system will automatically probe at intervals",
|
|
||||||
"snmpmonitortsx.s29b90990": "Add SNMP Device",
|
|
||||||
"snmpmonitortsx.s11ea7d0c": "Select vendor OID template, configure management IP and Community",
|
|
||||||
"snmpmonitortsx.s9f694f60": "Device Name",
|
|
||||||
"hostmonitortsx.sc23e802e": "Loading monitor data...",
|
|
||||||
"metricsexplorer.s3ec50388": "Metrics List",
|
|
||||||
"helpersts.sf972b7b1": "Last 1 hour",
|
|
||||||
"helpersts.s6e99b786": "Last 24 hours",
|
|
||||||
"helpersts.sd765efc4": "Last 7 days",
|
|
||||||
"helpersts.sd3fd8f1d": "DNS Resolution Latency & Results",
|
|
||||||
"portpolicydialo.s868e3dd0": "Port Monitoring Policy",
|
|
||||||
"portpolicydialo.scd27ad47": "Configure Agent port reporting filter rules",
|
|
||||||
"portpolicydialo.s7824bdd1": "Filter Mode",
|
|
||||||
"portpolicydialo.s2ff12d51": "Never report",
|
|
||||||
"mwoverviewchart.s07d3e014": "MySQL Connections",
|
|
||||||
"chartrangehintt.s39ce9bad": "Selected period:",
|
|
||||||
"snmpoverviewcha.s64f5a4da": "Device CPU Comparison",
|
|
||||||
"snmpoverviewcha.s1f441890": "No CPU metrics available, please complete collection first",
|
|
||||||
"snmpoverviewcha.sbb0ae97f": "Device Status",
|
|
||||||
"alertrulestabts.s65939ccd": "Trigger Condition",
|
|
||||||
"alertchanneldia.s976ad48f": "Notification Channel Configuration",
|
|
||||||
"alertchanneldia.s8c852a4c": "Not Tested",
|
|
||||||
"alertchanneldia.sbdab1c59": "Enable this channel",
|
|
||||||
"alertmanagertsx.s358b05d0": "Alert Trends",
|
|
||||||
"alertmanagertsx.s615fa6cb": "Past 24 hours alert statistics",
|
|
||||||
"logrbactsx.s6058845c": "New Permission",
|
|
||||||
"logrbactsx.sa120fc78": "This user has not been assigned log permissions",
|
|
||||||
"logrbactsx.s9be00c95": "Select a user to view assigned permissions",
|
|
||||||
"logrbactsx.s64096f4d": "No match — please adjust the regex",
|
|
||||||
"savedqueriespan.s9c8dc62b": "No saved queries",
|
|
||||||
"queryhistorypan.s1e60bc17": "No query history",
|
|
||||||
"queryhistorypan.s3895021f": "Queries will be automatically recorded after execution",
|
|
||||||
"queryhistorypan.s4fb36a61": "Execute Query",
|
|
||||||
"logdingassistan.s26b79b6b": "DingDang · Add Alert",
|
|
||||||
"logdingassistan.s1a663141": "DingDang",
|
|
||||||
"logclusterpanel.s38112792": "Auto-cluster based on log similarity",
|
|
||||||
"logclusterpanel.se909e426": "Sample logs:",
|
|
||||||
"lokilabelbrowse.s088b9477": "Select a label on the left",
|
|
||||||
"logquerytoolbar.s8b76adb2": "To page",
|
|
||||||
"logalertspanelt.s5bc514d8": "Only saves alert policies (LogQL / Lucene), log data remains in external Loki / ES",
|
|
||||||
"esindexpickerts.sa0eff8ea": "Select or search ES index",
|
|
||||||
"esindexpickerts.s9ae0c004": "Search index...",
|
|
||||||
"esindexpickerts.saf5cc132": "No matching index",
|
|
||||||
"zabbixdatasourc.s79e929d8": "Configure Zabbix API connection to get host monitoring data",
|
|
||||||
"zabbixdatasourc.sc9c9bd18": "No Zabbix data sources",
|
|
||||||
"zabbixdatasourc.s85260abd": "Direct DB Connection",
|
|
||||||
"zabbixdatasourc.s413ec771": "Read-only User Disable Confirmation",
|
|
||||||
"zabbixdatasourc.s6d4d6f81": "Disable Data Alignment",
|
|
||||||
"prometheusdashb.s5e8eb212": "Connecting…",
|
|
||||||
"zabbixdashboard.sdb131ab4": "No monitored Zabbix hosts found",
|
|
||||||
"alertChannel": {
|
"alertChannel": {
|
||||||
"addBtn": "Add Channel",
|
"addBtn": "Add Channel",
|
||||||
"addTitle": "Add Notification Channel",
|
"addTitle": "Add Notification Channel",
|
||||||
@@ -4248,7 +4193,8 @@
|
|||||||
"loading": "Loading rules...",
|
"loading": "Loading rules...",
|
||||||
"deleteRule": "Delete Alert Rule",
|
"deleteRule": "Delete Alert Rule",
|
||||||
"deleteConfirm": "Delete this alert rule?",
|
"deleteConfirm": "Delete this alert rule?",
|
||||||
"deleted": "Alert rule deleted"
|
"deleted": "Alert rule deleted",
|
||||||
|
"condition": "Trigger Condition"
|
||||||
},
|
},
|
||||||
"contactDialog": {
|
"contactDialog": {
|
||||||
"addContactBtn": "Add Contact",
|
"addContactBtn": "Add Contact",
|
||||||
@@ -4778,7 +4724,11 @@
|
|||||||
"scopeCount": "{{count}} scopes",
|
"scopeCount": "{{count}} scopes",
|
||||||
"userPolicyHint": "Users without any policy are not blocked (backward compatible); once assigned, only queries matching policies are allowed.",
|
"userPolicyHint": "Users without any policy are not blocked (backward compatible); once assigned, only queries matching policies are allowed.",
|
||||||
"assign": "Assign",
|
"assign": "Assign",
|
||||||
"all": "All"
|
"all": "All",
|
||||||
|
"newPermission": "New Permission",
|
||||||
|
"noMatchHint": "No match — please adjust the regex",
|
||||||
|
"selectUserHint": "Select a user to view assigned permissions",
|
||||||
|
"noPermissionAssigned": "This user has not been assigned log permissions"
|
||||||
},
|
},
|
||||||
"lbl": {
|
"lbl": {
|
||||||
"unlimited": "Unlimited",
|
"unlimited": "Unlimited",
|
||||||
@@ -4951,13 +4901,107 @@
|
|||||||
},
|
},
|
||||||
"logQueryToolbar": {
|
"logQueryToolbar": {
|
||||||
"exactMatch": "Exact match",
|
"exactMatch": "Exact match",
|
||||||
"partialMatch": "Partial match"
|
"partialMatch": "Partial match",
|
||||||
|
"goTo": "To page"
|
||||||
},
|
},
|
||||||
"healthProbe": {
|
"healthProbe": {
|
||||||
"namePlaceholder": "e.g., cex-agent health check"
|
"namePlaceholder": "e.g., cex-agent health check"
|
||||||
},
|
},
|
||||||
"hostMonitorTypes": {
|
"hostMonitorTypes": {
|
||||||
"systemInfo": "System Info"
|
"systemInfo": "System Info"
|
||||||
|
},
|
||||||
|
"alertChannelDialog": {
|
||||||
|
"notTested": "Not Tested",
|
||||||
|
"title": "Notification Channel Configuration",
|
||||||
|
"enableChannel": "Enable this channel"
|
||||||
|
},
|
||||||
|
"alertManager": {
|
||||||
|
"trendTitle": "Alert Trends",
|
||||||
|
"last24hStats": "Past 24 hours alert statistics"
|
||||||
|
},
|
||||||
|
"chartRangeHint": {
|
||||||
|
"selectedRange": "Selected period:"
|
||||||
|
},
|
||||||
|
"esIndexPicker": {
|
||||||
|
"searchPlaceholder": "Search index...",
|
||||||
|
"selectHint": "Select or search ES index",
|
||||||
|
"noMatch": "No matching index"
|
||||||
|
},
|
||||||
|
"helpers": {
|
||||||
|
"last24h": "Last 24 hours",
|
||||||
|
"dnsHint": "DNS Resolution Latency & Results",
|
||||||
|
"last7d": "Last 7 days",
|
||||||
|
"last1h": "Last 1 hour"
|
||||||
|
},
|
||||||
|
"logAlertSpanel": {
|
||||||
|
"desc": "Only saves alert policies (LogQL / Lucene), log data remains in external Loki / ES"
|
||||||
|
},
|
||||||
|
"logClusterPanel": {
|
||||||
|
"desc": "Auto-cluster based on log similarity",
|
||||||
|
"sampleLog": "Sample logs:"
|
||||||
|
},
|
||||||
|
"logDingAssistant": {
|
||||||
|
"ding": "DingDang",
|
||||||
|
"addAlert": "DingDang · Add Alert"
|
||||||
|
},
|
||||||
|
"lokiLabelBrowse": {
|
||||||
|
"selectLabelHint": "Select a label on the left"
|
||||||
|
},
|
||||||
|
"metricsExplorer": {
|
||||||
|
"metricList": "Metrics List"
|
||||||
|
},
|
||||||
|
"middlewareMonit": {
|
||||||
|
"manualAdd": "Add Manually",
|
||||||
|
"addNow": "Add Now",
|
||||||
|
"emptyTargets": "No middleware monitoring targets",
|
||||||
|
"addPlatformDefault": "Add Platform Default"
|
||||||
|
},
|
||||||
|
"mwOverviewChart": {
|
||||||
|
"mysqlConnections": "MySQL Connections"
|
||||||
|
},
|
||||||
|
"portPolicyDialog": {
|
||||||
|
"neverReport": "Never report",
|
||||||
|
"filterMode": "Filter Mode",
|
||||||
|
"title": "Port Monitoring Policy",
|
||||||
|
"desc": "Configure Agent port reporting filter rules"
|
||||||
|
},
|
||||||
|
"prometheusDashb": {
|
||||||
|
"connecting": "Connecting…"
|
||||||
|
},
|
||||||
|
"queryHistoryPan": {
|
||||||
|
"emptyHistory": "No query history",
|
||||||
|
"autoRecordHint": "Queries will be automatically recorded after execution",
|
||||||
|
"runQuery": "Execute Query"
|
||||||
|
},
|
||||||
|
"savedQueriesPan": {
|
||||||
|
"emptySaved": "No saved queries"
|
||||||
|
},
|
||||||
|
"siteMonitor": {
|
||||||
|
"probeTaskTitle": "Probe Tasks",
|
||||||
|
"probeDesc": "Configure probe tasks by protocol type, the system will automatically probe at intervals",
|
||||||
|
"taskNotFound": "Probe task does not exist or has been deleted",
|
||||||
|
"clickToObserve": "Click to view details",
|
||||||
|
"alerting": "Alerting"
|
||||||
|
},
|
||||||
|
"snmpMonitor": {
|
||||||
|
"addDeviceDesc": "Select vendor OID template, configure management IP and Community",
|
||||||
|
"addDeviceTitle": "Add SNMP Device",
|
||||||
|
"deviceName": "Device Name"
|
||||||
|
},
|
||||||
|
"snmpOverviewChart": {
|
||||||
|
"noCpuMetrics": "No CPU metrics available, please complete collection first",
|
||||||
|
"cpuCompare": "Device CPU Comparison",
|
||||||
|
"deviceStatus": "Device Status"
|
||||||
|
},
|
||||||
|
"zabbixDashboard": {
|
||||||
|
"noHostFound": "No monitored Zabbix hosts found"
|
||||||
|
},
|
||||||
|
"zabbixDatasource": {
|
||||||
|
"readonlyConfirm": "Read-only User Disable Confirmation",
|
||||||
|
"disableAlign": "Disable Data Alignment",
|
||||||
|
"configDesc": "Configure Zabbix API connection to get host monitoring data",
|
||||||
|
"directDb": "Direct DB Connection",
|
||||||
|
"emptyDatasource": "No Zabbix data sources"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"task": {
|
"task": {
|
||||||
@@ -5910,48 +5954,78 @@
|
|||||||
"loadFailed": "Failed to load",
|
"loadFailed": "Failed to load",
|
||||||
"notFound": "Resource not found"
|
"notFound": "Resource not found"
|
||||||
},
|
},
|
||||||
"podmetricspaget.s58173b22": "All Namespaces",
|
"deploymentBundle": {
|
||||||
"podexecterminal.sc8107726": "\\r\\n\\x1b[31m[ConnectionError occurred]\\x1b[0m\\r\\n",
|
"yamlEmpty": "YAML content is empty or parsing failed"
|
||||||
"podlogsviewerts.s58b02a7a": "Last 100 lines",
|
},
|
||||||
"podlogsviewerts.s9a036801": "Last 500 lines",
|
"deploymentEditAdvanced": {
|
||||||
"podlogsviewerts.sf89a330c": "Last 1000 lines",
|
"tolerations": "Tolerations",
|
||||||
"podlogsviewerts.sd9c71f71": "Live Tail",
|
"any": "Any",
|
||||||
"podlogsviewerts.sf3280b73": " (buffer full)",
|
"noTolerations": "No tolerations configured",
|
||||||
"podlogsviewerts.sd7eb1e98": "Follow Bottom",
|
"saved": "Advanced settings saved"
|
||||||
"podlogsviewerts.s130db316": "Follow Paused",
|
},
|
||||||
"deploymentedita.s9762d0a4": "Advanced settings saved",
|
"deploymentEditService": {
|
||||||
"deploymentedita.s13a8310b": "Tolerations",
|
"associated": "Related",
|
||||||
"deploymentedita.s8bc06bde": "No tolerations configured",
|
"backToView": "Go Back",
|
||||||
"deploymentedita.s2a6eb2dd": "Any",
|
"notDetected": "Not detected",
|
||||||
"deploymentviewt.s6d2d954e": "Pod IP",
|
"quickAddPorts": "Quick add common ports",
|
||||||
"deploymentedits.sb8eef7f0": "Selector:",
|
"volumeName": "Volume Name",
|
||||||
"deploymentedits.sd0ad85b8": "Only show Services with selector matching this Deployment",
|
"selectorLabel": "Selector:",
|
||||||
"deploymentedits.s1c3cf7f5": "Related",
|
"selectorHint": "Only show Services with selector matching this Deployment",
|
||||||
"deploymentedits.s83907cde": "Quick add common ports",
|
"subPath": "SubPath"
|
||||||
"deploymentedits.s5847b0f9": "Not detected",
|
},
|
||||||
"deploymentedits.s3a77522f": "Go Back",
|
"deploymentView": {
|
||||||
"deploymentbundl.s47161e05": "YAML content is empty or parsing failed",
|
"podIp": "Pod IP"
|
||||||
"eventspagetsx.s841389c5": "Filter:",
|
},
|
||||||
"eventspagetsx.s0e5b83cc": "Alert Events",
|
"deploymentWorkload": {
|
||||||
"eventspagetsx.s98c99f62": "All Time",
|
"paused": "Updates Paused",
|
||||||
"eventspagetsx.sfb995166": "All Types",
|
"adjustImage": "Update Image"
|
||||||
"namespaceresour.s64e327ed": "Search...",
|
},
|
||||||
"namespaceresour.s1d8d6e2e": "Current Details",
|
"eventsPage": {
|
||||||
"namespacemanage.sa01a9963": "Age",
|
"alertEvents": "Alert Events",
|
||||||
"podfilebrowsert.sf42649da": "(Empty file)",
|
"filterLabel": "Filter:",
|
||||||
"resourcevisuale.s54c78d4f": "Switch to YAML Edit",
|
"allTime": "All Time",
|
||||||
"deploymentedits.sa3119d33": "Volume Name",
|
"allTypes": "All Types"
|
||||||
"deploymentedits.sf4b25a22": "SubPath",
|
},
|
||||||
"kubernetesclust.sbf23eb8e": "Version (optional)",
|
"kubernetesCluster": {
|
||||||
"kubernetesclust.saaa159b7": "Connection Method",
|
"accessMethod": "Connection Method",
|
||||||
"deploymentworkl.sf2e0208b": "Update Image",
|
"versionOptional": "Version (optional)"
|
||||||
"deploymentworkl.s8be2521d": "Updates Paused",
|
},
|
||||||
"workloadviewpag.sf339d471": "Updating",
|
"namespaceManage": {
|
||||||
"workloadviewpag.sea639697": "Replicas Ready",
|
"age": "Age"
|
||||||
"workloadviewpag.s23c944c1": "All Ready",
|
},
|
||||||
"workloadviewpag.sac100213": "Partially Not Ready",
|
"namespaceResource": {
|
||||||
"workloadviewpag.se4b61048": "No container data, please check YAML",
|
"conditionsDetail": "Current Details",
|
||||||
"workloadviewpag.s7f541ee2": "Scale StatefulSet"
|
"searchPlaceholder": "Search..."
|
||||||
|
},
|
||||||
|
"podExecTerminal": {
|
||||||
|
"connectError": "\\r\\n\\x1b[31m[ConnectionError occurred]\\x1b[0m\\r\\n"
|
||||||
|
},
|
||||||
|
"podFileBrowser": {
|
||||||
|
"emptyFile": "(Empty file)"
|
||||||
|
},
|
||||||
|
"podLogsViewer": {
|
||||||
|
"followPaused": "Follow Paused",
|
||||||
|
"last100": "Last 100 lines",
|
||||||
|
"last500": "Last 500 lines",
|
||||||
|
"followBottom": "Follow Bottom",
|
||||||
|
"liveTail": "Live Tail",
|
||||||
|
"bufferFull": " (buffer full)",
|
||||||
|
"last1000": "Last 1000 lines"
|
||||||
|
},
|
||||||
|
"podMetricsPage": {
|
||||||
|
"allNamespaces": "All Namespaces"
|
||||||
|
},
|
||||||
|
"resourceVisualEditor": {
|
||||||
|
"switchToYaml": "Switch to YAML Edit"
|
||||||
|
},
|
||||||
|
"workloadViewPage": {
|
||||||
|
"allReady": "All Ready",
|
||||||
|
"scaleStatefulSet": "Scale StatefulSet",
|
||||||
|
"partialReady": "Partially Not Ready",
|
||||||
|
"noContainerData": "No container data, please check YAML",
|
||||||
|
"replicasReady": "Replicas Ready",
|
||||||
|
"updating": "Updating"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"title": "Pipelines",
|
"title": "Pipelines",
|
||||||
@@ -6246,12 +6320,18 @@
|
|||||||
"username": "Username",
|
"username": "Username",
|
||||||
"usernamePlaceholder": "Enter username",
|
"usernamePlaceholder": "Enter username",
|
||||||
"usernameRequired": "Username is required",
|
"usernameRequired": "Username is required",
|
||||||
"deployrbactsx.sef9548ee": "This user has not been assigned Job permissions",
|
"buildNodesManage": {
|
||||||
"buildnodesmanag.sa419fe03": "Default Schedule",
|
"maxConcurrency": "Max Concurrency",
|
||||||
"buildnodesmanag.s8e408e28": "Max Concurrency",
|
"defaultSchedule": "Default Schedule",
|
||||||
"buildnodesmanag.sbcfcd088": "Workspace Path",
|
"workspacePath": "Workspace Path"
|
||||||
"deploytargetfie.sb4240171": "No available hosts",
|
},
|
||||||
"deploytargetfie.sb2b6db98": "After build, SCP upload jar/tar.gz to remote directory and execute deploy command"
|
"deployRbac": {
|
||||||
|
"noJobPermission": "This user has not been assigned Job permissions"
|
||||||
|
},
|
||||||
|
"deployTargetField": {
|
||||||
|
"scpDeployHint": "After build, SCP upload jar/tar.gz to remote directory and execute deploy command",
|
||||||
|
"noHostAvailable": "No available hosts"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"automation": {
|
"automation": {
|
||||||
"title": "Task Automation",
|
"title": "Task Automation",
|
||||||
@@ -6611,19 +6691,6 @@
|
|||||||
"editDomainDesc": "Modify domain registration, DNS config and SSL certificate status",
|
"editDomainDesc": "Modify domain registration, DNS config and SSL certificate status",
|
||||||
"addDomainDesc": "Enter domain info including registrar, DNS provider and expiry date",
|
"addDomainDesc": "Enter domain info including registrar, DNS provider and expiry date",
|
||||||
"daysLeft": "{{count}} days",
|
"daysLeft": "{{count}} days",
|
||||||
"platformmanager.s452abbb1": "Are you sure you want to delete this cloud platform? This action cannot be undone.",
|
|
||||||
"billingrecorddi.s09e541fd": "Record a daily cloud resource cost",
|
|
||||||
"billingrecorddi.sb11d8416": "Vendor *",
|
|
||||||
"billingrecorddi.s3abdefe2": "Date *",
|
|
||||||
"billingrecorddi.s6f252687": "Cost (CNY) *",
|
|
||||||
"billingruledial.s75227f20": "Set cost threshold, auto-alert when exceeded",
|
|
||||||
"billingruledial.sc356f198": "All Vendors",
|
|
||||||
"billingruledial.sd7650ece": "Compare",
|
|
||||||
"billingruledial.s3dba9756": "Greater Than >",
|
|
||||||
"billingruledial.s8e1e26d1": "Greater Than or Equal ≥",
|
|
||||||
"billingruledial.s0196c18c": "Less Than <",
|
|
||||||
"billingruledial.s45c301a8": "Less Than or Equal ≤",
|
|
||||||
"billingruledial.s11f9fb4c": "Threshold (CNY) *",
|
|
||||||
"platform": {
|
"platform": {
|
||||||
"publicCloud": "Public Cloud",
|
"publicCloud": "Public Cloud",
|
||||||
"searchPlaceholder": "Search platform name or code...",
|
"searchPlaceholder": "Search platform name or code...",
|
||||||
@@ -6642,12 +6709,27 @@
|
|||||||
"fillFields": "Please fill in rule name and threshold",
|
"fillFields": "Please fill in rule name and threshold",
|
||||||
"editRule": "Edit Alert Rule",
|
"editRule": "Edit Alert Rule",
|
||||||
"addRule": "Add Alert Rule",
|
"addRule": "Add Alert Rule",
|
||||||
"namePlaceholder": "e.g., Daily cost over ¥500 alert"
|
"namePlaceholder": "e.g., Daily cost over ¥500 alert",
|
||||||
|
"lt": "Less Than <",
|
||||||
|
"thresholdLabel": "Threshold (CNY) *",
|
||||||
|
"gt": "Greater Than >",
|
||||||
|
"lte": "Less Than or Equal ≤",
|
||||||
|
"desc": "Set cost threshold, auto-alert when exceeded",
|
||||||
|
"gte": "Greater Than or Equal ≥",
|
||||||
|
"allProviders": "All Vendors",
|
||||||
|
"compare": "Compare"
|
||||||
},
|
},
|
||||||
"billingRecordDialog": {
|
"billingRecordDialog": {
|
||||||
"fillFields": "Please fill in required fields",
|
"fillFields": "Please fill in required fields",
|
||||||
"editRecord": "Edit Cost Record",
|
"editRecord": "Edit Cost Record",
|
||||||
"mainAccount": "Main Account"
|
"mainAccount": "Main Account",
|
||||||
|
"desc": "Record a daily cloud resource cost",
|
||||||
|
"dateLabel": "Date *",
|
||||||
|
"costLabel": "Cost (CNY) *",
|
||||||
|
"providerLabel": "Vendor *"
|
||||||
|
},
|
||||||
|
"platformManager": {
|
||||||
|
"deleteConfirm": "Are you sure you want to delete this cloud platform? This action cannot be undone."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"agent": {
|
"agent": {
|
||||||
@@ -6783,7 +6865,12 @@
|
|||||||
"noAgentData": "No agent data",
|
"noAgentData": "No agent data",
|
||||||
"agentCount": "{{count}} agents",
|
"agentCount": "{{count}} agents",
|
||||||
"agentManage": "Agent Management",
|
"agentManage": "Agent Management",
|
||||||
"agentMonitor": "Agent Monitor",
|
"agentMonitor": {
|
||||||
|
"title": "Agent Monitor",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"deployAgent": "Deploy Agent",
|
||||||
|
"subtitle": "Real-time monitoring of Agent-reported host metrics"
|
||||||
|
},
|
||||||
"agentMetrics": "Agent Metrics",
|
"agentMetrics": "Agent Metrics",
|
||||||
"agentConfig": "Agent Config",
|
"agentConfig": "Agent Config",
|
||||||
"agentLog": "Agent Log",
|
"agentLog": "Agent Log",
|
||||||
@@ -6800,18 +6887,6 @@
|
|||||||
"agentServiceRestart": "Restart",
|
"agentServiceRestart": "Restart",
|
||||||
"agentServiceEnable": "Enable",
|
"agentServiceEnable": "Enable",
|
||||||
"agentServiceDisable": "Disable",
|
"agentServiceDisable": "Disable",
|
||||||
"agentalertstsx.sbfdcf242": "Metric:",
|
|
||||||
"agentalertstsx.s2d13763b": "Current Value:",
|
|
||||||
"agentmonitortsx.sa75d7519": "Real-time monitoring of Agent-reported host metrics",
|
|
||||||
"hostdetaildialo.sffa4f720": "View host details and metric trends",
|
|
||||||
"hostdetaildialo.s3851af2c": "Last 1 hour",
|
|
||||||
"hostdetaildialo.s2d59b172": "Last 6 hours",
|
|
||||||
"hostdetaildialo.s768a1b34": "Last 24 hours",
|
|
||||||
"hostdetaildialo.sdc73dbe9": "No historical data",
|
|
||||||
"hostdetaildialo.se7887d60": "No port data",
|
|
||||||
"agentmonitortsx.s1a2b3c4d": "Agent Monitor",
|
|
||||||
"agentmonitortsx.s2b3c4d5e": "Refresh",
|
|
||||||
"agentmonitortsx.s3c4d5e6f": "Deploy Agent",
|
|
||||||
"agentmonitortsx.s4d5e6f7g": "Deploy Now",
|
"agentmonitortsx.s4d5e6f7g": "Deploy Now",
|
||||||
"agentmonitortsx.s5e6f7g8h": "Online",
|
"agentmonitortsx.s5e6f7g8h": "Online",
|
||||||
"agentmonitortsx.s6f7g8h9i": "Offline",
|
"agentmonitortsx.s6f7g8h9i": "Offline",
|
||||||
@@ -6897,7 +6972,19 @@
|
|||||||
"monitor2": {
|
"monitor2": {
|
||||||
"commandPlaceholder2": "e.g., free -m && df -h"
|
"commandPlaceholder2": "e.g., free -m && df -h"
|
||||||
},
|
},
|
||||||
"portCount": "Port Count"
|
"portCount": "Port Count",
|
||||||
|
"agentAlerts": {
|
||||||
|
"currentValue": "Current Value:",
|
||||||
|
"metric": "Metric:"
|
||||||
|
},
|
||||||
|
"hostDetailDialog": {
|
||||||
|
"last6h": "Last 6 hours",
|
||||||
|
"last1h": "Last 1 hour",
|
||||||
|
"last24h": "Last 24 hours",
|
||||||
|
"noHistoryData": "No historical data",
|
||||||
|
"noPortData": "No port data",
|
||||||
|
"desc": "View host details and metric trends"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"system": {
|
"system": {
|
||||||
"title": "System",
|
"title": "System",
|
||||||
@@ -7308,9 +7395,6 @@
|
|||||||
"authHeaderValue": "X-AIOps-Access-Key: <your access credential>",
|
"authHeaderValue": "X-AIOps-Access-Key: <your access credential>",
|
||||||
"auditWebssh": "Audit live WebSSH sessions",
|
"auditWebssh": "Audit live WebSSH sessions",
|
||||||
"ldapClickRefresh": "Click \"Refresh\" to load LDAP users",
|
"ldapClickRefresh": "Click \"Refresh\" to load LDAP users",
|
||||||
"useauditsetting.s32e8a76e": "Failed to load audit settings",
|
|
||||||
"useauditsetting.s51680af0": "Please select valid retention days",
|
|
||||||
"useauditsetting.s7d55bd57": ", no expired records",
|
|
||||||
"useldapmanageme.ouExists": "OU \"{{name}}\" already exists, please use a different name",
|
"useldapmanageme.ouExists": "OU \"{{name}}\" already exists, please use a different name",
|
||||||
"useldapmanageme.createOuFailed": "Failed to create OU: ",
|
"useldapmanageme.createOuFailed": "Failed to create OU: ",
|
||||||
"ldapMgmt": {
|
"ldapMgmt": {
|
||||||
@@ -7320,6 +7404,11 @@
|
|||||||
"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: "
|
||||||
|
},
|
||||||
|
"auditSetting": {
|
||||||
|
"loadFailed": "Failed to load audit settings",
|
||||||
|
"invalidRetentionDays": "Please select valid retention days",
|
||||||
|
"noExpiredRecords": ", no expired records"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"aiops": {
|
"aiops": {
|
||||||
@@ -7613,21 +7702,6 @@
|
|||||||
"noModelContent": "(The model returned no content)",
|
"noModelContent": "(The model returned no content)",
|
||||||
"selfEvolveDesc": "Four-layer memory learns asynchronously; historical experience is auto-injected for similar tasks — smarter with use.",
|
"selfEvolveDesc": "Four-layer memory learns asynchronously; historical experience is auto-injected for similar tasks — smarter with use.",
|
||||||
"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",
|
||||||
"aianalysisresul.s52bbd52d": "Select an alert on the left for AI analysis",
|
|
||||||
"aianalysisresul.sf7d04a0f": "Correlating logs, metrics and historical cases",
|
|
||||||
"analyzerhelpers.sc4e238d7": "===== System Load =====",
|
|
||||||
"analyzerhelpers.sfaca56f5": "===== High CPU Process Details =====",
|
|
||||||
"analyzerhelpers.s303a9855": "Highest CPU Process: PID=$PID",
|
|
||||||
"analyzerhelpers.s5b91c16b": "===== Disk Usage Before Cleanup =====",
|
|
||||||
"analyzerhelpers.s3b1993da": "===== Clean Logs Older Than 30 Days =====",
|
|
||||||
"analyzerhelpers.sb513e117": "===== Clean System Cache =====",
|
|
||||||
"analyzerhelpers.s4c139c9f": "===== Disk Usage After Cleanup =====",
|
|
||||||
"analyzerhelpers.se59337b9": "===== Check Service Status =====",
|
|
||||||
"analyzerhelpers.scdd631f0": "===== Check Port Listening =====",
|
|
||||||
"analyzerhelpers.sad3e7bba": "===== Restart Failed Services =====",
|
|
||||||
"agentclimessage.s21d68b2d": "Thinking",
|
|
||||||
"assistantts.s16f94bee": "Streaming response unavailable",
|
|
||||||
"assistantts.sfeeaa489": "LLM streaming response error",
|
|
||||||
"history": "History",
|
"history": "History",
|
||||||
"examplePrefix": "Ex: ",
|
"examplePrefix": "Ex: ",
|
||||||
"roundTokens": "Round {{round}} · {{tokens}}t",
|
"roundTokens": "Round {{round}} · {{tokens}}t",
|
||||||
@@ -7666,7 +7740,11 @@
|
|||||||
"durationM": "{{mins}}m",
|
"durationM": "{{mins}}m",
|
||||||
"confidencePercent": "Confidence {{n}}%",
|
"confidencePercent": "Confidence {{n}}%",
|
||||||
"noAnalysisYet": "Select an alert to view AI analysis",
|
"noAnalysisYet": "Select an alert to view AI analysis",
|
||||||
"aiAnalysisResult": "AI Analysis Result",
|
"aiAnalysisResult": {
|
||||||
|
"selectAlertHint": "Select an alert on the left for AI analysis",
|
||||||
|
"correlatingHint": "Correlating logs, metrics and historical cases",
|
||||||
|
"title": "AI Analysis"
|
||||||
|
},
|
||||||
"analyzingRootCause": "AI is analyzing alert root cause...",
|
"analyzingRootCause": "AI is analyzing alert root cause...",
|
||||||
"rootCauseAnalysis": "Root Cause Analysis",
|
"rootCauseAnalysis": "Root Cause Analysis",
|
||||||
"impactScopeLabel": "Impact Scope",
|
"impactScopeLabel": "Impact Scope",
|
||||||
@@ -7712,8 +7790,6 @@
|
|||||||
"daysToThreshold": "reaches threshold in {{days}} days",
|
"daysToThreshold": "reaches threshold in {{days}} days",
|
||||||
"forecastSummary": "- {{resource}}: Current {{current}}% → 7-day forecast {{predicted}}% (threshold {{threshold}}%), {{risk}}",
|
"forecastSummary": "- {{resource}}: Current {{current}}% → 7-day forecast {{predicted}}% (threshold {{threshold}}%), {{risk}}",
|
||||||
"safetyBalancedExamples": "cat/grep/df auto · rm/reboot confirm",
|
"safetyBalancedExamples": "cat/grep/df auto · rm/reboot confirm",
|
||||||
"predictutilsts.se4b7a5d2": "Review {{scope}}today's high-cost services, pause non-essential resources or adjust auto-scaling",
|
|
||||||
"predictutilsts.sf2d8c6b4": "Review {{scope}}this month's bill composition, optimize storage/CDN/compute, reduce over-budget quotas",
|
|
||||||
"predictutilsts.sg5a3d8e1": "All",
|
"predictutilsts.sg5a3d8e1": "All",
|
||||||
"predictutilsts.sh7c2b9d6": "Other",
|
"predictutilsts.sh7c2b9d6": "Other",
|
||||||
"predictutilsts.providerAliyun": "Alibaba Cloud",
|
"predictutilsts.providerAliyun": "Alibaba Cloud",
|
||||||
@@ -8018,6 +8094,29 @@
|
|||||||
"stop": "Stop",
|
"stop": "Stop",
|
||||||
"execute": "Run"
|
"execute": "Run"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"agentCliMessage": {
|
||||||
|
"thinking": "Thinking"
|
||||||
|
},
|
||||||
|
"analyzerHelpers": {
|
||||||
|
"topCpuProcess": "Highest CPU Process: PID=$PID",
|
||||||
|
"cleanOldLogs": "===== Clean Logs Older Than 30 Days =====",
|
||||||
|
"diskAfterClean": "===== Disk Usage After Cleanup =====",
|
||||||
|
"diskBeforeClean": "===== Disk Usage Before Cleanup =====",
|
||||||
|
"restartFailedService": "===== Restart Failed Services =====",
|
||||||
|
"cleanSystemCache": "===== Clean System Cache =====",
|
||||||
|
"systemLoad": "===== System Load =====",
|
||||||
|
"checkPortListen": "===== Check Port Listening =====",
|
||||||
|
"checkServiceStatus": "===== Check Service Status =====",
|
||||||
|
"highCpuProcessDetail": "===== High CPU Process Details ====="
|
||||||
|
},
|
||||||
|
"assistant": {
|
||||||
|
"streamUnavailable": "Streaming response unavailable",
|
||||||
|
"streamError": "LLM streaming response error"
|
||||||
|
},
|
||||||
|
"predictUtils": {
|
||||||
|
"dailyCostHint": "Review {{scope}}today's high-cost services, pause non-essential resources or adjust auto-scaling",
|
||||||
|
"monthlyBillHint": "Review {{scope}}this month's bill composition, optimize storage/CDN/compute, reduce over-budget quotas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"breadcrumb": {
|
"breadcrumb": {
|
||||||
|
|||||||
+259
-160
@@ -3709,7 +3709,10 @@
|
|||||||
"title": "监控中心",
|
"title": "监控中心",
|
||||||
"subtitle": "全方位监控与告警",
|
"subtitle": "全方位监控与告警",
|
||||||
"resourceMonitor": "资源监控",
|
"resourceMonitor": "资源监控",
|
||||||
"hostMonitor": "主机监控",
|
"hostMonitor": {
|
||||||
|
"loadingData": "加载监控数据...",
|
||||||
|
"title": "主机监控"
|
||||||
|
},
|
||||||
"hostMetrics": "主机指标",
|
"hostMetrics": "主机指标",
|
||||||
"hostList": "主机列表",
|
"hostList": "主机列表",
|
||||||
"hostDetail": "主机详情",
|
"hostDetail": "主机详情",
|
||||||
@@ -4511,66 +4514,9 @@
|
|||||||
"emptyDesc": "点击「添加规则」或「默认规则」创建",
|
"emptyDesc": "点击「添加规则」或「默认规则」创建",
|
||||||
"deleteRule": "删除告警规则",
|
"deleteRule": "删除告警规则",
|
||||||
"deleteConfirm": "确定删除此告警规则?",
|
"deleteConfirm": "确定删除此告警规则?",
|
||||||
"deleted": "告警规则已删除"
|
"deleted": "告警规则已删除",
|
||||||
|
"condition": "触发条件"
|
||||||
},
|
},
|
||||||
"middlewaremonit.sbbe62a10": "暂无中间件监控目标",
|
|
||||||
"middlewaremonit.se5caf12b": "添加平台默认",
|
|
||||||
"middlewaremonit.s63edd678": "手动添加",
|
|
||||||
"middlewaremonit.s8ec8a6e8": "立即添加",
|
|
||||||
"sitemonitortsx.sb2da5804": "告警中",
|
|
||||||
"sitemonitortsx.s62a0023a": "拨测任务不存在或已删除",
|
|
||||||
"sitemonitortsx.s30319e1c": "拨测任务",
|
|
||||||
"sitemonitortsx.sa5e6b654": "点击可观测进入详情页",
|
|
||||||
"sitemonitortsx.s6173cf9a": "按协议类型配置探活任务,系统将按间隔自动拨测",
|
|
||||||
"snmpmonitortsx.s29b90990": "添加 SNMP 设备",
|
|
||||||
"snmpmonitortsx.s11ea7d0c": "选择厂商 OID 模板,配置管理 IP 与 Community",
|
|
||||||
"snmpmonitortsx.s9f694f60": "设备名称",
|
|
||||||
"hostmonitortsx.sc23e802e": "加载监控数据...",
|
|
||||||
"metricsexplorer.s3ec50388": "指标列表",
|
|
||||||
"helpersts.sf972b7b1": "近 1 小时",
|
|
||||||
"helpersts.s6e99b786": "近 24 小时",
|
|
||||||
"helpersts.sd765efc4": "近 7 天",
|
|
||||||
"helpersts.sd3fd8f1d": "DNS 解析延迟与结果",
|
|
||||||
"portpolicydialo.s868e3dd0": "端口监控策略",
|
|
||||||
"portpolicydialo.scd27ad47": "配置 Agent 端口上报过滤规则",
|
|
||||||
"portpolicydialo.s7824bdd1": "过滤模式",
|
|
||||||
"portpolicydialo.s2ff12d51": "永远不上报",
|
|
||||||
"mwoverviewchart.s07d3e014": "MySQL 连接",
|
|
||||||
"chartrangehintt.s39ce9bad": "已选时段:",
|
|
||||||
"snmpoverviewcha.s64f5a4da": "设备 CPU 对比",
|
|
||||||
"snmpoverviewcha.s1f441890": "暂无 CPU 指标,请先完成采集",
|
|
||||||
"snmpoverviewcha.sbb0ae97f": "设备状态",
|
|
||||||
"alertrulestabts.s65939ccd": "触发条件",
|
|
||||||
"alertchanneldia.s976ad48f": "通知渠道配置",
|
|
||||||
"alertchanneldia.s8c852a4c": "未测试",
|
|
||||||
"alertchanneldia.sbdab1c59": "启用此渠道",
|
|
||||||
"alertmanagertsx.s358b05d0": "告警趋势",
|
|
||||||
"alertmanagertsx.s615fa6cb": "过去24小时告警统计",
|
|
||||||
"logrbactsx.s6058845c": "新建权限",
|
|
||||||
"logrbactsx.sa120fc78": "该用户尚未分配日志权限",
|
|
||||||
"logrbactsx.s9be00c95": "选择用户后查看已分配权限",
|
|
||||||
"logrbactsx.s64096f4d": "无匹配 — 请调整正则",
|
|
||||||
"savedqueriespan.s9c8dc62b": "暂无保存的查询",
|
|
||||||
"queryhistorypan.s1e60bc17": "暂无查询记录",
|
|
||||||
"queryhistorypan.s3895021f": "执行查询后将自动记录",
|
|
||||||
"queryhistorypan.s4fb36a61": "执行查询",
|
|
||||||
"logdingassistan.s26b79b6b": "叮当 · 添加告警",
|
|
||||||
"logdingassistan.s1a663141": "叮当",
|
|
||||||
"logclusterpanel.s38112792": "基于日志相似度自动聚类",
|
|
||||||
"logclusterpanel.se909e426": "样例日志:",
|
|
||||||
"lokilabelbrowse.s088b9477": "选择左侧标签",
|
|
||||||
"logquerytoolbar.s8b76adb2": "到第",
|
|
||||||
"logalertspanelt.s5bc514d8": "仅保存告警策略(LogQL / Lucene),日志数据仍在外部 Loki / ES",
|
|
||||||
"esindexpickerts.sa0eff8ea": "选择或搜索 ES 索引",
|
|
||||||
"esindexpickerts.s9ae0c004": "搜索索引...",
|
|
||||||
"esindexpickerts.saf5cc132": "无匹配索引",
|
|
||||||
"zabbixdatasourc.s79e929d8": "配置 Zabbix API 连接,获取主机监控数据",
|
|
||||||
"zabbixdatasourc.sc9c9bd18": "暂无 Zabbix 数据源",
|
|
||||||
"zabbixdatasourc.s85260abd": "直连DB",
|
|
||||||
"zabbixdatasourc.s413ec771": "只读用户禁用确认",
|
|
||||||
"zabbixdatasourc.s6d4d6f81": "禁用数据对齐",
|
|
||||||
"prometheusdashb.s5e8eb212": "连接中…",
|
|
||||||
"zabbixdashboard.sdb131ab4": "未找到被监控的 Zabbix 主机",
|
|
||||||
"logDatasource": {
|
"logDatasource": {
|
||||||
"connectionSuccess": "连接成功",
|
"connectionSuccess": "连接成功",
|
||||||
"connectionFailed": "连接失败",
|
"connectionFailed": "连接失败",
|
||||||
@@ -4778,7 +4724,11 @@
|
|||||||
"scopeCount": "{{count}} 个范围",
|
"scopeCount": "{{count}} 个范围",
|
||||||
"userPolicyHint": "用户未分配任何策略时不拦截(向后兼容);分配后仅允许命中策略的查询。",
|
"userPolicyHint": "用户未分配任何策略时不拦截(向后兼容);分配后仅允许命中策略的查询。",
|
||||||
"assign": "分配",
|
"assign": "分配",
|
||||||
"all": "全部"
|
"all": "全部",
|
||||||
|
"newPermission": "新建权限",
|
||||||
|
"noMatchHint": "无匹配 — 请调整正则",
|
||||||
|
"selectUserHint": "选择用户后查看已分配权限",
|
||||||
|
"noPermissionAssigned": "该用户尚未分配日志权限"
|
||||||
},
|
},
|
||||||
"lbl": {
|
"lbl": {
|
||||||
"unlimited": "无限制",
|
"unlimited": "无限制",
|
||||||
@@ -4951,13 +4901,107 @@
|
|||||||
},
|
},
|
||||||
"logQueryToolbar": {
|
"logQueryToolbar": {
|
||||||
"exactMatch": "结果精确",
|
"exactMatch": "结果精确",
|
||||||
"partialMatch": "部分命中"
|
"partialMatch": "部分命中",
|
||||||
|
"goTo": "到第"
|
||||||
},
|
},
|
||||||
"healthProbe": {
|
"healthProbe": {
|
||||||
"namePlaceholder": "如:cex-agent 健康检查"
|
"namePlaceholder": "如:cex-agent 健康检查"
|
||||||
},
|
},
|
||||||
"hostMonitorTypes": {
|
"hostMonitorTypes": {
|
||||||
"systemInfo": "系统信息"
|
"systemInfo": "系统信息"
|
||||||
|
},
|
||||||
|
"alertChannelDialog": {
|
||||||
|
"notTested": "未测试",
|
||||||
|
"title": "通知渠道配置",
|
||||||
|
"enableChannel": "启用此渠道"
|
||||||
|
},
|
||||||
|
"alertManager": {
|
||||||
|
"trendTitle": "告警趋势",
|
||||||
|
"last24hStats": "过去24小时告警统计"
|
||||||
|
},
|
||||||
|
"chartRangeHint": {
|
||||||
|
"selectedRange": "已选时段:"
|
||||||
|
},
|
||||||
|
"esIndexPicker": {
|
||||||
|
"searchPlaceholder": "搜索索引...",
|
||||||
|
"selectHint": "选择或搜索 ES 索引",
|
||||||
|
"noMatch": "无匹配索引"
|
||||||
|
},
|
||||||
|
"helpers": {
|
||||||
|
"last24h": "近 24 小时",
|
||||||
|
"dnsHint": "DNS 解析延迟与结果",
|
||||||
|
"last7d": "近 7 天",
|
||||||
|
"last1h": "近 1 小时"
|
||||||
|
},
|
||||||
|
"logAlertSpanel": {
|
||||||
|
"desc": "仅保存告警策略(LogQL / Lucene),日志数据仍在外部 Loki / ES"
|
||||||
|
},
|
||||||
|
"logClusterPanel": {
|
||||||
|
"desc": "基于日志相似度自动聚类",
|
||||||
|
"sampleLog": "样例日志:"
|
||||||
|
},
|
||||||
|
"logDingAssistant": {
|
||||||
|
"ding": "叮当",
|
||||||
|
"addAlert": "叮当 · 添加告警"
|
||||||
|
},
|
||||||
|
"lokiLabelBrowse": {
|
||||||
|
"selectLabelHint": "选择左侧标签"
|
||||||
|
},
|
||||||
|
"metricsExplorer": {
|
||||||
|
"metricList": "指标列表"
|
||||||
|
},
|
||||||
|
"middlewareMonit": {
|
||||||
|
"manualAdd": "手动添加",
|
||||||
|
"addNow": "立即添加",
|
||||||
|
"emptyTargets": "暂无中间件监控目标",
|
||||||
|
"addPlatformDefault": "添加平台默认"
|
||||||
|
},
|
||||||
|
"mwOverviewChart": {
|
||||||
|
"mysqlConnections": "MySQL 连接"
|
||||||
|
},
|
||||||
|
"portPolicyDialog": {
|
||||||
|
"neverReport": "永远不上报",
|
||||||
|
"filterMode": "过滤模式",
|
||||||
|
"title": "端口监控策略",
|
||||||
|
"desc": "配置 Agent 端口上报过滤规则"
|
||||||
|
},
|
||||||
|
"prometheusDashb": {
|
||||||
|
"connecting": "连接中…"
|
||||||
|
},
|
||||||
|
"queryHistoryPan": {
|
||||||
|
"emptyHistory": "暂无查询记录",
|
||||||
|
"autoRecordHint": "执行查询后将自动记录",
|
||||||
|
"runQuery": "执行查询"
|
||||||
|
},
|
||||||
|
"savedQueriesPan": {
|
||||||
|
"emptySaved": "暂无保存的查询"
|
||||||
|
},
|
||||||
|
"siteMonitor": {
|
||||||
|
"probeTaskTitle": "拨测任务",
|
||||||
|
"probeDesc": "按协议类型配置探活任务,系统将按间隔自动拨测",
|
||||||
|
"taskNotFound": "拨测任务不存在或已删除",
|
||||||
|
"clickToObserve": "点击可观测进入详情页",
|
||||||
|
"alerting": "告警中"
|
||||||
|
},
|
||||||
|
"snmpMonitor": {
|
||||||
|
"addDeviceDesc": "选择厂商 OID 模板,配置管理 IP 与 Community",
|
||||||
|
"addDeviceTitle": "添加 SNMP 设备",
|
||||||
|
"deviceName": "设备名称"
|
||||||
|
},
|
||||||
|
"snmpOverviewChart": {
|
||||||
|
"noCpuMetrics": "暂无 CPU 指标,请先完成采集",
|
||||||
|
"cpuCompare": "设备 CPU 对比",
|
||||||
|
"deviceStatus": "设备状态"
|
||||||
|
},
|
||||||
|
"zabbixDashboard": {
|
||||||
|
"noHostFound": "未找到被监控的 Zabbix 主机"
|
||||||
|
},
|
||||||
|
"zabbixDatasource": {
|
||||||
|
"readonlyConfirm": "只读用户禁用确认",
|
||||||
|
"disableAlign": "禁用数据对齐",
|
||||||
|
"configDesc": "配置 Zabbix API 连接,获取主机监控数据",
|
||||||
|
"directDb": "直连DB",
|
||||||
|
"emptyDatasource": "暂无 Zabbix 数据源"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"task": {
|
"task": {
|
||||||
@@ -5910,48 +5954,78 @@
|
|||||||
"loadFailed": "加载失败",
|
"loadFailed": "加载失败",
|
||||||
"notFound": "资源不存在"
|
"notFound": "资源不存在"
|
||||||
},
|
},
|
||||||
"podmetricspaget.s58173b22": "所有命名空间",
|
"deploymentBundle": {
|
||||||
"podexecterminal.sc8107726": "\\r\\n\\x1b[31m[连接发生错误]\\x1b[0m\\r\\n",
|
"yamlEmpty": "YAML 内容为空或解析失败"
|
||||||
"podlogsviewerts.s58b02a7a": "最近 100 行",
|
},
|
||||||
"podlogsviewerts.s9a036801": "最近 500 行",
|
"deploymentEditAdvanced": {
|
||||||
"podlogsviewerts.sf89a330c": "最近 1000 行",
|
"tolerations": "容忍 (Tolerations)",
|
||||||
"podlogsviewerts.sd9c71f71": "实时跟踪",
|
"any": "任意",
|
||||||
"podlogsviewerts.sf3280b73": " (缓冲已满)",
|
"noTolerations": "未配置容忍",
|
||||||
"podlogsviewerts.sd7eb1e98": "跟随底部",
|
"saved": "高级设置已保存"
|
||||||
"podlogsviewerts.s130db316": "已暂停跟随",
|
},
|
||||||
"deploymentedita.s9762d0a4": "高级设置已保存",
|
"deploymentEditService": {
|
||||||
"deploymentedita.s13a8310b": "容忍 (Tolerations)",
|
"associated": "关联",
|
||||||
"deploymentedita.s8bc06bde": "未配置容忍",
|
"backToView": "返回查看",
|
||||||
"deploymentedita.s2a6eb2dd": "任意",
|
"notDetected": "未检测到",
|
||||||
"deploymentviewt.s6d2d954e": "容器组 IP",
|
"quickAddPorts": "快速添加常用端口",
|
||||||
"deploymentedits.sb8eef7f0": "选择器:",
|
"volumeName": "数据卷名称",
|
||||||
"deploymentedits.sd0ad85b8": "仅显示 selector 匹配此 Deployment 的关联 Service",
|
"selectorLabel": "选择器:",
|
||||||
"deploymentedits.s1c3cf7f5": "关联",
|
"selectorHint": "仅显示 selector 匹配此 Deployment 的关联 Service",
|
||||||
"deploymentedits.s83907cde": "快速添加常用端口",
|
"subPath": "子路径 subPath"
|
||||||
"deploymentedits.s5847b0f9": "未检测到",
|
},
|
||||||
"deploymentedits.s3a77522f": "返回查看",
|
"deploymentView": {
|
||||||
"deploymentbundl.s47161e05": "YAML 内容为空或解析失败",
|
"podIp": "容器组 IP"
|
||||||
"eventspagetsx.s841389c5": "筛选:",
|
},
|
||||||
"eventspagetsx.s0e5b83cc": "告警事件",
|
"deploymentWorkload": {
|
||||||
"eventspagetsx.s98c99f62": "全部时间",
|
"paused": "已暂停更新",
|
||||||
"eventspagetsx.sfb995166": "所有类型",
|
"adjustImage": "调整镜像"
|
||||||
"namespaceresour.s64e327ed": "搜索...",
|
},
|
||||||
"namespaceresour.s1d8d6e2e": "现状详情",
|
"eventsPage": {
|
||||||
"namespacemanage.sa01a9963": "年龄",
|
"alertEvents": "告警事件",
|
||||||
"podfilebrowsert.sf42649da": "(空文件)",
|
"filterLabel": "筛选:",
|
||||||
"resourcevisuale.s54c78d4f": "切换到 YAML 编辑",
|
"allTime": "全部时间",
|
||||||
"deploymentedits.sa3119d33": "数据卷名称",
|
"allTypes": "所有类型"
|
||||||
"deploymentedits.sf4b25a22": "子路径 subPath",
|
},
|
||||||
"kubernetesclust.sbf23eb8e": "版本(可选)",
|
"kubernetesCluster": {
|
||||||
"kubernetesclust.saaa159b7": "接入方式",
|
"accessMethod": "接入方式",
|
||||||
"deploymentworkl.sf2e0208b": "调整镜像",
|
"versionOptional": "版本(可选)"
|
||||||
"deploymentworkl.s8be2521d": "已暂停更新",
|
},
|
||||||
"workloadviewpag.sf339d471": "更新中",
|
"namespaceManage": {
|
||||||
"workloadviewpag.sea639697": "副本就绪",
|
"age": "年龄"
|
||||||
"workloadviewpag.s23c944c1": "全部就绪",
|
},
|
||||||
"workloadviewpag.sac100213": "部分未就绪",
|
"namespaceResource": {
|
||||||
"workloadviewpag.se4b61048": "暂无容器数据,请查看 YAML",
|
"conditionsDetail": "现状详情",
|
||||||
"workloadviewpag.s7f541ee2": "伸缩 StatefulSet"
|
"searchPlaceholder": "搜索..."
|
||||||
|
},
|
||||||
|
"podExecTerminal": {
|
||||||
|
"connectError": "\\r\\n\\x1b[31m[连接发生错误]\\x1b[0m\\r\\n"
|
||||||
|
},
|
||||||
|
"podFileBrowser": {
|
||||||
|
"emptyFile": "(空文件)"
|
||||||
|
},
|
||||||
|
"podLogsViewer": {
|
||||||
|
"followPaused": "已暂停跟随",
|
||||||
|
"last100": "最近 100 行",
|
||||||
|
"last500": "最近 500 行",
|
||||||
|
"followBottom": "跟随底部",
|
||||||
|
"liveTail": "实时跟踪",
|
||||||
|
"bufferFull": " (缓冲已满)",
|
||||||
|
"last1000": "最近 1000 行"
|
||||||
|
},
|
||||||
|
"podMetricsPage": {
|
||||||
|
"allNamespaces": "所有命名空间"
|
||||||
|
},
|
||||||
|
"resourceVisualEditor": {
|
||||||
|
"switchToYaml": "切换到 YAML 编辑"
|
||||||
|
},
|
||||||
|
"workloadViewPage": {
|
||||||
|
"allReady": "全部就绪",
|
||||||
|
"scaleStatefulSet": "伸缩 StatefulSet",
|
||||||
|
"partialReady": "部分未就绪",
|
||||||
|
"noContainerData": "暂无容器数据,请查看 YAML",
|
||||||
|
"replicasReady": "副本就绪",
|
||||||
|
"updating": "更新中"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"title": "流水线",
|
"title": "流水线",
|
||||||
@@ -6246,12 +6320,18 @@
|
|||||||
"username": "用户名",
|
"username": "用户名",
|
||||||
"usernamePlaceholder": "输入用户名",
|
"usernamePlaceholder": "输入用户名",
|
||||||
"usernameRequired": "请输入用户名",
|
"usernameRequired": "请输入用户名",
|
||||||
"deployrbactsx.sef9548ee": "该用户尚未分配 Job 权限",
|
"buildNodesManage": {
|
||||||
"buildnodesmanag.sa419fe03": "默认调度",
|
"maxConcurrency": "最大并发",
|
||||||
"buildnodesmanag.s8e408e28": "最大并发",
|
"defaultSchedule": "默认调度",
|
||||||
"buildnodesmanag.sbcfcd088": "工作区路径",
|
"workspacePath": "工作区路径"
|
||||||
"deploytargetfie.sb4240171": "暂无可用主机",
|
},
|
||||||
"deploytargetfie.sb2b6db98": "构建完成后 SCP 上传 jar/tar.gz 到远程目录并执行部署命令"
|
"deployRbac": {
|
||||||
|
"noJobPermission": "该用户尚未分配 Job 权限"
|
||||||
|
},
|
||||||
|
"deployTargetField": {
|
||||||
|
"scpDeployHint": "构建完成后 SCP 上传 jar/tar.gz 到远程目录并执行部署命令",
|
||||||
|
"noHostAvailable": "暂无可用主机"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"automation": {
|
"automation": {
|
||||||
"title": "作业任务",
|
"title": "作业任务",
|
||||||
@@ -6611,19 +6691,6 @@
|
|||||||
"editDomainDesc": "修改域名注册信息、DNS 配置和 SSL 证书状态",
|
"editDomainDesc": "修改域名注册信息、DNS 配置和 SSL 证书状态",
|
||||||
"addDomainDesc": "录入域名信息,包括注册商、DNS 服务商和到期时间",
|
"addDomainDesc": "录入域名信息,包括注册商、DNS 服务商和到期时间",
|
||||||
"daysLeft": "{{count}}天",
|
"daysLeft": "{{count}}天",
|
||||||
"platformmanager.s452abbb1": "确定删除此云平台?此操作不可撤销。",
|
|
||||||
"billingrecorddi.s09e541fd": "记录一条每日云资源成本",
|
|
||||||
"billingrecorddi.sb11d8416": "厂商 *",
|
|
||||||
"billingrecorddi.s3abdefe2": "日期 *",
|
|
||||||
"billingrecorddi.s6f252687": "费用(元) *",
|
|
||||||
"billingruledial.s75227f20": "设置成本阈值,超标时自动预警",
|
|
||||||
"billingruledial.sc356f198": "全部厂商",
|
|
||||||
"billingruledial.sd7650ece": "比较",
|
|
||||||
"billingruledial.s3dba9756": "大于 >",
|
|
||||||
"billingruledial.s8e1e26d1": "大于等于 ≥",
|
|
||||||
"billingruledial.s0196c18c": "小于 <",
|
|
||||||
"billingruledial.s45c301a8": "小于等于 ≤",
|
|
||||||
"billingruledial.s11f9fb4c": "阈值(元) *",
|
|
||||||
"platform": {
|
"platform": {
|
||||||
"publicCloud": "公有云",
|
"publicCloud": "公有云",
|
||||||
"searchPlaceholder": "搜索平台名称或编码...",
|
"searchPlaceholder": "搜索平台名称或编码...",
|
||||||
@@ -6642,12 +6709,27 @@
|
|||||||
"fillFields": "请填写规则名称和阈值",
|
"fillFields": "请填写规则名称和阈值",
|
||||||
"editRule": "编辑预警规则",
|
"editRule": "编辑预警规则",
|
||||||
"addRule": "添加预警规则",
|
"addRule": "添加预警规则",
|
||||||
"namePlaceholder": "如:日成本超 500 元预警"
|
"namePlaceholder": "如:日成本超 500 元预警",
|
||||||
|
"lt": "小于 <",
|
||||||
|
"thresholdLabel": "阈值(元) *",
|
||||||
|
"gt": "大于 >",
|
||||||
|
"lte": "小于等于 ≤",
|
||||||
|
"desc": "设置成本阈值,超标时自动预警",
|
||||||
|
"gte": "大于等于 ≥",
|
||||||
|
"allProviders": "全部厂商",
|
||||||
|
"compare": "比较"
|
||||||
},
|
},
|
||||||
"billingRecordDialog": {
|
"billingRecordDialog": {
|
||||||
"fillFields": "请填写必填字段",
|
"fillFields": "请填写必填字段",
|
||||||
"editRecord": "编辑成本记录",
|
"editRecord": "编辑成本记录",
|
||||||
"mainAccount": "主账号"
|
"mainAccount": "主账号",
|
||||||
|
"desc": "记录一条每日云资源成本",
|
||||||
|
"dateLabel": "日期 *",
|
||||||
|
"costLabel": "费用(元) *",
|
||||||
|
"providerLabel": "厂商 *"
|
||||||
|
},
|
||||||
|
"platformManager": {
|
||||||
|
"deleteConfirm": "确定删除此云平台?此操作不可撤销。"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"agent": {
|
"agent": {
|
||||||
@@ -6783,7 +6865,12 @@
|
|||||||
"noAgentData": "暂无 Agent 上报数据",
|
"noAgentData": "暂无 Agent 上报数据",
|
||||||
"agentCount": "{{count}} 个 Agent",
|
"agentCount": "{{count}} 个 Agent",
|
||||||
"agentManage": "Agent 管理",
|
"agentManage": "Agent 管理",
|
||||||
"agentMonitor": "Agent 监控",
|
"agentMonitor": {
|
||||||
|
"title": "Agent 监控",
|
||||||
|
"refresh": "刷新",
|
||||||
|
"deployAgent": "部署Agent",
|
||||||
|
"subtitle": "实时监控 Agent 上报的主机指标"
|
||||||
|
},
|
||||||
"agentMetrics": "Agent 指标",
|
"agentMetrics": "Agent 指标",
|
||||||
"agentConfig": "Agent 配置",
|
"agentConfig": "Agent 配置",
|
||||||
"agentLog": "Agent 日志",
|
"agentLog": "Agent 日志",
|
||||||
@@ -6800,18 +6887,6 @@
|
|||||||
"agentServiceRestart": "重启",
|
"agentServiceRestart": "重启",
|
||||||
"agentServiceEnable": "启用",
|
"agentServiceEnable": "启用",
|
||||||
"agentServiceDisable": "禁用",
|
"agentServiceDisable": "禁用",
|
||||||
"agentalertstsx.sbfdcf242": "指标:",
|
|
||||||
"agentalertstsx.s2d13763b": "当前值:",
|
|
||||||
"agentmonitortsx.sa75d7519": "实时监控 Agent 上报的主机指标",
|
|
||||||
"hostdetaildialo.sffa4f720": "查看主机详情和指标趋势",
|
|
||||||
"hostdetaildialo.s3851af2c": "最近 1 小时",
|
|
||||||
"hostdetaildialo.s2d59b172": "最近 6 小时",
|
|
||||||
"hostdetaildialo.s768a1b34": "最近 24 小时",
|
|
||||||
"hostdetaildialo.sdc73dbe9": "暂无历史数据",
|
|
||||||
"hostdetaildialo.se7887d60": "暂无端口数据",
|
|
||||||
"agentmonitortsx.s1a2b3c4d": "Agent 监控",
|
|
||||||
"agentmonitortsx.s2b3c4d5e": "刷新",
|
|
||||||
"agentmonitortsx.s3c4d5e6f": "部署Agent",
|
|
||||||
"agentmonitortsx.s4d5e6f7g": "立即部署",
|
"agentmonitortsx.s4d5e6f7g": "立即部署",
|
||||||
"agentmonitortsx.s5e6f7g8h": "在线",
|
"agentmonitortsx.s5e6f7g8h": "在线",
|
||||||
"agentmonitortsx.s6f7g8h9i": "离线",
|
"agentmonitortsx.s6f7g8h9i": "离线",
|
||||||
@@ -6897,7 +6972,19 @@
|
|||||||
"monitor2": {
|
"monitor2": {
|
||||||
"commandPlaceholder2": "例如:free -m && df -h"
|
"commandPlaceholder2": "例如:free -m && df -h"
|
||||||
},
|
},
|
||||||
"portCount": "端口数"
|
"portCount": "端口数",
|
||||||
|
"agentAlerts": {
|
||||||
|
"currentValue": "当前值:",
|
||||||
|
"metric": "指标:"
|
||||||
|
},
|
||||||
|
"hostDetailDialog": {
|
||||||
|
"last6h": "最近 6 小时",
|
||||||
|
"last1h": "最近 1 小时",
|
||||||
|
"last24h": "最近 24 小时",
|
||||||
|
"noHistoryData": "暂无历史数据",
|
||||||
|
"noPortData": "暂无端口数据",
|
||||||
|
"desc": "查看主机详情和指标趋势"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"system": {
|
"system": {
|
||||||
"title": "系统管理",
|
"title": "系统管理",
|
||||||
@@ -7308,9 +7395,6 @@
|
|||||||
"authHeaderValue": "X-AIOps-Access-Key: <你的访问凭证>",
|
"authHeaderValue": "X-AIOps-Access-Key: <你的访问凭证>",
|
||||||
"auditWebssh": "审计在线 WebSSH 会话",
|
"auditWebssh": "审计在线 WebSSH 会话",
|
||||||
"ldapClickRefresh": "点击「刷新」加载 LDAP 用户",
|
"ldapClickRefresh": "点击「刷新」加载 LDAP 用户",
|
||||||
"useauditsetting.s32e8a76e": "加载审计设置失败",
|
|
||||||
"useauditsetting.s51680af0": "请选择有效的保留天数",
|
|
||||||
"useauditsetting.s7d55bd57": ",无超期记录",
|
|
||||||
"useldapmanageme.ouExists": "OU \"{{name}}\" 已存在,请使用其他名称",
|
"useldapmanageme.ouExists": "OU \"{{name}}\" 已存在,请使用其他名称",
|
||||||
"useldapmanageme.createOuFailed": "创建 OU 失败:",
|
"useldapmanageme.createOuFailed": "创建 OU 失败:",
|
||||||
"ldapMgmt": {
|
"ldapMgmt": {
|
||||||
@@ -7320,6 +7404,11 @@
|
|||||||
"verifyFailed": "验证失败",
|
"verifyFailed": "验证失败",
|
||||||
"selectUsers": "请至少选择一个用户",
|
"selectUsers": "请至少选择一个用户",
|
||||||
"importFailed": "导入失败: "
|
"importFailed": "导入失败: "
|
||||||
|
},
|
||||||
|
"auditSetting": {
|
||||||
|
"loadFailed": "加载审计设置失败",
|
||||||
|
"invalidRetentionDays": "请选择有效的保留天数",
|
||||||
|
"noExpiredRecords": ",无超期记录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"aiops": {
|
"aiops": {
|
||||||
@@ -7613,21 +7702,6 @@
|
|||||||
"noModelContent": "(模型未返回内容)",
|
"noModelContent": "(模型未返回内容)",
|
||||||
"selfEvolveDesc": "四层记忆异步学习,同类任务自动注入历史经验,越用越聪明。",
|
"selfEvolveDesc": "四层记忆异步学习,同类任务自动注入历史经验,越用越聪明。",
|
||||||
"zhipuCodingHint": "需单独购买编码套餐,走 Anthropic 协议;Key 与通用 GLM 不互通",
|
"zhipuCodingHint": "需单独购买编码套餐,走 Anthropic 协议;Key 与通用 GLM 不互通",
|
||||||
"aianalysisresul.s52bbd52d": "选择左侧告警进行AI智能分析",
|
|
||||||
"aianalysisresul.sf7d04a0f": "正在关联日志、指标和历史案例",
|
|
||||||
"analyzerhelpers.sc4e238d7": "===== 系统负载 =====",
|
|
||||||
"analyzerhelpers.sfaca56f5": "===== 高 CPU 进程详情 =====",
|
|
||||||
"analyzerhelpers.s303a9855": "最高 CPU 进程: PID=$PID",
|
|
||||||
"analyzerhelpers.s5b91c16b": "===== 清理前磁盘使用 =====",
|
|
||||||
"analyzerhelpers.s3b1993da": "===== 清理 30 天前日志 =====",
|
|
||||||
"analyzerhelpers.sb513e117": "===== 清理系统缓存 =====",
|
|
||||||
"analyzerhelpers.s4c139c9f": "===== 清理后磁盘使用 =====",
|
|
||||||
"analyzerhelpers.se59337b9": "===== 检查服务状态 =====",
|
|
||||||
"analyzerhelpers.scdd631f0": "===== 检查端口监听 =====",
|
|
||||||
"analyzerhelpers.sad3e7bba": "===== 重启失败服务 =====",
|
|
||||||
"agentclimessage.s21d68b2d": "思考",
|
|
||||||
"assistantts.s16f94bee": "流式响应不可用",
|
|
||||||
"assistantts.sfeeaa489": "LLM 流式响应错误",
|
|
||||||
"history": "历史",
|
"history": "历史",
|
||||||
"examplePrefix": "例:",
|
"examplePrefix": "例:",
|
||||||
"roundTokens": "第 {{round}} 轮 · {{tokens}}t",
|
"roundTokens": "第 {{round}} 轮 · {{tokens}}t",
|
||||||
@@ -7666,7 +7740,11 @@
|
|||||||
"durationM": "{{mins}}分钟",
|
"durationM": "{{mins}}分钟",
|
||||||
"confidencePercent": "置信度 {{n}}%",
|
"confidencePercent": "置信度 {{n}}%",
|
||||||
"noAnalysisYet": "选择左侧告警查看 AI 分析",
|
"noAnalysisYet": "选择左侧告警查看 AI 分析",
|
||||||
"aiAnalysisResult": "AI 分析结果",
|
"aiAnalysisResult": {
|
||||||
|
"selectAlertHint": "选择左侧告警进行AI智能分析",
|
||||||
|
"correlatingHint": "正在关联日志、指标和历史案例",
|
||||||
|
"title": "AI 分析结果"
|
||||||
|
},
|
||||||
"analyzingRootCause": "AI正在分析告警根因...",
|
"analyzingRootCause": "AI正在分析告警根因...",
|
||||||
"rootCauseAnalysis": "根因分析",
|
"rootCauseAnalysis": "根因分析",
|
||||||
"impactScopeLabel": "影响范围",
|
"impactScopeLabel": "影响范围",
|
||||||
@@ -7712,8 +7790,6 @@
|
|||||||
"daysToThreshold": "{{days}} 天后触及阈值",
|
"daysToThreshold": "{{days}} 天后触及阈值",
|
||||||
"forecastSummary": "- {{resource}}:当前 {{current}}% → 7天后预测 {{predicted}}%(阈值 {{threshold}}%),{{risk}}",
|
"forecastSummary": "- {{resource}}:当前 {{current}}% → 7天后预测 {{predicted}}%(阈值 {{threshold}}%),{{risk}}",
|
||||||
"safetyBalancedExamples": "cat/grep/df 自动 · rm/reboot 确认",
|
"safetyBalancedExamples": "cat/grep/df 自动 · rm/reboot 确认",
|
||||||
"predictutilsts.se4b7a5d2": "检查{{scope}}今日高消费服务,暂停非必要资源或调整弹性伸缩策略",
|
|
||||||
"predictutilsts.sf2d8c6b4": "复盘{{scope}}本月账单构成,优化存储/CDN/计算规格,必要时下调预算外资源配额",
|
|
||||||
"predictutilsts.sg5a3d8e1": "全部",
|
"predictutilsts.sg5a3d8e1": "全部",
|
||||||
"predictutilsts.sh7c2b9d6": "其他",
|
"predictutilsts.sh7c2b9d6": "其他",
|
||||||
"predictutilsts.providerAliyun": "阿里云",
|
"predictutilsts.providerAliyun": "阿里云",
|
||||||
@@ -8018,6 +8094,29 @@
|
|||||||
"stop": "停止",
|
"stop": "停止",
|
||||||
"execute": "执行"
|
"execute": "执行"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"agentCliMessage": {
|
||||||
|
"thinking": "思考"
|
||||||
|
},
|
||||||
|
"analyzerHelpers": {
|
||||||
|
"topCpuProcess": "最高 CPU 进程: PID=$PID",
|
||||||
|
"cleanOldLogs": "===== 清理 30 天前日志 =====",
|
||||||
|
"diskAfterClean": "===== 清理后磁盘使用 =====",
|
||||||
|
"diskBeforeClean": "===== 清理前磁盘使用 =====",
|
||||||
|
"restartFailedService": "===== 重启失败服务 =====",
|
||||||
|
"cleanSystemCache": "===== 清理系统缓存 =====",
|
||||||
|
"systemLoad": "===== 系统负载 =====",
|
||||||
|
"checkPortListen": "===== 检查端口监听 =====",
|
||||||
|
"checkServiceStatus": "===== 检查服务状态 =====",
|
||||||
|
"highCpuProcessDetail": "===== 高 CPU 进程详情 ====="
|
||||||
|
},
|
||||||
|
"assistant": {
|
||||||
|
"streamUnavailable": "流式响应不可用",
|
||||||
|
"streamError": "LLM 流式响应错误"
|
||||||
|
},
|
||||||
|
"predictUtils": {
|
||||||
|
"dailyCostHint": "检查{{scope}}今日高消费服务,暂停非必要资源或调整弹性伸缩策略",
|
||||||
|
"monthlyBillHint": "复盘{{scope}}本月账单构成,优化存储/CDN/计算规格,必要时下调预算外资源配额"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"breadcrumb": {
|
"breadcrumb": {
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ export function HostMonitor({ embedded = false }: { embedded?: boolean }) {
|
|||||||
<PageShell variant="workspace" title={t('monitor.alertRulesTab.catHost')}
|
<PageShell variant="workspace" title={t('monitor.alertRulesTab.catHost')}
|
||||||
subtitle={selectedHost ? `当前主机: ${selectedHost}` : t('monitor.lbl.selectHostHint')}
|
subtitle={selectedHost ? `当前主机: ${selectedHost}` : t('monitor.lbl.selectHostHint')}
|
||||||
icon={<Server className="h-5 w-5" />} toolbar={toolbar}
|
icon={<Server className="h-5 w-5" />} toolbar={toolbar}
|
||||||
loading={loading && !history.length} loadingLabel={t('monitor.hostmonitortsx.sc23e802e')}
|
loading={loading && !history.length} loadingLabel={t('monitor.hostMonitor.loadingData')}
|
||||||
contentClassName="space-y-3">
|
contentClassName="space-y-3">
|
||||||
{monitorBody}
|
{monitorBody}
|
||||||
{dialogs}
|
{dialogs}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ export function MetricsExplorer() {
|
|||||||
<CardContent className="p-4">
|
<CardContent className="p-4">
|
||||||
<div className="flex items-center gap-2 mb-3">
|
<div className="flex items-center gap-2 mb-3">
|
||||||
<BarChart3 className="h-4 w-4 dg-text-muted" />
|
<BarChart3 className="h-4 w-4 dg-text-muted" />
|
||||||
<h3 className="text-sm font-medium text-[var(--dg-text-primary)]"> {t('monitor.metricsexplorer.s3ec50388')} </h3>
|
<h3 className="text-sm font-medium text-[var(--dg-text-primary)]"> {t('monitor.metricsExplorer.metricList')} </h3>
|
||||||
<span className="text-xs dg-text-muted ml-auto">{selectedMetrics.length} 已选</span>
|
<span className="text-xs dg-text-muted ml-auto">{selectedMetrics.length} 已选</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-4 max-h-[60vh] overflow-y-auto">
|
<div className="space-y-4 max-h-[60vh] overflow-y-auto">
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export function MiddlewareMonitor() {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
setRefreshing(false);
|
setRefreshing(false);
|
||||||
}
|
}
|
||||||
}, [syncSelection]);
|
}, [syncSelection, t]);
|
||||||
|
|
||||||
useEffect(() => { loadTargets(); }, [loadTargets]);
|
useEffect(() => { loadTargets(); }, [loadTargets]);
|
||||||
|
|
||||||
@@ -194,10 +194,10 @@ export function MiddlewareMonitor() {
|
|||||||
<Card className="bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
<Card className="bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
||||||
<CardContent className="p-12 text-center">
|
<CardContent className="p-12 text-center">
|
||||||
<Database className="h-12 w-12 mx-auto mb-4 text-[var(--dg-text-muted)]" />
|
<Database className="h-12 w-12 mx-auto mb-4 text-[var(--dg-text-muted)]" />
|
||||||
<p className="text-sm text-[var(--dg-text-muted)]"> {t('monitor.middlewaremonit.sbbe62a10')} </p>
|
<p className="text-sm text-[var(--dg-text-muted)]"> {t('monitor.middlewareMonit.emptyTargets')} </p>
|
||||||
<div className="flex justify-center gap-2 mt-4">
|
<div className="flex justify-center gap-2 mt-4">
|
||||||
<Button size="sm" onClick={handleSeedDefaults} disabled={seeding}> {t('monitor.middlewaremonit.se5caf12b')} </Button>
|
<Button size="sm" onClick={handleSeedDefaults} disabled={seeding}> {t('monitor.middlewareMonit.addPlatformDefault')} </Button>
|
||||||
<Button size="sm" variant="outline" onClick={() => openCreate()}> {t('monitor.middlewaremonit.s63edd678')} </Button>
|
<Button size="sm" variant="outline" onClick={() => openCreate()}> {t('monitor.middlewareMonit.manualAdd')} </Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -252,7 +252,7 @@ export function MiddlewareMonitor() {
|
|||||||
<Card className="bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
<Card className="bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
||||||
<CardContent className="p-8 text-center text-sm text-[var(--dg-text-muted)]">
|
<CardContent className="p-8 text-center text-sm text-[var(--dg-text-muted)]">
|
||||||
暂无 {tab === 'redis' ? 'Redis' : 'MySQL'} 实例,
|
暂无 {tab === 'redis' ? 'Redis' : 'MySQL'} 实例,
|
||||||
<button type="button" className="dg-text-cyan ml-1 underline" onClick={() => openCreate(tab)}> {t('monitor.middlewaremonit.s8ec8a6e8')} </button>
|
<button type="button" className="dg-text-cyan ml-1 underline" onClick={() => openCreate(tab)}> {t('monitor.middlewareMonit.addNow')} </button>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -198,12 +198,12 @@ export function SNMPMonitor() {
|
|||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="sm:max-w-md bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
<DialogContent className="sm:max-w-md bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle> {t('monitor.snmpmonitortsx.s29b90990')} </DialogTitle>
|
<DialogTitle> {t('monitor.snmpMonitor.addDeviceTitle')} </DialogTitle>
|
||||||
<DialogDescription> {t('monitor.snmpmonitortsx.s11ea7d0c')} </DialogDescription>
|
<DialogDescription> {t('monitor.snmpMonitor.addDeviceDesc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="grid gap-3 py-2">
|
<div className="grid gap-3 py-2">
|
||||||
<div className="grid gap-1.5">
|
<div className="grid gap-1.5">
|
||||||
<Label> {t('monitor.snmpmonitortsx.s9f694f60')} </Label>
|
<Label> {t('monitor.snmpMonitor.deviceName')} </Label>
|
||||||
<Input value={form.name} onChange={(e) => setForm({ ...form, name: e.target.value })} placeholder={t('monitor.lbl.demoSwitch')} />
|
<Input value={form.name} onChange={(e) => setForm({ ...form, name: e.target.value })} placeholder={t('monitor.lbl.demoSwitch')} />
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-2 gap-3">
|
<div className="grid grid-cols-2 gap-3">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const FILTER_TYPES: Array<ProbeType | 'ALL'> = ['ALL', ...PROBE_TYPE_OPTIONS];
|
|||||||
|
|
||||||
function alertStatusBadge(status?: string) {
|
function alertStatusBadge(status?: string) {
|
||||||
if (status === 'alerting') {
|
if (status === 'alerting') {
|
||||||
return <Badge className="bg-red-500/15 dg-text-red border-red-500/30 text-[10px]"> {i18n.t('monitor.sitemonitortsx.sb2da5804')} </Badge>;
|
return <Badge className="bg-red-500/15 dg-text-red border-red-500/30 text-[10px]"> {i18n.t('monitor.siteMonitor.alerting')} </Badge>;
|
||||||
}
|
}
|
||||||
return <Badge className="bg-emerald-500/15 dg-text-green border-emerald-500/30 text-[10px]"> {i18n.t('agent.heartbeatNormal')} </Badge>;
|
return <Badge className="bg-emerald-500/15 dg-text-green border-emerald-500/30 text-[10px]"> {i18n.t('agent.heartbeatNormal')} </Badge>;
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ export function SiteMonitor() {
|
|||||||
if (!detailTask) {
|
if (!detailTask) {
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4 text-center py-16">
|
<div className="space-y-4 text-center py-16">
|
||||||
<p className="text-sm text-[var(--dg-text-muted)]"> {t('monitor.sitemonitortsx.s62a0023a')} </p>
|
<p className="text-sm text-[var(--dg-text-muted)]"> {t('monitor.siteMonitor.taskNotFound')} </p>
|
||||||
<Button variant="outline" size="sm" onClick={closeDetail}> {t('monitor.siteTask.backToList')} </Button>
|
<Button variant="outline" size="sm" onClick={closeDetail}> {t('monitor.siteTask.backToList')} </Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -247,8 +247,8 @@ export function SiteMonitor() {
|
|||||||
<div className="flex items-center justify-between mb-3 flex-wrap gap-2">
|
<div className="flex items-center justify-between mb-3 flex-wrap gap-2">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Activity className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
<Activity className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
||||||
<h3 className="text-sm font-medium"> {t('monitor.sitemonitortsx.s30319e1c')} </h3>
|
<h3 className="text-sm font-medium"> {t('monitor.siteMonitor.probeTaskTitle')} </h3>
|
||||||
<span className="text-[10px] text-[var(--dg-text-muted)]"> {t('monitor.sitemonitortsx.sa5e6b654')} </span>
|
<span className="text-[10px] text-[var(--dg-text-muted)]"> {t('monitor.siteMonitor.clickToObserve')} </span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{FILTER_TYPES.map((type) => {
|
{FILTER_TYPES.map((type) => {
|
||||||
@@ -346,7 +346,7 @@ export function SiteMonitor() {
|
|||||||
<DialogContent className="sm:max-w-md bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
<DialogContent className="sm:max-w-md bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>{editingTaskId ? t('monitor.editProbe') : t('monitor.addProbe')}</DialogTitle>
|
<DialogTitle>{editingTaskId ? t('monitor.editProbe') : t('monitor.addProbe')}</DialogTitle>
|
||||||
<DialogDescription className="text-[var(--dg-text-muted)]"> {t('monitor.sitemonitortsx.s6173cf9a')} </DialogDescription>
|
<DialogDescription className="text-[var(--dg-text-muted)]"> {t('monitor.siteMonitor.probeDesc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="grid gap-4 py-2">
|
<div className="grid gap-4 py-2">
|
||||||
<div className="grid gap-1.5">
|
<div className="grid gap-1.5">
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ export function PortPolicyDialog({
|
|||||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||||
<DialogContent showOverlay={false} className="bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] max-w-md">
|
<DialogContent showOverlay={false} className="bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle className="text-[var(--dg-text-primary)]"> {t('monitor.portpolicydialo.s868e3dd0')} </DialogTitle>
|
<DialogTitle className="text-[var(--dg-text-primary)]"> {t('monitor.portPolicyDialog.title')} </DialogTitle>
|
||||||
<DialogDescription className="text-[var(--dg-text-secondary)]"> {t('monitor.portpolicydialo.scd27ad47')} </DialogDescription>
|
<DialogDescription className="text-[var(--dg-text-secondary)]"> {t('monitor.portPolicyDialog.desc')} </DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="text-[11px] text-[var(--dg-text-muted)] mb-1.5 block"> {t('monitor.portpolicydialo.s7824bdd1')} </label>
|
<label className="text-[11px] text-[var(--dg-text-muted)] mb-1.5 block"> {t('monitor.portPolicyDialog.filterMode')} </label>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<button
|
<button
|
||||||
className={`flex-1 h-9 rounded text-xs font-medium border transition-colors ${portPolicyMode === 'whitelist' ? 'bg-blue-500/20 border-blue-500 dg-text-blue' : 'bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] text-[var(--dg-text-muted)]'}`}
|
className={`flex-1 h-9 rounded text-xs font-medium border transition-colors ${portPolicyMode === 'whitelist' ? 'bg-blue-500/20 border-blue-500 dg-text-blue' : 'bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] text-[var(--dg-text-muted)]'}`}
|
||||||
@@ -84,7 +84,7 @@ export function PortPolicyDialog({
|
|||||||
|
|
||||||
<div className="bg-amber-500/5 border border-amber-500/20 rounded p-2.5">
|
<div className="bg-amber-500/5 border border-amber-500/20 rounded p-2.5">
|
||||||
<p className="text-[10px] text-amber-300/80 leading-relaxed">
|
<p className="text-[10px] text-amber-300/80 leading-relaxed">
|
||||||
⚠️ 无论选择哪种模式,以下系统进程端口<b> {t('monitor.portpolicydialo.s2ff12d51')} </b>:sshd、rpcbind、master、systemd、dbus-daemon、rsyslogd 等。Agent 采集时自动跳过。
|
⚠️ 无论选择哪种模式,以下系统进程端口<b> {t('monitor.portPolicyDialog.neverReport')} </b>:sshd、rpcbind、master、systemd、dbus-daemon、rsyslogd 等。Agent 采集时自动跳过。
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,31 +23,31 @@ function shortName(name: string) {
|
|||||||
export function MwOverviewCharts({ targets }: Props) {
|
export function MwOverviewCharts({ targets }: Props) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const statusData = useMemo(() => {
|
const statusData = useMemo(() => {
|
||||||
const online = targets.filter((t) => t.status === 'online').length;
|
const online = targets.filter((tg) => tg.status === 'online').length;
|
||||||
const offline = targets.length - online;
|
const offline = targets.length - online;
|
||||||
return [
|
return [
|
||||||
{ name: t('agent.agentOnline'), value: online, fill: 'var(--dg-green)' },
|
{ name: t('agent.agentOnline'), value: online, fill: 'var(--dg-green)' },
|
||||||
{ name: t('agent.agentOffline'), value: offline, fill: 'var(--dg-red)' },
|
{ name: t('agent.agentOffline'), value: offline, fill: 'var(--dg-red)' },
|
||||||
].filter((d) => d.value > 0);
|
].filter((d) => d.value > 0);
|
||||||
}, [targets]);
|
}, [targets, t]);
|
||||||
|
|
||||||
const redisHitData = useMemo(() => targets
|
const redisHitData = useMemo(() => targets
|
||||||
.filter((t) => t.description === 'redis' && t.latest_metrics?.redis_hit_rate > 0)
|
.filter((tg) => tg.description === 'redis' && tg.latest_metrics?.redis_hit_rate > 0)
|
||||||
.map((t) => ({
|
.map((tg) => ({
|
||||||
name: shortName(t.name), fullName: t.name,
|
name: shortName(tg.name), fullName: tg.name,
|
||||||
value: (t.latest_metrics.redis_hit_rate || 0) * 100,
|
value: (tg.latest_metrics.redis_hit_rate || 0) * 100,
|
||||||
fill: (t.latest_metrics.redis_hit_rate || 0) >= 0.9 ? 'var(--dg-green)' : 'var(--dg-yellow)',
|
fill: (tg.latest_metrics.redis_hit_rate || 0) >= 0.9 ? 'var(--dg-green)' : 'var(--dg-yellow)',
|
||||||
}))
|
}))
|
||||||
.sort((a, b) => a.value - b.value), [targets]);
|
.sort((a, b) => a.value - b.value), [targets]);
|
||||||
|
|
||||||
const redisQpsData = useMemo(() => targets
|
const redisQpsData = useMemo(() => targets
|
||||||
.filter((t) => t.description === 'redis' && t.latest_metrics?.redis_qps > 0)
|
.filter((tg) => tg.description === 'redis' && tg.latest_metrics?.redis_qps > 0)
|
||||||
.map((t) => ({ name: shortName(t.name), fullName: t.name, value: t.latest_metrics.redis_qps, fill: 'var(--dg-blue)' }))
|
.map((tg) => ({ name: shortName(tg.name), fullName: tg.name, value: tg.latest_metrics.redis_qps, fill: 'var(--dg-blue)' }))
|
||||||
.sort((a, b) => b.value - a.value), [targets]);
|
.sort((a, b) => b.value - a.value), [targets]);
|
||||||
|
|
||||||
const mysqlConnData = useMemo(() => targets
|
const mysqlConnData = useMemo(() => targets
|
||||||
.filter((t) => t.description === 'mysql' && t.latest_metrics?.mysql_connections > 0)
|
.filter((tg) => tg.description === 'mysql' && tg.latest_metrics?.mysql_connections > 0)
|
||||||
.map((t) => ({ name: shortName(t.name), fullName: t.name, value: t.latest_metrics.mysql_connections, fill: 'var(--dg-blue)' }))
|
.map((tg) => ({ name: shortName(tg.name), fullName: tg.name, value: tg.latest_metrics.mysql_connections, fill: 'var(--dg-blue)' }))
|
||||||
.sort((a, b) => b.value - a.value), [targets]);
|
.sort((a, b) => b.value - a.value), [targets]);
|
||||||
|
|
||||||
if (targets.length === 0) return null;
|
if (targets.length === 0) return null;
|
||||||
@@ -98,7 +98,7 @@ export function MwOverviewCharts({ targets }: Props) {
|
|||||||
)}
|
)}
|
||||||
</OverviewChartCard>
|
</OverviewChartCard>
|
||||||
|
|
||||||
<OverviewChartCard title={t('monitor.mwoverviewchart.s07d3e014')} icon={<BarChart3 className="h-3.5 w-3.5 text-[var(--dg-text-muted)]" />} empty={mysqlConnData.length === 0}>
|
<OverviewChartCard title={t('monitor.lbl.mysqlConnections')} icon={<BarChart3 className="h-3.5 w-3.5 text-[var(--dg-text-muted)]" />} empty={mysqlConnData.length === 0}>
|
||||||
{(h) => (
|
{(h) => (
|
||||||
<ResponsiveContainer width="100%" height={h}>
|
<ResponsiveContainer width="100%" height={h}>
|
||||||
<BarChart data={mysqlConnData} layout="vertical" margin={{ left: 0, right: 8 }}>
|
<BarChart data={mysqlConnData} layout="vertical" margin={{ left: 0, right: 8 }}>
|
||||||
|
|||||||
@@ -98,10 +98,10 @@ export function MwTargetChartsPanel({ target, chartDefs, accent }: Props) {
|
|||||||
<Select value={timeRange} onValueChange={(v) => setTimeRange(v as MwTimeRange)}>
|
<Select value={timeRange} onValueChange={(v) => setTimeRange(v as MwTimeRange)}>
|
||||||
<SelectTrigger className="h-7 w-[92px] text-xs"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="h-7 w-[92px] text-xs"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="1h"> {t('monitor.helpersts.sf972b7b1')} </SelectItem>
|
<SelectItem value="1h"> {t('monitor.helpers.last1h')} </SelectItem>
|
||||||
<SelectItem value="6h"> {t('monitor.siteProtocol.rangeDefault')} </SelectItem>
|
<SelectItem value="6h"> {t('monitor.siteProtocol.rangeDefault')} </SelectItem>
|
||||||
<SelectItem value="24h"> {t('monitor.helpersts.s6e99b786')} </SelectItem>
|
<SelectItem value="24h"> {t('monitor.helpers.last24h')} </SelectItem>
|
||||||
<SelectItem value="7d"> {t('monitor.helpersts.sd765efc4')} </SelectItem>
|
<SelectItem value="7d"> {t('monitor.helpers.last7d')} </SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<Button variant="outline" size="sm" className="h-7 text-xs" onClick={loadCharts} disabled={loading}>
|
<Button variant="outline" size="sm" className="h-7 text-xs" onClick={loadCharts} disabled={loading}>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export function ChartRangeHint({ label, zoomed, onReset }: Props) {
|
|||||||
if (!zoomed) return null;
|
if (!zoomed) return null;
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-between text-[10px] text-[var(--dg-text-muted)] mt-1 px-0.5">
|
<div className="flex items-center justify-between text-[10px] text-[var(--dg-text-muted)] mt-1 px-0.5">
|
||||||
<span> {t('monitor.chartrangehintt.s39ce9bad')} <span className="text-[var(--dg-text-primary)] font-mono">{label}</span></span>
|
<span> {t('monitor.chartRangeHint.selectedRange')} <span className="text-[var(--dg-text-primary)] font-mono">{label}</span></span>
|
||||||
<Button type="button" variant="ghost" size="sm" className="h-6 text-[10px] px-2" onClick={onReset}>
|
<Button type="button" variant="ghost" size="sm" className="h-6 text-[10px] px-2" onClick={onReset}>
|
||||||
<ZoomOut className="h-3 w-3 mr-1" />恢复全量
|
<ZoomOut className="h-3 w-3 mr-1" />恢复全量
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export const probeTypeMeta: Record<ProbeType, { label: string; placeholder: stri
|
|||||||
HTTP: { label: i18n.t('monitor.lbl.siteTargetUrl'), placeholder: 'https://example.com/health', hint: i18n.t('monitor.lbl.siteHttpHint') },
|
HTTP: { label: i18n.t('monitor.lbl.siteTargetUrl'), placeholder: 'https://example.com/health', hint: i18n.t('monitor.lbl.siteHttpHint') },
|
||||||
SSL: { label: i18n.t('monitor.lbl.siteSslAddr'), placeholder: i18n.t('monitor.lbl.siteSslPlaceholder'), hint: i18n.t('monitor.lbl.siteSslHint') },
|
SSL: { label: i18n.t('monitor.lbl.siteSslAddr'), placeholder: i18n.t('monitor.lbl.siteSslPlaceholder'), hint: i18n.t('monitor.lbl.siteSslHint') },
|
||||||
TCP: { label: i18n.t('monitor.lbl.siteHostPort'), placeholder: i18n.t('monitor.lbl.siteTcpPlaceholder'), hint: i18n.t('monitor.lbl.siteTcpHint') },
|
TCP: { label: i18n.t('monitor.lbl.siteHostPort'), placeholder: i18n.t('monitor.lbl.siteTcpPlaceholder'), hint: i18n.t('monitor.lbl.siteTcpHint') },
|
||||||
DNS: { label: i18n.t('cloud.domainName'), placeholder: 'example.com', hint: i18n.t('monitor.helpersts.sd3fd8f1d') },
|
DNS: { label: i18n.t('cloud.domainName'), placeholder: 'example.com', hint: i18n.t('monitor.helpers.dnsHint') },
|
||||||
PING: { label: i18n.t('monitor.lbl.siteHostAddr'), placeholder: i18n.t('monitor.lbl.sitePingPlaceholder'), hint: i18n.t('monitor.lbl.sitePingHint') },
|
PING: { label: i18n.t('monitor.lbl.siteHostAddr'), placeholder: i18n.t('monitor.lbl.sitePingPlaceholder'), hint: i18n.t('monitor.lbl.sitePingHint') },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export function SnmpOverviewCharts({ devices, overview }: Props) {
|
|||||||
{ name: t('agent.heartbeatAbnormal'), value: error, fill: 'var(--dg-red)' },
|
{ name: t('agent.heartbeatAbnormal'), value: error, fill: 'var(--dg-red)' },
|
||||||
{ name: t('agent.agentOffline'), value: offline, fill: 'var(--dg-text-muted)' },
|
{ name: t('agent.agentOffline'), value: offline, fill: 'var(--dg-text-muted)' },
|
||||||
].filter((d) => d.value > 0);
|
].filter((d) => d.value > 0);
|
||||||
}, [devices]);
|
}, [devices, t]);
|
||||||
|
|
||||||
const cpuData = useMemo(() => {
|
const cpuData = useMemo(() => {
|
||||||
return overview
|
return overview
|
||||||
@@ -49,10 +49,10 @@ export function SnmpOverviewCharts({ devices, overview }: Props) {
|
|||||||
<CardContent className="p-4">
|
<CardContent className="p-4">
|
||||||
<div className="flex items-center gap-2 mb-3">
|
<div className="flex items-center gap-2 mb-3">
|
||||||
<BarChart3 className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
<BarChart3 className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
||||||
<h3 className="text-sm font-medium text-[var(--dg-text-primary)]"> {t('monitor.snmpoverviewcha.s64f5a4da')} </h3>
|
<h3 className="text-sm font-medium text-[var(--dg-text-primary)]"> {t('monitor.lbl.deviceCpuCompare')} </h3>
|
||||||
</div>
|
</div>
|
||||||
{cpuData.length === 0 ? (
|
{cpuData.length === 0 ? (
|
||||||
<p className="text-xs text-[var(--dg-text-muted)] py-8 text-center"> {t('monitor.snmpoverviewcha.s1f441890')} </p>
|
<p className="text-xs text-[var(--dg-text-muted)] py-8 text-center"> {t('monitor.lbl.noCpuMetrics')} </p>
|
||||||
) : (
|
) : (
|
||||||
<ResponsiveContainer width="100%" height={Math.max(160, cpuData.length * 36)}>
|
<ResponsiveContainer width="100%" height={Math.max(160, cpuData.length * 36)}>
|
||||||
<BarChart data={cpuData} layout="vertical" margin={{ top: 0, right: 16, left: 0, bottom: 0 }}>
|
<BarChart data={cpuData} layout="vertical" margin={{ top: 0, right: 16, left: 0, bottom: 0 }}>
|
||||||
@@ -100,7 +100,7 @@ export function SnmpOverviewCharts({ devices, overview }: Props) {
|
|||||||
<CardContent className="p-4">
|
<CardContent className="p-4">
|
||||||
<div className="flex items-center gap-2 mb-3">
|
<div className="flex items-center gap-2 mb-3">
|
||||||
<PieChartIcon className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
<PieChartIcon className="h-4 w-4 text-[var(--dg-text-muted)]" />
|
||||||
<h3 className="text-sm font-medium text-[var(--dg-text-primary)]"> {t('monitor.snmpoverviewcha.sbb0ae97f')} </h3>
|
<h3 className="text-sm font-medium text-[var(--dg-text-primary)]"> {t('monitor.lbl.deviceStatus')} </h3>
|
||||||
</div>
|
</div>
|
||||||
<ResponsiveContainer width="100%" height={180}>
|
<ResponsiveContainer width="100%" height={180}>
|
||||||
<PieChart>
|
<PieChart>
|
||||||
|
|||||||
Reference in new issue
Block a user