mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-27 23:56:09 +00:00
[Update] 添加用户授权资产列表页的分页,搜索,排序 (#1963)
* [Update] 分页获取用户授权资产 * [Update] 修改前端-用户授权资产分页 * [Update] 用户授权资产支持搜索 * [Update] 用户授权资产支持排序 * [Update] 用户授权的节点with资产Api,对资产进行排序 * [Update] 获取用户授权的节点下的资产的api,进行分页、排序、查询 * [Update] 抽象用户授权资产列表的查询,排序 * [Update] 优化小细节 * [Update] 删除无用导入 * [Update] 修改AssetFilterMixins目录从common到perms * [Update] 资产授权规则列表: 添加分页、搜索 * [Update] 添加管理用户,系统用户列表分页、搜索 * [Update] 用户组列表添加分页,搜索 * [Update] 资产标签列表添加分页、搜索 * [Update] 网域网关列表添加分页、搜索 * [Update] 命令过滤列表添加分页、搜索,修改翻译小细节 * [Update] 删除前端注释initDataTable * [Update] 修改文案,资产组-节点 * [Update] 普通用户资产列表添加分页、搜索
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from rest_framework_bulk import BulkModelViewSet
|
||||
from rest_framework.pagination import LimitOffsetPagination
|
||||
from django.db.models import Count
|
||||
|
||||
from common.utils import get_logger
|
||||
@@ -27,8 +28,11 @@ __all__ = ['LabelViewSet']
|
||||
|
||||
|
||||
class LabelViewSet(BulkModelViewSet):
|
||||
filter_fields = ("name", "value")
|
||||
search_fields = filter_fields
|
||||
permission_classes = (IsOrgAdmin,)
|
||||
serializer_class = serializers.LabelSerializer
|
||||
pagination_class = LimitOffsetPagination
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
if request.query_params.get("distinct"):
|
||||
|
Reference in New Issue
Block a user