From 97b240cfdd9f5ce694da2255280ab7972ab90ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Wed, 18 Jul 2018 14:55:16 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=8E=88=E6=9D=83=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/perms/api.py | 4 ---- apps/perms/templates/perms/asset_permission_list.html | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/perms/api.py b/apps/perms/api.py index 090f1988a..40366a19b 100644 --- a/apps/perms/api.py +++ b/apps/perms/api.py @@ -5,7 +5,6 @@ from django.shortcuts import get_object_or_404 from rest_framework.views import APIView, Response from rest_framework.generics import ListAPIView, get_object_or_404, RetrieveUpdateAPIView from rest_framework import viewsets -from rest_framework.pagination import LimitOffsetPagination from common.utils import set_or_append_attr_bulk, get_object_or_none from users.permissions import IsValidUser, IsSuperUser, IsSuperUserOrAppUser @@ -20,12 +19,9 @@ class AssetPermissionViewSet(viewsets.ModelViewSet): """ 资产授权列表的增删改查api """ - filter_fields = ("name",) - search_fields = filter_fields queryset = AssetPermission.objects.all() serializer_class = serializers.AssetPermissionCreateUpdateSerializer permission_classes = (IsSuperUser,) - pagination_class = LimitOffsetPagination def get_serializer_class(self): if self.action in ("list", 'retrieve'): diff --git a/apps/perms/templates/perms/asset_permission_list.html b/apps/perms/templates/perms/asset_permission_list.html index 2f0f74312..c18f12224 100644 --- a/apps/perms/templates/perms/asset_permission_list.html +++ b/apps/perms/templates/perms/asset_permission_list.html @@ -208,7 +208,7 @@ function initTable() { select: {}, op_html: $('#actions').html() }; - table = jumpserver.initServerSideDataTable(options); + table = jumpserver.initDataTable(options); return table }