mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-11 13:53:28 +00:00
[Update] 修改终端获取登录标题配置的逻辑
This commit is contained in:
parent
edf6baa52d
commit
62d2e01cdf
@ -90,6 +90,14 @@ class Terminal(models.Model):
|
|||||||
config = self.get_replay_storage_config()
|
config = self.get_replay_storage_config()
|
||||||
return {"TERMINAL_REPLAY_STORAGE": config}
|
return {"TERMINAL_REPLAY_STORAGE": config}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_login_title_setting():
|
||||||
|
login_title = None
|
||||||
|
if settings.XPACK_ENABLED:
|
||||||
|
from xpack.plugins.interface.models import Interface
|
||||||
|
login_title = Interface.get_login_title()
|
||||||
|
return {'TERMINAL_HEADER_TITLE': login_title}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def config(self):
|
def config(self):
|
||||||
configs = {}
|
configs = {}
|
||||||
@ -99,6 +107,7 @@ class Terminal(models.Model):
|
|||||||
configs[k] = getattr(settings, k)
|
configs[k] = getattr(settings, k)
|
||||||
configs.update(self.get_command_storage_setting())
|
configs.update(self.get_command_storage_setting())
|
||||||
configs.update(self.get_replay_storage_setting())
|
configs.update(self.get_replay_storage_setting())
|
||||||
|
configs.update(self.get_login_title_setting())
|
||||||
configs.update({
|
configs.update({
|
||||||
'SECURITY_MAX_IDLE_TIME': settings.SECURITY_MAX_IDLE_TIME
|
'SECURITY_MAX_IDLE_TIME': settings.SECURITY_MAX_IDLE_TIME
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user