perf: add license info for component config

pull/14439/head
Eric 2 weeks ago committed by 老广
parent 7c80c52d02
commit 5142f0340c

@ -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

@ -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,

Loading…
Cancel
Save