perf: 优化优先使用系统设置中的 rdp_resolution 配置

pull/9038/head
Jiangjie.Bai 2 years ago
parent 3bba8e4043
commit 6812cbe314

@ -420,6 +420,9 @@ class Config(dict):
'TERMINAL_HOST_KEY': '',
'TERMINAL_TELNET_REGEX': '',
'TERMINAL_COMMAND_STORAGE': {},
# Luna 页面
# 默认图形化分辨率
'TERMINAL_GRAPHICAL_RESOLUTION': 'Auto',
# 未来废弃(目前迁移会用)
'TERMINAL_RDP_ADDR': '',
# 保留(Luna还在用)

@ -81,6 +81,9 @@ TERMINAL_HOST_KEY = CONFIG.TERMINAL_HOST_KEY
TERMINAL_HEADER_TITLE = CONFIG.TERMINAL_HEADER_TITLE
TERMINAL_TELNET_REGEX = CONFIG.TERMINAL_TELNET_REGEX
# 默认图形化分辨率
TERMINAL_GRAPHICAL_RESOLUTION = CONFIG.TERMINAL_GRAPHICAL_RESOLUTION
# Asset user auth external backend, default AuthBook backend
BACKEND_ASSET_USER_AUTH_VAULT = False

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-04 15:47+0800\n"
"POT-Creation-Date: 2022-11-07 18:16+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -4511,6 +4511,15 @@ msgstr "Razor の有効化"
msgid "Enable SSH Client"
msgstr "SSH Clientの有効化"
#: settings/serializers/terminal.py:51
msgid "Default graphics resolution"
msgstr "デフォルトのグラフィック解像度"
#: settings/serializers/terminal.py:52
msgid ""
"Tip: Default resolution to use when connecting graphical assets in Luna pages"
msgstr "ヒント: Luna ページでグラフィック アセットを接続するときに使用するデフォルトの解像度"
#: settings/utils/ldap.py:467
msgid "ldap:// or ldaps:// protocol is used."
msgstr "ldap:// または ldaps:// プロトコルが使用されます。"

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-04 15:47+0800\n"
"POT-Creation-Date: 2022-11-07 18:16+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -4441,6 +4441,15 @@ msgstr "启用 Razor 服务"
msgid "Enable SSH Client"
msgstr "启用 SSH Client"
#: settings/serializers/terminal.py:51
msgid "Default graphics resolution"
msgstr "默认图形化分辨率"
#: settings/serializers/terminal.py:52
msgid ""
"Tip: Default resolution to use when connecting graphical assets in Luna pages"
msgstr "提示在Luna 页面中连接图形化资产时默认使用的分辨率"
#: settings/utils/ldap.py:467
msgid "ldap:// or ldaps:// protocol is used."
msgstr "使用 ldap:// 或 ldaps:// 协议"

@ -40,6 +40,8 @@ class PrivateSettingSerializer(PublicSettingSerializer):
TERMINAL_KOKO_SSH_ENABLED = serializers.BooleanField()
TERMINAL_OMNIDB_ENABLED = serializers.BooleanField()
TERMINAL_GRAPHICAL_RESOLUTION = serializers.CharField()
ANNOUNCEMENT_ENABLED = serializers.BooleanField()
ANNOUNCEMENT = serializers.DictField()

@ -38,3 +38,16 @@ class TerminalSettingSerializer(serializers.Serializer):
TERMINAL_MAGNUS_ENABLED = serializers.BooleanField(label=_("Enable database proxy"))
TERMINAL_RAZOR_ENABLED = serializers.BooleanField(label=_("Enable Razor"))
TERMINAL_KOKO_SSH_ENABLED = serializers.BooleanField(label=_("Enable SSH Client"))
RESOLUTION_CHOICES = (
('Auto', 'Auto'),
('1024x768', '1024x768'),
('1366x768', '1366x768'),
('1600x900', '1600x900'),
('1920x1080', '1920x1080')
)
TERMINAL_GRAPHICAL_RESOLUTION = serializers.ChoiceField(
default='Auto', choices=RESOLUTION_CHOICES, required=False,
label=_('Default graphics resolution'),
help_text=_('Tip: Default resolution to use when connecting graphical assets in Luna pages')
)

Loading…
Cancel
Save