feat: 品牌统一 LokiStack + 全站中英 i18n + 用户批量删除 + 主题定时切换与浅色侧栏

- 品牌: Go 模块/数据文件/二进制/构建部署资产全部 opsx→lokistack;前端 localStorage 命名空间迁移(读旧写新,含按用户 id 前缀迁移);修复 nginx upstream 与 Makefile 引用已改名服务的断裂
- i18n: react-i18next 落地,common + 11 个页面域命名空间全站中英(菜单/顶栏/登录/列表页/表单/确认弹窗/状态徽章);设置页语言即时切换;修复词典自注册导致的循环导入白屏
- 用户管理: 批量删除(POST /users/batch-delete,不删自己/最后管理员,部分失败不阻断)+ 行复选/全选/批量工具条
- 主题: 浅色侧栏(中性灰激活态)、四态模式(浅色/深色/跟随系统/定时切换,按时区判定)、顶栏太阳月亮二态、设置页紧凑分段选择器
- UI: 登录记住用户名、CardActionButton 统一五页卡片操作钮、shadcn Badge 替换手写徽章、语义色修正
- 清理: 移除主机 Web 终端(前后端)、k8s-helm/Helm 遗留代码与字段、README 重写精简
- 修复: 侧栏与日志告警 order 重复、路由标题 i18n key 未翻译、词典双逗号等
This commit is contained in:
opsx committed 2026-10-27 17:11:38 +08:00
1 parent 02d1bd87a7
commit f3733f0bfc
201 files changed
+5438 -2388

No files matched your search

+82
View File
@@ -0,0 +1,82 @@
// alerts namespace — Log alerts domain (header / rule form & templates / delivery history / Feishu (Lark) notify hints)
export default {
title: 'Alerts',
subtitle:
'Monitor logs with LogQL count rules; push a Feishu (Lark) card when the threshold is exceeded (1-minute cycle)',
checkNow: 'Check Now',
checking: 'Checking...',
create: 'New Rule',
emptyTitle: 'No alert rules yet',
emptyDesc:
'e.g. {namespace=~".+"} |= "FATAL" — any match within 15 minutes pushes a Feishu (Lark) card',
sourceFallback: 'Data source {{id}}',
noChannels: 'No channels linked',
channelSep: ', ',
ruleMeta:
'Fires on more than {{threshold}} matches within {{window}} min · Cooldown {{cooldown}} min',
lastFired: 'Last fired {{time}}',
editAria: 'Edit {{name}}',
deleteAria: 'Delete {{name}}',
historyTitle: 'Delivery history (last 50)',
notifyHintPre: 'Notifications not configured? Go to',
notifyHintPost: 'to configure a Feishu (Lark) Webhook',
editTitle: 'Edit rule · {{name}}',
createTitle: 'New Alert Rule',
templates: 'Quick templates (click to prefill, then adjust as needed)',
saving: 'Saving...',
save: 'Save Changes',
submitCreate: 'Create Rule',
loadFailed: 'Failed to load alert data',
saveFailed: 'Failed to save',
deleteFailed: 'Failed to delete',
checkDone: 'Check completed. See delivery history for results.',
checkFailed: 'Check failed',
toggleFailed: 'Failed to toggle',
confirmDeleteTitle: 'Confirm alert rule deletion',
delivery: {
sent: 'Sent',
cooldown: 'Skipped (cooldown)',
failed: 'Failed',
hits_one: '{{count}} match',
hits_other: '{{count}} matches',
},
tpl: {
nsError: {
label: 'Namespace errors',
desc: 'Error logs in a given namespace (default astralx)',
},
allNsError: {
label: 'All-NS errors > 1000',
desc: 'Total error logs across all namespaces exceed 1000',
},
ingress5xx: {
label: 'Ingress 5xx',
desc: 'ingress-nginx 5xx (requires JSON access logs; the platform can normalize them in one click)',
},
ingress4xx: {
label: 'Ingress 4xx',
desc: 'ingress-nginx 4xx (requires JSON access logs)',
},
fatal: {
label: 'FATAL',
desc: 'Alert on any FATAL log across all namespaces',
},
},
form: {
name: 'Rule name *',
namePlaceholder: 'App fatal errors',
source: 'Data source *',
sourcePlaceholder: 'Select a data source',
query: 'LogQL query *',
queryHint:
'Common: {app="xxx"} |= "FATAL" / {namespace=~".+"} |~ "(?i)error" / {app="x"} |= "OutOfMemoryError"',
channels: 'Channels (multi-select to fan out to multiple alert groups)',
noChannels: 'Create channels first under "Settings → Alert Notifications"',
channelDisabled: '(disabled)',
window: 'Window (min)',
threshold: 'Threshold (matches)',
thresholdHint: '0 = alert on any match',
cooldown: 'Cooldown (min)',
enabled: 'Enable rule',
},
}