mirror of https://github.com/jumpserver/jumpserver
perf: 会话列表显示终端名称;修复启动 warning 问题
parent
62a2a74c27
commit
90228e69e0
|
@ -15,7 +15,7 @@ from applications.models import Application
|
||||||
from users.models import User
|
from users.models import User
|
||||||
from orgs.mixins.models import OrgModelMixin
|
from orgs.mixins.models import OrgModelMixin
|
||||||
from django.db.models import TextChoices
|
from django.db.models import TextChoices
|
||||||
from common.utils import get_object_or_none
|
from common.utils import get_object_or_none, lazyproperty
|
||||||
from ..backends import get_multi_command_storage
|
from ..backends import get_multi_command_storage
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,6 +161,11 @@ class Session(OrgModelMixin):
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@lazyproperty
|
||||||
|
def terminal_display(self):
|
||||||
|
display = self.terminal.name if self.terminal else ''
|
||||||
|
return display
|
||||||
|
|
||||||
def save_replay_to_storage_with_version(self, f, version=2):
|
def save_replay_to_storage_with_version(self, f, version=2):
|
||||||
suffix = self.SUFFIX_MAP.get(version, '.cast.gz')
|
suffix = self.SUFFIX_MAP.get(version, '.cast.gz')
|
||||||
local_path = self.get_local_storage_path_by_suffix(suffix)
|
local_path = self.get_local_storage_path_by_suffix(suffix)
|
||||||
|
|
Loading…
Reference in New Issue