Merge pull request #1549 from jumpserver/revert-1515-master

Revert "授权页面分页问题"
pull/1563/merge
老广 2018-07-18 01:56:18 -05:00 committed by GitHub
commit 061963a316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -5,7 +5,6 @@ from django.shortcuts import get_object_or_404
from rest_framework.views import APIView, Response from rest_framework.views import APIView, Response
from rest_framework.generics import ListAPIView, get_object_or_404, RetrieveUpdateAPIView from rest_framework.generics import ListAPIView, get_object_or_404, RetrieveUpdateAPIView
from rest_framework import viewsets 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 common.utils import set_or_append_attr_bulk, get_object_or_none
from users.permissions import IsValidUser, IsSuperUser, IsSuperUserOrAppUser from users.permissions import IsValidUser, IsSuperUser, IsSuperUserOrAppUser
@ -20,12 +19,9 @@ class AssetPermissionViewSet(viewsets.ModelViewSet):
""" """
资产授权列表的增删改查api 资产授权列表的增删改查api
""" """
filter_fields = ("name",)
search_fields = filter_fields
queryset = AssetPermission.objects.all() queryset = AssetPermission.objects.all()
serializer_class = serializers.AssetPermissionCreateUpdateSerializer serializer_class = serializers.AssetPermissionCreateUpdateSerializer
permission_classes = (IsSuperUser,) permission_classes = (IsSuperUser,)
pagination_class = LimitOffsetPagination
def get_serializer_class(self): def get_serializer_class(self):
if self.action in ("list", 'retrieve'): if self.action in ("list", 'retrieve'):

View File

@ -208,7 +208,7 @@ function initTable() {
select: {}, select: {},
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
table = jumpserver.initServerSideDataTable(options); table = jumpserver.initDataTable(options);
return table return table
} }