mirror of https://github.com/jumpserver/jumpserver
fix(audits): 日志审计模块 `Serializer` 添加 `org_id` 字段
parent
9541a99273
commit
e24abdffba
|
@ -17,7 +17,7 @@ class FTPLogSerializer(serializers.ModelSerializer):
|
||||||
model = models.FTPLog
|
model = models.FTPLog
|
||||||
fields = (
|
fields = (
|
||||||
'id', 'user', 'remote_addr', 'asset', 'system_user',
|
'id', 'user', 'remote_addr', 'asset', 'system_user',
|
||||||
'operate', 'filename', 'is_success', 'date_start'
|
'operate', 'filename', 'is_success', 'date_start', 'org_id'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class OperateLogSerializer(serializers.ModelSerializer):
|
||||||
model = models.OperateLog
|
model = models.OperateLog
|
||||||
fields = (
|
fields = (
|
||||||
'id', 'user', 'action', 'resource_type', 'resource',
|
'id', 'user', 'action', 'resource_type', 'resource',
|
||||||
'remote_addr', 'datetime'
|
'remote_addr', 'datetime', 'org_id'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class CommandExecutionSerializer(serializers.ModelSerializer):
|
||||||
fields_mini = ['id']
|
fields_mini = ['id']
|
||||||
fields_small = fields_mini + [
|
fields_small = fields_mini + [
|
||||||
'run_as', 'command', 'user', 'is_finished',
|
'run_as', 'command', 'user', 'is_finished',
|
||||||
'date_start', 'result', 'is_success'
|
'date_start', 'result', 'is_success', 'org_id'
|
||||||
]
|
]
|
||||||
fields = fields_small + ['hosts', 'run_as_display', 'user_display']
|
fields = fields_small + ['hosts', 'run_as_display', 'user_display']
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
|
|
Loading…
Reference in New Issue