mirror of https://github.com/jumpserver/jumpserver
23 lines
638 B
Python
23 lines
638 B
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from orgs.mixins.serializers import OrgResourceModelSerializerMixin
|
|
from ..models import GatheredUser
|
|
|
|
|
|
class GatheredUserSerializer(OrgResourceModelSerializerMixin):
|
|
class Meta:
|
|
model = GatheredUser
|
|
fields = [
|
|
'id', 'asset', 'hostname', 'ip', 'username',
|
|
'date_last_login', 'ip_last_login',
|
|
'present', 'date_created', 'date_updated'
|
|
]
|
|
read_only_fields = fields
|
|
extra_kwargs = {
|
|
'hostname': {'label': _("Hostname")},
|
|
'ip': {'label': 'IP'},
|
|
}
|