From ea6cd853deb20261be4a3c7321326926d096a74b Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Tue, 16 Jul 2024 10:30:17 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A4=BE=E5=8C=BA=E7=89=88=E7=A7=BB?= =?UTF-8?q?=E9=99=A4magnus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/i18n/luna/en.json | 3 +++ apps/i18n/luna/zh.json | 3 +++ apps/terminal/connect_methods.py | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/i18n/luna/en.json b/apps/i18n/luna/en.json index 1d09fc62d..a162c9fc3 100644 --- a/apps/i18n/luna/en.json +++ b/apps/i18n/luna/en.json @@ -209,6 +209,9 @@ "asset": "asset", "cols": "cols", "confirm": "confirm", + "connectDisabledTipsNoAccount": "Tips: No valid authorization account found, current resource cannot be connected. Please contact the administrator for assistance", + "connectDisabledTipsNoConnectMethod": "Tips: No valid connection method found, current resource cannot be connected. Please contact the administrator for assistance", + "connectDisabledTipsMethodDisabled": "Tips: No valid remote application deployment machine found, current resource cannot be connected. Please contact the administrator for assistance", "connect info": "connect info", "download": "download", "rows": "rows", diff --git a/apps/i18n/luna/zh.json b/apps/i18n/luna/zh.json index 180d66016..6676a99ca 100644 --- a/apps/i18n/luna/zh.json +++ b/apps/i18n/luna/zh.json @@ -207,6 +207,9 @@ "asset": "资产", "cols": "列数", "confirm": "确认", + "connectDisabledTipsNoAccount": "提示:未找到有效的授权账号,当前资源无法连接,请联系管理员进行处理", + "connectDisabledTipsNoConnectMethod": "提示:未找到有效的连接方式,当前资源无法连接,请联系管理员进行处理", + "connectDisabledTipsMethodDisabled": "提示:未找到有效的远程应用发布机,当前资源无法连接,请联系管理员进行处理", "connect info": "连接信息", "download": "下载", "rows": "行数", diff --git a/apps/terminal/connect_methods.py b/apps/terminal/connect_methods.py index f486b5a20..2f6997635 100644 --- a/apps/terminal/connect_methods.py +++ b/apps/terminal/connect_methods.py @@ -242,7 +242,8 @@ class ConnectMethodUtil: 'razor': 'TERMINAL_RAZOR_ENABLED', 'magnus': 'TERMINAL_MAGNUS_ENABLED', } - disabled_component = [comp for comp, attr in component_setting.items() if not getattr(settings, attr)] + disabled_component = [comp for comp, attr in component_setting.items() if + not (getattr(settings, attr) and settings.XPACK_LICENSE_IS_VALID)] if not disabled_component: return methods