|
|
|
@ -17,12 +17,13 @@ class FTPLogSerializer(serializers.ModelSerializer):
|
|
|
|
|
class UserLoginLogSerializer(serializers.ModelSerializer):
|
|
|
|
|
type_display = serializers.ReadOnlyField(source='get_type_display')
|
|
|
|
|
status_display = serializers.ReadOnlyField(source='get_status_display')
|
|
|
|
|
mfa_display = serializers.ReadOnlyField(source='get_mfa_display')
|
|
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
model = models.UserLoginLog
|
|
|
|
|
fields = (
|
|
|
|
|
'username', 'type', 'type_display', 'ip', 'city', 'user_agent',
|
|
|
|
|
'mfa', 'reason', 'status', 'status_display', 'datetime'
|
|
|
|
|
'mfa', 'reason', 'status', 'status_display', 'datetime', 'mfa_display'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|