feat: Agent nodes offline, alert through the main node (#8303)

This commit is contained in:
2025-04-02 18:23:53 +08:00 committed by GitHub
parent eaefac4be4
commit c93d229bae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 87 additions and 3 deletions

View file

@ -4,8 +4,9 @@ const (
AlertEnable = "Enable"
AlertDisable = "Disable"
AlertSuccess = "Success"
AlertPushing = "Pushing"
AlertError = "Error"
AlertSyncError = "SyncError"
AlertPushError = "PushError"
AlertPushSuccess = "PushSuccess"
)
)

View file

@ -38,7 +38,7 @@
"codemirror": "^6.0.1",
"crypto-js": "^4.2.0",
"echarts": "^5.5.0",
"element-plus": "^2.7.5",
"element-plus": "^2.9.7",
"fit2cloud-ui-plus": "^1.2.0",
"highlight.js": "^11.9.0",
"js-base64": "^3.7.7",
@ -62,6 +62,7 @@
},
"devDependencies": {
"@types/node": "^20.14.8",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.22.0",
"@vitejs/plugin-vue": "^5.0.5",

View file

@ -3359,6 +3359,8 @@ const message = {
pushSuccess: 'Push Successful',
syncError: 'Sync Failed',
success: 'Alert Successful',
pushing: 'Pushing...',
error: 'Alert Failed',
cleanLog: 'Clean Logs',
cleanAlertLogs: 'Clean Alert Logs',
daily: 'Daily Alert Count: {0}',
@ -3415,6 +3417,14 @@ const message = {
defaultPhone: 'Default to license-bound account phone number',
noticeAlert: 'Notice Alert',
resourceAlert: 'Resource Alert',
syncToNode: 'Sync to Node',
syncToNodeHelper: 'Sync alert settings to other nodes',
nodes: 'Node',
selectNode: 'Select Node',
selectNodeError: 'Please select a node',
syncToNodeClose: 'After closing, set the async alert settings to another node. Do you want to continue?',
agentOfflineAlertHelper:
'The child node offline alert will be scanned and executed by the main node every 30 minutes',
},
theme: {
lingXiaGold: 'Ling Xia Gold',

View file

@ -3210,6 +3210,8 @@ const message = {
pushSuccess: 'プッシュ成功',
syncError: '同期失敗',
success: 'アラート成功',
pushing: 'プッシュ中...',
error: 'アラート失敗',
cleanLog: 'ログをクリア',
cleanAlertLogs: 'アラートログをクリア',
daily: '1日のアラート数{0}',
@ -3266,6 +3268,14 @@ const message = {
defaultPhone: 'ライセンスに紐付けられたアカウントの電話番号をデフォルトにする',
noticeAlert: '通知アラート',
resourceAlert: 'リソースアラート',
syncToNode: '子ノードに同期',
syncToNodeHelper: '他のノードにアラート設定を同期',
nodes: 'ノード',
selectNode: 'ノードを選択',
selectNodeError: 'ノードを選択してください',
syncToNodeClose: '閉じると他のノードへのアラート設定は同期されません続行しますか',
agentOfflineAlertHelper:
'子ノードのオフラインアラートはメインノードが 30 分ごとにスキャンしてアラートタスクを実行します',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -3155,6 +3155,8 @@ const message = {
pushSuccess: '푸시 성공',
syncError: '동기화 실패',
success: '알림 성공',
pushing: '푸시 ...',
error: '알림 실패',
cleanLog: '로그 정리',
cleanAlertLogs: '알림 로그 정리',
daily: '일일 알림 : {0}',
@ -3211,6 +3213,13 @@ const message = {
defaultPhone: '기본적으로 라이선스에 묶인 계정의 전화번호 사용',
noticeAlert: '공지 알림',
resourceAlert: '리소스 알림',
syncToNode: '자식 노드로 동기화',
syncToNodeHelper: '다른 노드로 알림 설정 동기화',
nodes: '노드',
selectNode: '노드 선택',
selectNodeError: '노드를 선택해 주세요',
syncToNodeClose: '닫으면 다른 노드로 알림 설정이 동기화되지 않습니다. 계속하시겠습니까?',
agentOfflineAlertHelper: '자식 노드 오프라인 알림은 메인 노드가 30분마다 스캔하여 실행합니다',
},
theme: {
lingXiaGold: '링샤 골드',

View file

@ -3289,6 +3289,8 @@ const message = {
pushSuccess: 'Tekanan Berjaya',
syncError: 'Penyelarasan Gagal',
success: 'Amaran Berjaya',
pushing: 'Sedang menghantar...',
error: 'Amaran gagal',
cleanLog: 'Bersihkan Log',
cleanAlertLogs: 'Bersihkan Log Amaran',
daily: 'Bilangan Amaran Harian: {0}',
@ -3345,6 +3347,15 @@ const message = {
defaultPhone: 'Secara lalai ke nombor telefon akaun terikat lesen',
noticeAlert: 'Amaran Pemberitahuan',
resourceAlert: 'Amaran Sumber',
syncToNode: 'Penyegerakan ke nod anak',
syncToNodeHelper: 'Penyegerakan tetapan amaran ke nod lain',
nodes: 'Nod',
selectNode: 'Pilih nod',
selectNodeError: 'Sila pilih nod',
syncToNodeClose:
'Menutup ini tidak akan menyegerakkan tetapan amaran ke nod lain. Adakah anda ingin meneruskan?',
agentOfflineAlertHelper:
'Amaran luar talian nod anak akan diimbas dan dilaksanakan oleh nod utama setiap 30 minit',
},
theme: {
lingXiaGold: 'Ling Xia Emas',

View file

@ -3290,6 +3290,8 @@ const message = {
pushSuccess: 'Envio Bem-sucedido',
syncError: 'Sincronização Falhou',
success: 'Alerta Bem-sucedido',
pushing: 'Enviando...',
error: 'Falha no alerta',
cleanLog: 'Limpar Registros',
cleanAlertLogs: 'Limpar Registros de Alertas',
daily: 'Contagem Diária de Alertas: {0}',
@ -3346,6 +3348,15 @@ const message = {
defaultPhone: 'Número de telefone padrão vinculado à conta de licença',
noticeAlert: 'Alerta de Notificação',
resourceAlert: 'Alerta de Recursos',
syncToNode: 'Sincronizar para o filho',
syncToNodeHelper: 'Sincronizar configurações de alerta para outros nós',
nodes: 'Nós',
selectNode: 'Selecionar ',
selectNodeError: 'Por favor, selecione um ',
syncToNodeClose:
'Ao fechar, as configurações de alerta não serão sincronizadas para outros nós. Deseja continuar?',
agentOfflineAlertHelper:
'O alerta de offline do filho será verificado e executado pelo principal a cada 30 minutos',
},
theme: {
lingXiaGold: 'Ling Xia Gold',

View file

@ -3280,6 +3280,8 @@ const message = {
pushSuccess: 'Отправка успешна',
syncError: 'Ошибка синхронизации',
success: 'Уведомление успешно',
pushing: 'В процессе отправки...',
error: 'Ошибка оповещения',
cleanLog: 'Очистить логи',
cleanAlertLogs: 'Очистить журналы уведомлений',
daily: 'Ежедневное количество уведомлений: {0}',
@ -3341,6 +3343,15 @@ const message = {
defaultPhone: 'По умолчанию используется номер телефона, привязанный к лицензии',
noticeAlert: 'Уведомление',
resourceAlert: 'Уведомление о Ресурсах',
syncToNode: 'Синхронизация с дочерним узлом',
syncToNodeHelper: 'Синхронизация настроек оповещений с другими узлами',
nodes: 'Узлы',
selectNode: 'Выберите узел',
selectNodeError: 'Пожалуйста, выберите узел',
syncToNodeClose:
'После закрытия настройки оповещений не будут синхронизированы с другими узлами. Продолжить?',
agentOfflineAlertHelper:
'Оповещение об отключении дочернего узла. Главный узел будет сканировать и выполнять задачу оповещения каждые 30 минут',
},
theme: {
lingXiaGold: 'Лин Ся Золотой',

View file

@ -3112,6 +3112,8 @@ const message = {
pushSuccess: '推送成功',
syncError: '同步失敗',
success: '告警成功',
pushing: '推送中...',
error: '告警失敗',
cleanLog: '清空日誌',
cleanAlertLogs: '清空告警日誌',
daily: '當日第 {0} 次告警',
@ -3168,6 +3170,13 @@ const message = {
defaultPhone: '預設使用與許可證綁定的帳戶手機號',
noticeAlert: '通知告警',
resourceAlert: '資源告警',
syncToNode: '同步至子節點',
syncToNodeHelper: '同步告警設置至其他節點',
nodes: '節點',
selectNode: '選擇節點',
selectNodeError: '請選擇節點',
syncToNodeClose: '關閉後將不同步告警設置到其他節點是否繼續',
agentOfflineAlertHelper: '子節點離線告警將由主節點每半小時掃描執行一次告警任務',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -3081,7 +3081,7 @@ const message = {
allDiskTitle: '磁盘占用过高告警',
timeRule: '剩余时间小于 {0} (如未处理次日会重新发送)',
panelUpdateRule: '检测到面板有新版本时发vb送一次 (如未处理次日会重新发送)',
panelUpdateRule: '检测到面板有新版本时发送一次 (如未处理次日会重新发送)',
avgRule: '{0} 分钟内平均{1}占用超过 {2}% 触发每天发送 {3} ',
diskRule: '挂载目录 {0} 的磁盘占用超过 {1}{2} 触发每天发送 {3} ',
allDiskRule: '磁盘占用超过 {0}{1} 触发每天发送 {2} ',
@ -3097,6 +3097,8 @@ const message = {
pushSuccess: '推送成功',
syncError: '同步失败',
success: '告警成功',
pushing: '推送中...',
error: '告警失败',
cleanLog: '清空日志',
cleanAlertLogs: '清空告警日志',
daily: '当日第 {0} 次告警',
@ -3150,6 +3152,13 @@ const message = {
defaultPhone: '默认使用与许可证绑定的账户手机号',
noticeAlert: '通知告警',
resourceAlert: '资源告警',
syncToNode: '同步至子节点',
syncToNodeHelper: '同步告警设置至其他节点',
nodes: '节点',
selectNode: '选择节点',
selectNodeError: '请选择节点',
syncToNodeClose: '关闭后将不同步告警设置到其他节点是否继续',
agentOfflineAlertHelper: '子节点离线告警会通过主节点每半小时扫描执行一次告警任务',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -41,6 +41,7 @@ export interface GlobalState {
errStatus: string;
currentNode: string;
isOffline: boolean;
}
export interface MenuState {

View file

@ -44,6 +44,7 @@ const GlobalStore = defineStore({
errStatus: '',
currentNode: 'local',
isOffline: false,
}),
getters: {
isDarkTheme: (state) =>