[Fixture] 添加command log backends, 未来支持es

This commit is contained in:
ibuler
2017-02-06 23:13:27 +08:00
parent 0869931e67
commit a79c3dd156
39 changed files with 646 additions and 311 deletions

View File

@@ -13,10 +13,7 @@ class ProxyLogSerializer(serializers.ModelSerializer):
class Meta:
model = models.ProxyLog
fields = ['id', 'name', 'username', 'hostname', 'ip', 'system_user',
'login_type', 'terminal', 'log_file', 'was_failed',
'is_finished', 'date_start', 'date_finished', 'time',
'command_length', "commands_dict"]
fields = '__all__'
@staticmethod
def get_time(obj):
@@ -27,10 +24,5 @@ class ProxyLogSerializer(serializers.ModelSerializer):
@staticmethod
def get_command_length(obj):
return len(obj.commands.all())
return 2
class CommandLogSerializer(serializers.ModelSerializer):
class Meta:
model = models.CommandLog
fields = '__all__'