fix(i18n): hardkodierte Strings in DNS/RoutingRules/Settings/Backends bereinigen
- DNS Settings: Loopback/allIPv4/allIPv6 Interface-Labels in t() überführt
- RoutingRules: UP/DOWN-Tags + fehlende onError-Handler in create/update
- Settings: t-Variable-Shadowing in top_tables-Map behoben (t → tbl)
- Backends: 'Live'-Spaltenheader → t('backends.server.live')
- common.up/down + dns.settings.allIPv4/allIPv6/loopback in en+de ergänzt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -309,7 +309,7 @@ function ServerPanel({ backendID, haproxyStats }: { backendID: number; haproxySt
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Live', key: 'live', width: 160,
|
||||
title: t('backends.server.live'), key: 'live', width: 160,
|
||||
render: (_, r) => {
|
||||
const stat = haproxyStats.find(
|
||||
s => s.backend === `eg_backend_${backendID}` && s.server === r.name
|
||||
|
||||
@@ -442,10 +442,10 @@ function SettingsTab() {
|
||||
// Mode "tags" damit der Operator notfalls auch eine IP eintippen kann
|
||||
// die der Kernel noch nicht meldet (z.B. eine geplante VIP).
|
||||
const ipOptions: { value: string; label: string }[] = []
|
||||
ipOptions.push({ value: '0.0.0.0', label: '0.0.0.0 — alle IPv4-Interfaces' })
|
||||
ipOptions.push({ value: '::', label: ':: — alle IPv6-Interfaces' })
|
||||
ipOptions.push({ value: '127.0.0.1', label: '127.0.0.1 — Loopback IPv4' })
|
||||
ipOptions.push({ value: '::1', label: '::1 — Loopback IPv6' })
|
||||
ipOptions.push({ value: '0.0.0.0', label: `0.0.0.0 — ${t('dns.settings.allIPv4')}` })
|
||||
ipOptions.push({ value: '::', label: `:: — ${t('dns.settings.allIPv6')}` })
|
||||
ipOptions.push({ value: '127.0.0.1', label: `127.0.0.1 — ${t('dns.settings.loopback')} IPv4` })
|
||||
ipOptions.push({ value: '::1', label: `::1 — ${t('dns.settings.loopback')} IPv6` })
|
||||
for (const i of sys ?? []) {
|
||||
if (i.ifname === 'lo') continue
|
||||
for (const a of i.addr_info ?? []) {
|
||||
|
||||
@@ -106,6 +106,7 @@ export default function RoutingRulesPage() {
|
||||
form.resetFields()
|
||||
void qc.invalidateQueries({ queryKey: ['routing-rules'] })
|
||||
},
|
||||
onError: (e: Error) => message.error(e.message),
|
||||
})
|
||||
const update = useMutation({
|
||||
mutationFn: async ({ id, v }: { id: number; v: RuleFormValues }) => {
|
||||
@@ -117,6 +118,7 @@ export default function RoutingRulesPage() {
|
||||
form.resetFields()
|
||||
void qc.invalidateQueries({ queryKey: ['routing-rules'] })
|
||||
},
|
||||
onError: (e: Error) => message.error(e.message),
|
||||
})
|
||||
const del = useMutation({
|
||||
mutationFn: async (id: number) => { await apiClient.delete(`/routing-rules/${id}`) },
|
||||
@@ -144,7 +146,7 @@ export default function RoutingRulesPage() {
|
||||
<span>{backendLabel(id)}</span>
|
||||
{h && (
|
||||
<Tooltip title={tip}>
|
||||
<Tag color={h.up ? 'green' : 'red'} style={{ margin: 0 }}>{h.up ? 'UP' : 'DOWN'}</Tag>
|
||||
<Tag color={h.up ? 'green' : 'red'} style={{ margin: 0 }}>{h.up ? t('common.up') : t('common.down')}</Tag>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Space>
|
||||
|
||||
@@ -326,8 +326,8 @@ export default function SettingsPage() {
|
||||
{dbSize.top_tables.length > 0 && (
|
||||
<Typography.Text type="secondary" style={{ fontSize: 11 }}>
|
||||
{t('settings.dbSizeTop')}:{' '}
|
||||
{dbSize.top_tables.slice(0, 3).map(t =>
|
||||
`${t.name} (${t.human_size})`
|
||||
{dbSize.top_tables.slice(0, 3).map(tbl =>
|
||||
`${tbl.name} (${tbl.human_size})`
|
||||
).join(', ')}
|
||||
</Typography.Text>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user