mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
597 B
21 lines
597 B
# -*- coding: utf-8 -*-
|
|
#
|
|
|
|
from orgs.mixins.api import OrgModelViewSet
|
|
from assets.models import GatheredUser
|
|
|
|
from ..serializers import GatheredUserSerializer
|
|
from ..filters import AssetRelatedByNodeFilterBackend
|
|
|
|
|
|
__all__ = ['GatheredUserViewSet']
|
|
|
|
|
|
class GatheredUserViewSet(OrgModelViewSet):
|
|
model = GatheredUser
|
|
serializer_class = GatheredUserSerializer
|
|
extra_filter_backends = [AssetRelatedByNodeFilterBackend]
|
|
|
|
filterset_fields = ['asset', 'username', 'present', 'asset__address', 'asset__name', 'asset_id']
|
|
search_fields = ['username', 'asset__address', 'asset__name']
|