Browse Source

perf: 会话列表显示终端名称;修复启动 warning 问题

pull/8451/head^2
Jiangjie.Bai 2 years ago committed by 老广
parent
commit
90228e69e0
  1. 7
      apps/terminal/models/session.py

7
apps/terminal/models/session.py

@ -15,7 +15,7 @@ from applications.models import Application
from users.models import User
from orgs.mixins.models import OrgModelMixin
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
@ -161,6 +161,11 @@ class Session(OrgModelMixin):
else:
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):
suffix = self.SUFFIX_MAP.get(version, '.cast.gz')
local_path = self.get_local_storage_path_by_suffix(suffix)

Loading…
Cancel
Save