diff --git a/frontend/src/components/router-button/index.vue b/frontend/src/components/router-button/index.vue
index 768dcb532..fe1b8de44 100644
--- a/frontend/src/components/router-button/index.vue
+++ b/frontend/src/components/router-button/index.vue
@@ -21,6 +21,9 @@
+
+
+
@@ -52,6 +55,8 @@ import { computed, onMounted, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { hasPermissionMetaAccess, hasRouteAccess } from '@/utils/rbac';
import { useGlobalStore } from '@/composables/useGlobalStore';
+import { getSettingBaseInfo } from '@/api/modules/setting';
+import { listNodes } from '@/utils/node';
defineOptions({ name: 'RouterButton' });
@@ -67,7 +72,7 @@ const props = defineProps({
});
const router = useRouter();
-const { isEnterprise, isIntl, productProExpires } = useGlobalStore();
+const { currentNode, isEnterprise, isIntl, isXpackOrEE, productProExpires } = useGlobalStore();
const buttonArray = computed(() => {
return props.buttons.filter((button) => {
if (!hasPermissionMetaAccess(button.permission)) {
@@ -82,6 +87,7 @@ const buttonArray = computed(() => {
});
const activeName = ref('');
+const currentNodeVersionMismatch = ref(false);
const expiresInfo = ref(0);
const expiresAlertVisible = ref(false);
const expiresAlertKey = computed(() => (isEnterprise.value ? 'xpack.expiresEnterpriseAlert' : 'xpack.expiresProAlert'));
@@ -113,6 +119,33 @@ watch(
},
);
+watch([currentNode, isXpackOrEE], checkCurrentNodeVersion, { immediate: true });
+
+async function checkCurrentNodeVersion() {
+ const checkedNode = currentNode.value;
+ if (checkedNode === 'local' || !isXpackOrEE.value) {
+ currentNodeVersionMismatch.value = false;
+ return;
+ }
+
+ try {
+ const [settingRes, nodes] = await Promise.all([getSettingBaseInfo(), listNodes('all')]);
+ if (currentNode.value !== checkedNode) {
+ return;
+ }
+ const currentNodeInfo = nodes.find((item) => item.name === checkedNode);
+ currentNodeVersionMismatch.value = Boolean(
+ currentNodeInfo?.version &&
+ settingRes.data.systemVersion &&
+ currentNodeInfo.version !== settingRes.data.systemVersion,
+ );
+ } catch {
+ if (currentNode.value === checkedNode) {
+ currentNodeVersionMismatch.value = false;
+ }
+ }
+}
+
function syncActiveName() {
if (!buttonArray.value.length) {
activeName.value = '';
diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts
index 7ce2b80d7..5325e4b41 100644
--- a/frontend/src/lang/modules/en.ts
+++ b/frontend/src/lang/modules/en.ts
@@ -3167,6 +3167,8 @@ const message = {
upgradeNow: 'Upgrade now',
source: 'Download source',
versionNotSame: 'Node version mismatch with the main node. Please upgrade in Node Management before retrying.',
+ currentNodeVersionNotSame:
+ 'The current node version does not match the main node. Contact the administrator to upgrade the current node.',
versionCompare:
'Detected that node {0} is already at the latest upgradable version. Please check the primary node version and try again!',
about: 'About',
diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts
index 40135c4b6..a7e91fdaf 100644
--- a/frontend/src/lang/modules/es-es.ts
+++ b/frontend/src/lang/modules/es-es.ts
@@ -3225,6 +3225,8 @@ const message = {
source: 'Fuente de descarga',
versionNotSame:
'La versión del nodo no coincide con la del nodo principal. Actualiza en la gestión de nodos antes de reintentar.',
+ currentNodeVersionNotSame:
+ 'La versión del nodo actual no coincide con la del nodo principal. Contacta con el administrador para actualizar el nodo actual.',
versionCompare:
'Se detectó que el nodo {0} ya está en la última versión actualizable. Verifica la versión del nodo principal e inténtalo de nuevo.',
about: 'Acerca de',
diff --git a/frontend/src/lang/modules/fa.ts b/frontend/src/lang/modules/fa.ts
index cec435e21..6fb4de3b4 100644
--- a/frontend/src/lang/modules/fa.ts
+++ b/frontend/src/lang/modules/fa.ts
@@ -3135,6 +3135,8 @@ const message = {
upgradeNow: 'ارتقاء اکنون',
source: 'منبع دانلود',
versionNotSame: 'نسخه گره با گره اصلی مطابقت ندارد. لطفاً قبل از تلاش مجدد در مدیریت گره ارتقاء دهید.',
+ currentNodeVersionNotSame:
+ 'نسخه گره فعلی با گره اصلی مطابقت ندارد. برای ارتقای گره فعلی با مدیر سیستم تماس بگیرید.',
versionCompare:
'تشخیص داده شد که گره {0} در حال حاضر به آخرین نسخه قابل ارتقاء رسیده است. لطفاً نسخه گره اصلی را بررسی کرده و دوباره تلاش کنید!',
about: 'درباره',
diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts
index 6fe2c82cb..e2a4fe88b 100644
--- a/frontend/src/lang/modules/ja.ts
+++ b/frontend/src/lang/modules/ja.ts
@@ -3123,6 +3123,8 @@ const message = {
source: 'ソースをダウンロードします',
versionNotSame:
'ノードのバージョンがメインノードと一致していません。ノード管理でアップグレードしてから再試行してください。',
+ currentNodeVersionNotSame:
+ '現在のノードのバージョンがメインノードと一致していません。管理者に連絡して、現在のノードをアップグレードしてください。',
versionCompare:
'ノード {0} は既にアップグレード可能な最新バージョンです。マスターノードのバージョンを確認後、再試行してください!',
about: 'について',
diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts
index cca8af5c5..823f1d9a4 100644
--- a/frontend/src/lang/modules/ko.ts
+++ b/frontend/src/lang/modules/ko.ts
@@ -3070,6 +3070,8 @@ const message = {
upgradeNow: '지금 업그레이드',
source: '다운로드 소스',
versionNotSame: '노드 버전이 메인 노드와 일치하지 않습니다. 노드 관리에서 업그레이드한 후 다시 시도해 주세요.',
+ currentNodeVersionNotSame:
+ '현재 노드 버전이 메인 노드와 일치하지 않습니다. 관리자에게 문의하여 현재 노드를 업그레이드하세요.',
versionCompare:
'노드 {0}이(가) 이미 업그레이드 가능한 최신 버전입니다. 마스터 노드 버전을 확인 후 다시 시도하세요!',
about: '정보',
diff --git a/frontend/src/lang/modules/lo.ts b/frontend/src/lang/modules/lo.ts
index 0591bbcce..d00de3c8f 100644
--- a/frontend/src/lang/modules/lo.ts
+++ b/frontend/src/lang/modules/lo.ts
@@ -3080,6 +3080,8 @@ const message = {
upgradeNow: 'ອັບເກຣດດຽວນີ້',
source: 'ແຫຼ່ງດາວໂຫຼດ',
versionNotSame: 'ເວີຊັນຂອງໂນດບໍ່ກົງກັບໂນດຫຼັກ. ກະລຸນາອັບເກຣດໃນ "ຈັດການໂນດ" ກ່ອນລອງໃໝ່.',
+ currentNodeVersionNotSame:
+ 'ເວີຊັນຂອງໂນດປັດຈຸບັນບໍ່ກົງກັບໂນດຫຼັກ. ກະລຸນາຕິດຕໍ່ຜູ້ຄຸ້ມຄອງເພື່ອອັບເກຣດໂນດປັດຈຸບັນ.',
versionCompare: 'ກວດພົບວ່າໂນດ {0} ເປັນເວີຊັນຫຼ້າສຸດທີ່ອັບເກຣດໄດ້ແລ້ວ. ກະລຸນາກວດສອບເວີຊັນຂອງໂນດຫຼັກແລ້ວລອງໃໝ່!',
about: 'ກ່ຽວກັບ',
versionItem: 'ເວີຊັນປັດຈຸບັນ',
diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts
index 09ced39dc..f5a9b714a 100644
--- a/frontend/src/lang/modules/ms.ts
+++ b/frontend/src/lang/modules/ms.ts
@@ -3198,6 +3198,8 @@ const message = {
source: 'Sumber muat turun',
versionNotSame:
'Versi nod tidak sepadan dengan nod utama. Sila naik taraf di Pengurusan Nod sebelum mencuba semula.',
+ currentNodeVersionNotSame:
+ 'Versi nod semasa tidak sepadan dengan nod utama. Hubungi pentadbir untuk menaik taraf nod semasa.',
versionCompare:
'Nod {0} telah berada pada versi terkini yang boleh dinaik taraf. Sila periksa versi nod utama dan cuba lagi!',
about: 'Mengenai',
diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts
index 52eb90409..dfff84c41 100644
--- a/frontend/src/lang/modules/pt-br.ts
+++ b/frontend/src/lang/modules/pt-br.ts
@@ -3198,6 +3198,8 @@ const message = {
source: 'Fonte para download',
versionNotSame:
'A versão do nó não corresponde à do nó principal. Atualize na Gestão de Nós antes de tentar novamente.',
+ currentNodeVersionNotSame:
+ 'A versão do nó atual não corresponde à do nó principal. Entre em contato com o administrador para atualizar o nó atual.',
versionCompare:
'Detectado que o nó {0} já está na última versão atualizável. Por favor, verifique a versão do nó principal e tente novamente!',
about: 'Sobre',
diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts
index f8c7a10f4..324a78882 100644
--- a/frontend/src/lang/modules/ru.ts
+++ b/frontend/src/lang/modules/ru.ts
@@ -3171,6 +3171,8 @@ const message = {
source: 'Источник загрузки',
versionNotSame:
'Версия узла не совпадает с основной. Пожалуйста, обновите в Управлении узлами перед повторной попыткой.',
+ currentNodeVersionNotSame:
+ 'Версия текущего узла не совпадает с версией основного узла. Обратитесь к администратору, чтобы обновить текущий узел.',
versionCompare:
'Обнаружено, что узел {0} уже имеет последнюю обновляемую версию. Пожалуйста, проверьте версию основного узла и повторите попытку!',
about: 'О программе',
diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts
index 751b2ab65..511eb0025 100644
--- a/frontend/src/lang/modules/tr.ts
+++ b/frontend/src/lang/modules/tr.ts
@@ -3207,6 +3207,8 @@ const message = {
upgradeNow: 'Şimdi yükselt',
source: 'İndirme kaynağı',
versionNotSame: 'Düğüm sürümü ana düğümle uyuşmuyor. Lütfen Düğüm Yönetiminde yükseltin ve tekrar deneyin.',
+ currentNodeVersionNotSame:
+ 'Geçerli düğüm sürümü ana düğümle uyuşmuyor. Geçerli düğümü yükseltmek için yöneticiyle iletişime geçin.',
versionCompare:
'{0} düğümünün zaten en son yükseltilebilir sürümde olduğu tespit edildi. Lütfen birincil düğüm sürümünü kontrol edin ve tekrar deneyin!',
about: 'Hakkında',
diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts
index e72f95f21..ad9887e93 100644
--- a/frontend/src/lang/modules/zh-Hant.ts
+++ b/frontend/src/lang/modules/zh-Hant.ts
@@ -2860,6 +2860,7 @@ const message = {
upgradeNow: '立即更新',
source: '下載源',
versionNotSame: '節點版本與主節點不一致,請在節點管理中升級後重試。',
+ currentNodeVersionNotSame: '目前節點版本與主節點不一致,請聯絡管理員升級目前節點。',
versionCompare: '偵測到節點 {0} 版本已是目前可升級最新版本,請檢查主節點版本後重試',
safe: '安全',
passkey: '通行金鑰',
diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts
index f06d92ee7..9ace8c9a2 100644
--- a/frontend/src/lang/modules/zh.ts
+++ b/frontend/src/lang/modules/zh.ts
@@ -2894,6 +2894,7 @@ const message = {
upgradeNow: '立即更新',
source: '下载源',
versionNotSame: '节点版本与主节点不一致,暂不支持切换,请在节点管理中升级后重试!',
+ currentNodeVersionNotSame: '当前节点版本与主节点不一致,请联系管理员升级当前节点。',
versionCompare: '检测到节点 {0} 版本已是当前可升级最新版本,请检查主节点版本后重试!',
safe: '安全',