feat: Adjust offline alert settings (#8607)

This commit is contained in:
2025-05-12 17:11:08 +08:00 committed by GitHub
parent 6d908a2d11
commit cd395b31bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 77 additions and 66 deletions

View file

@ -10,7 +10,9 @@
@opened="opened"
:before-close="handleBeforeClose"
>
<slot name="header"></slot>
<template #header v-if="slots.header">
<slot name="header"></slot>
</template>
<div v-if="slots.content">
<slot name="content"></slot>
</div>

View file

@ -3532,14 +3532,17 @@ 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',
'When offline alert is enabled for the node, the main node will scan every 30 minutes to execute alert tasks.',
offline: 'Offline Alert',
offlineHelper:
'When set to offline alert, the main node will scan every 30 minutes to execute alert tasks.',
offlineOff: 'Enable Offline Alert',
offlineOffHelper:
'Enabling offline alert will make the main node scan every 30 minutes to execute alert tasks.',
offlineClose: 'Disable Offline Alert',
offlineCloseHelper:
'Disabling offline alert requires sub-nodes to handle alerts independently. Please ensure network connectivity to avoid alert failure.',
},
theme: {
lingXiaGold: 'Ling Xia Gold',

View file

@ -3386,14 +3386,17 @@ const message = {
defaultPhone: 'ライセンスに紐付けられたアカウントの電話番号をデフォルトにする',
noticeAlert: '通知アラート',
resourceAlert: 'リソースアラート',
syncToNode: '子ノードに同期',
syncToNodeHelper: '他のノードにアラート設定を同期',
nodes: 'ノード',
selectNode: 'ノードを選択',
selectNodeError: 'ノードを選択してください',
syncToNodeClose: '閉じると他のノードへのアラート設定は同期されません続行しますか',
agentOfflineAlertHelper:
'子ノードのオフラインアラートはメインノードが 30 分ごとにスキャンしてアラートタスクを実行します',
'ノードでオフラインアラートを有効にするとメインードが30分ごとにスキャンしてアラートタスクを実行します',
offline: 'オフラインアラート',
offlineHelper:
'オフラインアラートに設定するとメインードが30分ごとにスキャンしてアラートタスクを実行します',
offlineOff: 'オフラインアラートを有効にする',
offlineOffHelper:
'オフラインアラートを有効にするとメインードが30分ごとにスキャンしてアラートタスクを実行します',
offlineClose: 'オフラインアラートを無効にする',
offlineCloseHelper:
'オフラインアラートを無効にするとサブノードが独自にアラートを処理する必要がありますアラートの失敗を防ぐためネットワーク接続が良好であることを確認してください',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -3327,13 +3327,15 @@ const message = {
defaultPhone: '기본적으로 라이선스에 묶인 계정의 전화번호 사용',
noticeAlert: '공지 알림',
resourceAlert: '리소스 알림',
syncToNode: '자식 노드로 동기화',
syncToNodeHelper: '다른 노드로 알림 설정 동기화',
nodes: '노드',
selectNode: '노드 선택',
selectNodeError: '노드를 선택해 주세요',
syncToNodeClose: '닫으면 다른 노드로 알림 설정이 동기화되지 않습니다. 계속하시겠습니까?',
agentOfflineAlertHelper: '자식 노드 오프라인 알림은 메인 노드가 30분마다 스캔하여 실행합니다',
agentOfflineAlertHelper:
'노드에서 오프라인 알림이 활성화되면, 메인 노드가 30분마다 스캔하여 알림 작업을 수행합니다.',
offline: '오프라인 알림',
offlineHelper: '오프라인 알림으로 설정하면, 메인 노드가 30분마다 스캔하여 알림 작업을 수행합니다.',
offlineOff: '오프라인 알림 활성화',
offlineOffHelper: '오프라인 알림을 활성화하면, 메인 노드가 30분마다 스캔하여 알림 작업을 수행합니다.',
offlineClose: '오프라인 알림 비활성화',
offlineCloseHelper:
'오프라인 알림을 비활성화하면, 하위 노드가 알림을 직접 처리해야 합니다. 알림 실패를 방지하려면 네트워크 연결이 원활한지 확인하세요.',
},
theme: {
lingXiaGold: '링샤 골드',

View file

@ -3466,15 +3466,17 @@ 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',
'Apabila amaran luar talian diaktifkan untuk nod, nod utama akan mengimbas setiap 30 minit untuk melaksanakan tugas amaran.',
offline: 'Amaran Luar Talian',
offlineHelper:
'Apabila ditetapkan kepada amaran luar talian, nod utama akan mengimbas setiap 30 minit untuk melaksanakan tugas amaran.',
offlineOff: 'Aktifkan Amaran Luar Talian',
offlineOffHelper:
'Mengaktifkan amaran luar talian akan menyebabkan nod utama mengimbas setiap 30 minit untuk melaksanakan tugas amaran.',
offlineClose: 'Lumpuhkan Amaran Luar Talian',
offlineCloseHelper:
'Melumpuhkan amaran luar talian memerlukan subnod untuk mengendalikan amaran secara kendiri. Sila pastikan sambungan rangkaian adalah baik untuk mengelakkan kegagalan amaran.',
},
theme: {
lingXiaGold: 'Ling Xia Emas',

View file

@ -3471,15 +3471,17 @@ 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',
'Quando o alerta offline estiver ativado para o , o principal verificará a cada 30 minutos para executar as tarefas de alerta.',
offline: 'Alerta Offline',
offlineHelper:
'Ao definir como alerta offline, o principal verificará a cada 30 minutos para executar tarefas de alerta.',
offlineOff: 'Ativar Alerta Offline',
offlineOffHelper:
'Ao ativar o alerta offline, o principal verificará a cada 30 minutos para executar as tarefas de alerta.',
offlineClose: 'Desativar Alerta Offline',
offlineCloseHelper:
'Ao desativar o alerta offline, os nós secundários deverão lidar com os alertas por conta própria. Certifique-se de que a conectividade de rede está boa para evitar falhas.',
},
theme: {
lingXiaGold: 'Ling Xia Gold',

View file

@ -3461,15 +3461,17 @@ const message = {
defaultPhone: 'По умолчанию используется номер телефона, привязанный к лицензии',
noticeAlert: 'Уведомление',
resourceAlert: 'Уведомление о Ресурсах',
syncToNode: 'Синхронизация с дочерним узлом',
syncToNodeHelper: 'Синхронизация настроек оповещений с другими узлами',
nodes: 'Узлы',
selectNode: 'Выберите узел',
selectNodeError: 'Пожалуйста, выберите узел',
syncToNodeClose:
'После закрытия настройки оповещений не будут синхронизированы с другими узлами. Продолжить?',
agentOfflineAlertHelper:
'Оповещение об отключении дочернего узла. Главный узел будет сканировать и выполнять задачу оповещения каждые 30 минут',
'При включении офлайн-оповещений для узла главный узел будет каждые 30 минут выполнять проверку и запускать задачи оповещения.',
offline: 'Оповещение об отключении',
offlineHelper:
'Если выбрано офлайн-оповещение, главный узел будет каждые 30 минут выполнять проверку и запускать задачи оповещения.',
offlineOff: 'Включить офлайн-оповещение',
offlineOffHelper:
'Включение офлайн-оповещений заставит главный узел каждые 30 минут выполнять задачи оповещения.',
offlineClose: 'Отключить офлайн-оповещение',
offlineCloseHelper:
'Отключив офлайн-оповещения, вы передаёте ответственность за оповещения на подчинённые узлы. Убедитесь, что сеть работает стабильно, чтобы избежать сбоев.',
},
theme: {
lingXiaGold: 'Лин Ся Золотой',

View file

@ -3278,13 +3278,13 @@ const message = {
defaultPhone: '預設使用與許可證綁定的帳戶手機號',
noticeAlert: '通知告警',
resourceAlert: '資源告警',
syncToNode: '同步至子節點',
syncToNodeHelper: '同步告警設置至其他節點',
nodes: '節點',
selectNode: '選擇節點',
selectNodeError: '請選擇節點',
syncToNodeClose: '關閉後將不同步告警設置到其他節點是否繼續',
agentOfflineAlertHelper: '子節點離線告警將由主節點每半小時掃描執行一次告警任務',
agentOfflineAlertHelper: '當節點啟用離線告警時主節點將每半小時掃描並執行一次告警任務',
offline: '離線告警',
offlineHelper: '設為離線告警時主節點將每半小時掃描並執行一次告警任務',
offlineOff: '開啟離線告警',
offlineOffHelper: '開啟離線告警後主節點將每半小時掃描並執行一次告警任務',
offlineClose: '關閉離線告警',
offlineCloseHelper: '關閉離線告警後需由子節點自行告警請確保子節點網路通暢以免告警失敗',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -3260,13 +3260,13 @@ const message = {
defaultPhone: '默认使用与许可证绑定的账户手机号',
noticeAlert: '通知告警',
resourceAlert: '资源告警',
syncToNode: '同步至子节点',
syncToNodeHelper: '同步告警设置至其他节点',
nodes: '节点',
selectNode: '选择节点',
selectNodeError: '请选择节点',
syncToNodeClose: '关闭后将不同步告警设置到其他节点是否继续',
agentOfflineAlertHelper: '子节点离线告警会通过主节点每半小时扫描执行一次告警任务',
agentOfflineAlertHelper: '节点开启离线告警将通过主节点每半小时扫描执行一次告警任务',
offline: '离线告警',
offlineHelper: '设置为离线告警将通过主节点每半小时扫描执行一次告警任务',
offlineOff: '开启离线告警',
offlineOffHelper: '开启离线告警将通过主节点每半小时扫描执行一次告警任务',
offlineClose: '关闭离线告警',
offlineCloseHelper: '关闭离线告警告警需通过子节点自行告警请保证子节点网络畅通以避免告警失败',
},
theme: {
lingXiaGold: '凌霞金',

View file

@ -166,7 +166,6 @@ const changeNode = (command: string) => {
if (command == 'local') {
globalStore.currentNode = command || 'local';
globalStore.currentNodeAddr = '';
globalStore.isOffline = false;
router.push({ name: 'home' }).then(() => {
window.location.reload();
});
@ -188,7 +187,6 @@ const changeNode = (command: string) => {
}
globalStore.currentNode = command || 'local';
globalStore.currentNodeAddr = item.addr;
globalStore.isOffline = item.isOffline;
router.push({ name: 'home' }).then(() => {
window.location.reload();
});

View file

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

View file

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

View file

@ -101,7 +101,7 @@ export async function getXpackSettingForTheme() {
globalStore.themeConfig.loginBgType = res2.data?.loginBgType;
globalStore.themeConfig.loginBackground = res2.data?.loginBackground;
globalStore.themeConfig.themeColor = res2.data?.themeColor;
globalStore.themeConfig.theme = res2.data?.theme || 'auto';
globalStore.themeConfig.theme = res2.data?.theme || 'light';
} else {
resetXSetting();
}

View file

@ -337,7 +337,6 @@ const login = (formEl: FormInstance | undefined) => {
menuStore.setMenuList([]);
tabsStore.removeAllTabs();
globalStore.currentNode = 'local';
globalStore.isOffline = false;
MsgSuccess(i18n.t('commons.msg.loginSuccess'));
router.push({ name: 'home' });
document.onkeydown = null;