merge: with dev

pull/4069/head
ibuler 5 years ago
commit 50bea55732

@ -24,7 +24,7 @@ class FTPLogViewSet(ListModelMixin, OrgGenericViewSet):
date_range_filter_fields = [ date_range_filter_fields = [
('date_start', ('date_from', 'date_to')) ('date_start', ('date_from', 'date_to'))
] ]
filterset_fields = ['user', 'asset', 'system_user'] filter_fields = ['user', 'asset', 'system_user']
search_fields = ['filename'] search_fields = ['filename']
@ -63,7 +63,7 @@ class OperateLogViewSet(ListModelMixin, OrgGenericViewSet):
] ]
filter_fields = ['user', 'action', 'resource_type', 'resource'] filter_fields = ['user', 'action', 'resource_type', 'resource']
search_fields = ['resource'] search_fields = ['resource']
ordering_fields = ['-datetime'] ordering = ['-datetime']
class PasswordChangeLogViewSet(ListModelMixin, CommonGenericViewSet): class PasswordChangeLogViewSet(ListModelMixin, CommonGenericViewSet):
@ -75,7 +75,7 @@ class PasswordChangeLogViewSet(ListModelMixin, CommonGenericViewSet):
('datetime', ('date_from', 'date_to')) ('datetime', ('date_from', 'date_to'))
] ]
filterset_fields = ['user'] filterset_fields = ['user']
ordering_fields = ['-datetime'] ordering = ['-datetime']
def get_queryset(self): def get_queryset(self):
users = current_org.get_org_members() users = current_org.get_org_members()
@ -94,4 +94,4 @@ class CommandExecutionViewSet(ListModelMixin, OrgGenericViewSet):
('date_start', ('date_from', 'date_to')) ('date_start', ('date_from', 'date_to'))
] ]
search_fields = ['command'] search_fields = ['command']
ordering_fields = ['-date_created'] ordering = ['-date_created']

Loading…
Cancel
Save