mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-24 08:12:19 +07:00
feat(memory): add memory threshold alerts (#5366)
* feat(memory): add memory threshold alerts
Add memory (RAM) threshold alerts following the same architecture as
CPU alerts: CheckMemJob with @every 1m cadence, memoryAlarmWanted gate,
tgMemory/smtpMemory per-subscriber settings (default 80%), EventBusCheckboxes
with inline threshold input, i18n for en-US/ru-RU with English defaults.
# Conflicts:
# internal/web/translation/ar-EG.json
# internal/web/translation/es-ES.json
# internal/web/translation/fa-IR.json
# internal/web/translation/id-ID.json
# internal/web/translation/ja-JP.json
# internal/web/translation/pt-BR.json
# internal/web/translation/ru-RU.json
# internal/web/translation/tr-TR.json
# internal/web/translation/uk-UA.json
# internal/web/translation/vi-VN.json
# internal/web/translation/zh-CN.json
# internal/web/translation/zh-TW.json
* fix: address code review findings for memory alerts
- Remove dead settingService field from CheckMemJob
- Fix cpuThreshold double-emoji in 12 locale files (code prepends 🔴)
- Align TgCpu/TgMemory fields in entity.go
- Add missing SetTgMemory function
* fix: restore settingService in CheckMemJob for consistency with CheckCpuJob
This commit is contained in:
@@ -1309,6 +1309,7 @@
|
||||
"smtpErrorRelay": "O servidor rejeita o envio a partir deste endereço",
|
||||
"smtpErrorEof": "Conexão encerrada pelo servidor",
|
||||
"smtpErrorUnknown": "Erro de SMTP: {{ .Error }}",
|
||||
"eventMemoryHigh": "Uso de memória alto (%)",
|
||||
"remarkTemplate": "Modelo de Observação",
|
||||
"remarkTemplateDesc": "Quando definido, isto substitui o modelo de observação de cada link de assinatura — escreva seu próprio formato com os tokens de variáveis (use o botão para inseri-los). Deixe vazio para usar o modelo acima."
|
||||
},
|
||||
@@ -1865,7 +1866,7 @@
|
||||
"idDesc": "Mostrar seu ID do Telegram"
|
||||
},
|
||||
"messages": {
|
||||
"cpuThreshold": "🔴 A carga da CPU {{ .Percent }}% excede o limite de {{ .Threshold }}%",
|
||||
"cpuThreshold": "A carga da CPU {{ .Percent }}% excede o limite de {{ .Threshold }}%",
|
||||
"selectUserFailed": "❌ Erro na seleção do usuário!",
|
||||
"userSaved": "✅ Usuário do Telegram salvo.",
|
||||
"loginSuccess": "✅ Conectado ao painel com sucesso.\r\n",
|
||||
@@ -1940,7 +1941,8 @@
|
||||
"eventNodeUp": "O nó {{ .Name }} está ATIVO",
|
||||
"eventCPUHigh": "CPU alta",
|
||||
"eventCPUHighDetail": "CPU: {{ .Detail }}",
|
||||
"eventLoginFallback": "Falha de login a partir de {{ .Source }}"
|
||||
"eventLoginFallback": "Falha de login a partir de {{ .Source }}",
|
||||
"memoryThreshold": "Uso de memória {{ .Percent }}% excede o limite de {{ .Threshold }}%"
|
||||
},
|
||||
"buttons": {
|
||||
"closeKeyboard": "❌ Fechar teclado",
|
||||
@@ -2043,4 +2045,4 @@
|
||||
"statusDown": "INATIVO",
|
||||
"statusUp": "ATIVO"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user