mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-13 06:34:42 +00:00
perf: add replay_size on session
This commit is contained in:
parent
1a1acb62de
commit
9bdfab966f
18
apps/terminal/migrations/0009_session_replay_size.py
Normal file
18
apps/terminal/migrations/0009_session_replay_size.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.1.13 on 2025-07-07 06:58
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('terminal', '0008_endpoint_mongodb_port'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='session',
|
||||
name='replay_size',
|
||||
field=models.BigIntegerField(default=0, verbose_name='Replay size'),
|
||||
),
|
||||
]
|
@ -50,6 +50,7 @@ class Session(OrgModelMixin):
|
||||
comment = models.TextField(blank=True, null=True, verbose_name=_("Comment"))
|
||||
cmd_amount = models.IntegerField(default=-1, verbose_name=_("Command amount"))
|
||||
error_reason = models.CharField(max_length=128, blank=True, verbose_name=_("Error reason"))
|
||||
replay_size = models.BigIntegerField(default=0, verbose_name=_("Replay size"))
|
||||
|
||||
upload_to = 'replay'
|
||||
ACTIVE_CACHE_KEY_PREFIX = 'SESSION_ACTIVE_{}'
|
||||
|
@ -48,7 +48,7 @@ class SessionSerializer(BulkOrgResourceModelSerializer):
|
||||
"protocol", 'type', "login_from", "remote_addr",
|
||||
"is_success", "is_finished", "has_replay", "has_command",
|
||||
"date_start", "date_end", "duration", "comment", "terminal_display", "is_locked",
|
||||
'command_amount', 'error_reason'
|
||||
'command_amount', 'error_reason', 'replay_size',
|
||||
]
|
||||
fields_fk = ["terminal", ]
|
||||
fields_custom = ["can_replay", "can_join", "can_terminate"]
|
||||
|
Loading…
Reference in New Issue
Block a user