From 62d2e01cdf1050cf258272a8b33e4171598d4556 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 14 Feb 2020 10:40:18 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=99=BB=E5=BD=95=E6=A0=87=E9=A2=98=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/terminal/models.py b/apps/terminal/models.py index 04bc74c67..311e4d07b 100644 --- a/apps/terminal/models.py +++ b/apps/terminal/models.py @@ -90,6 +90,14 @@ class Terminal(models.Model): config = self.get_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 def config(self): configs = {} @@ -99,6 +107,7 @@ class Terminal(models.Model): configs[k] = getattr(settings, k) configs.update(self.get_command_storage_setting()) configs.update(self.get_replay_storage_setting()) + configs.update(self.get_login_title_setting()) configs.update({ 'SECURITY_MAX_IDLE_TIME': settings.SECURITY_MAX_IDLE_TIME })