mirror of https://github.com/jumpserver/jumpserver
[Update] Login log 添加display field
parent
5812c50a33
commit
8c0bf0b71b
|
@ -15,11 +15,14 @@ class FTPLogSerializer(serializers.ModelSerializer):
|
|||
|
||||
|
||||
class UserLoginLogSerializer(serializers.ModelSerializer):
|
||||
type_display = serializers.ReadOnlyField(source='get_type_display')
|
||||
status_display = serializers.ReadOnlyField(source='get_status_display')
|
||||
|
||||
class Meta:
|
||||
model = models.UserLoginLog
|
||||
fields = (
|
||||
'username', 'type', 'ip', 'city', 'user_agent',
|
||||
'mfa', 'reason', 'status', 'datetime'
|
||||
'username', 'type', 'type_display', 'ip', 'city', 'user_agent',
|
||||
'mfa', 'reason', 'status', 'status_display', 'datetime'
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue