Merge branch 'v3' of github.com:jumpserver/jumpserver into v3

pull/8931/head
Jiangjie.Bai 2 years ago
commit ba3af280d5

@ -18,8 +18,8 @@ __all__ = ['AccountViewSet', 'AccountSecretsViewSet', 'AccountTaskCreateAPI']
class AccountViewSet(OrgBulkModelViewSet):
model = Account
filterset_fields = ("username", "asset", 'address', 'name')
search_fields = ('username', 'address', 'name')
filterset_fields = ("username", "asset", 'name')
search_fields = ('username', 'asset__address', 'name')
filterset_class = AccountFilterSet
serializer_classes = {
'default': serializers.AccountSerializer,

@ -161,6 +161,7 @@ class AccountFilterSet(BaseFilterSet):
ip = filters.CharFilter(field_name='address', lookup_expr='exact')
hostname = filters.CharFilter(field_name='name', lookup_expr='exact')
username = filters.CharFilter(field_name="username", lookup_expr='exact')
address = filters.CharFilter(field_name="asset__address", lookup_expr='exact')
assets = UUIDInFilter(field_name='asset_id', lookup_expr='in')
nodes = UUIDInFilter(method='filter_nodes')

@ -6,7 +6,6 @@ from common.drf.serializers import JMSWritableNestedModelSerializer
from ..models import Platform, PlatformProtocol, PlatformAutomation
from ..const import Category, AllTypes
__all__ = ['PlatformSerializer', 'PlatformOpsMethodSerializer']
@ -27,9 +26,9 @@ class ProtocolSettingSerializer(serializers.Serializer):
# HTTP
auto_fill = serializers.BooleanField(default=False, label=_("Auto fill"))
username_selector = serializers.CharField(default='', label=_("Username selector"))
password_selector = serializers.CharField(default='', label=_("Password selector"))
submit_selector = serializers.CharField(default='', label=_("Submit selector"))
username_selector = serializers.CharField(default='', allow_blank=True, label=_("Username selector"))
password_selector = serializers.CharField(default='', allow_blank=True, label=_("Password selector"))
submit_selector = serializers.CharField(default='', allow_blank=True, label=_("Submit selector"))
class PlatformAutomationSerializer(serializers.ModelSerializer):

Loading…
Cancel
Save