jumpserver/apps/settings/serializers/cleaning.py

39 lines
1.4 KiB
Python
Raw Normal View History

2023-07-24 03:52:25 +00:00
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
__all__ = ['CleaningSerializer']
class CleaningSerializer(serializers.Serializer):
PREFIX_TITLE = _('Period clean')
LOGIN_LOG_KEEP_DAYS = serializers.IntegerField(
2021-09-15 08:22:51 +00:00
min_value=1, max_value=9999,
label=_("Login log keep days (day)"),
)
TASK_LOG_KEEP_DAYS = serializers.IntegerField(
2021-09-15 08:22:51 +00:00
min_value=1, max_value=9999,
label=_("Task log keep days (day)"),
)
OPERATE_LOG_KEEP_DAYS = serializers.IntegerField(
2021-09-15 08:22:51 +00:00
min_value=1, max_value=9999,
label=_("Operate log keep days (day)"),
)
FTP_LOG_KEEP_DAYS = serializers.IntegerField(
2021-09-15 08:22:51 +00:00
min_value=1, max_value=9999,
label=_("FTP log keep days (day)"),
)
CLOUD_SYNC_TASK_EXECUTION_KEEP_DAYS = serializers.IntegerField(
2021-09-15 08:22:51 +00:00
min_value=1, max_value=9999,
label=_("Cloud sync record keep days (day)"),
)
TERMINAL_SESSION_KEEP_DURATION = serializers.IntegerField(
min_value=1, max_value=99999, required=True, label=_('Session keep duration (day)'),
2023-07-24 03:52:25 +00:00
help_text=_(
'Session, record, command will be delete if more than duration, only in database, OSS will not be affected.')
)
2023-02-07 00:52:48 +00:00
ACTIVITY_LOG_KEEP_DAYS = serializers.IntegerField(
min_value=1, max_value=9999,
label=_("Activity log keep days (day)"),
2023-02-07 00:52:48 +00:00
)