diff --git a/apps/jumpserver/settings/_xpack.py b/apps/jumpserver/settings/_xpack.py index 497e2c45d..364a0e377 100644 --- a/apps/jumpserver/settings/_xpack.py +++ b/apps/jumpserver/settings/_xpack.py @@ -22,6 +22,8 @@ XPACK_LICENSE_INFO = { 'corporation': corporation, } +XPACK_LICENSE_CONTENT = '' + if XPACK_ENABLED: from xpack.utils import get_xpack_templates_dir, get_xpack_context_processor diff --git a/apps/terminal/models/component/terminal.py b/apps/terminal/models/component/terminal.py index b361102c4..96b0828e4 100644 --- a/apps/terminal/models/component/terminal.py +++ b/apps/terminal/models/component/terminal.py @@ -127,6 +127,13 @@ class Terminal(StorageMixin, TerminalStatusMixin, JMSBaseModel): 'GPT_MODEL': settings.GPT_MODEL, } + @staticmethod + def get_xpack_license(): + return { + 'XPACK_LICENSE_IS_VALID': settings.XPACK_LICENSE_IS_VALID, + 'XPACK_LICENSE_CONTENT': settings.XPACK_LICENSE_CONTENT + } + @property def config(self): configs = {} @@ -138,6 +145,7 @@ class Terminal(StorageMixin, TerminalStatusMixin, JMSBaseModel): configs.update(self.get_replay_storage_setting()) configs.update(self.get_login_title_setting()) configs.update(self.get_chat_ai_setting()) + configs.update(self.get_xpack_license()) configs.update({ 'SECURITY_MAX_IDLE_TIME': settings.SECURITY_MAX_IDLE_TIME, 'SECURITY_SESSION_SHARE': settings.SECURITY_SESSION_SHARE,