Browse Source

fix(audits): 日志审计模块 `Serializer` 添加 `org_id` 字段

pull/4317/head
xinwen 4 years ago committed by 老广
parent
commit
a5df7738f6
  1. 6
      apps/audits/serializers.py

6
apps/audits/serializers.py

@ -17,7 +17,7 @@ class FTPLogSerializer(serializers.ModelSerializer):
class Meta:
model = models.FTPLog
fields = (
'id', 'user', 'remote_addr', 'asset', 'system_user',
'id', 'user', 'remote_addr', 'asset', 'system_user', 'org_id',
'operate', 'filename', 'is_success', 'date_start', 'operate_display'
)
@ -40,7 +40,7 @@ class OperateLogSerializer(serializers.ModelSerializer):
model = models.OperateLog
fields = (
'id', 'user', 'action', 'resource_type', 'resource',
'remote_addr', 'datetime'
'remote_addr', 'datetime', 'org_id'
)
@ -66,7 +66,7 @@ class CommandExecutionSerializer(serializers.ModelSerializer):
fields_mini = ['id']
fields_small = fields_mini + [
'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']
extra_kwargs = {

Loading…
Cancel
Save