mirror of https://github.com/jumpserver/jumpserver
feat: gather user添加搜索字段
parent
80d94074e7
commit
19e34270d1
|
@ -18,5 +18,5 @@ class GatheredUserViewSet(OrgModelViewSet):
|
|||
permission_classes = [IsOrgAdmin]
|
||||
extra_filter_backends = [AssetRelatedByNodeFilterBackend]
|
||||
|
||||
filter_fields = ['asset', 'username', 'present']
|
||||
filter_fields = ['asset', 'username', 'present', 'asset__ip', 'asset__hostname']
|
||||
search_fields = ['username', 'asset__ip', 'asset__hostname']
|
||||
|
|
|
@ -144,14 +144,8 @@ class AssetDisplaySerializer(AssetSerializer):
|
|||
connectivity = ConnectivitySerializer(read_only=True, label=_("Connectivity"))
|
||||
|
||||
class Meta(AssetSerializer.Meta):
|
||||
fields = [
|
||||
'id', 'ip', 'hostname', 'protocol', 'port',
|
||||
'protocols', 'is_active', 'public_ip',
|
||||
'number', 'vendor', 'model', 'sn',
|
||||
'cpu_model', 'cpu_count', 'cpu_cores', 'cpu_vcpus', 'memory',
|
||||
'disk_total', 'disk_info', 'os', 'os_version', 'os_arch',
|
||||
'hostname_raw', 'comment', 'created_by', 'date_created',
|
||||
'hardware_info', 'connectivity',
|
||||
fields = AssetSerializer.Meta.fields + [
|
||||
'connectivity',
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue