mirror of https://github.com/jumpserver/jumpserver
perf: add license info for component config
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…
Reference in New Issue