Merge pull request #9341 from jumpserver/pr@dev@perf_remoteapp_view

perf: 优化远程应用界面
pull/9347/head
老广 2 years ago committed by GitHub
commit 4d92e1c0d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -87,6 +87,7 @@ class DownloadUploadMixin:
class AppletViewSet(DownloadUploadMixin, JMSBulkModelViewSet): class AppletViewSet(DownloadUploadMixin, JMSBulkModelViewSet):
queryset = Applet.objects.all() queryset = Applet.objects.all()
serializer_class = serializers.AppletSerializer serializer_class = serializers.AppletSerializer
search_fields = ['name', 'display_name', 'author']
rbac_perms = { rbac_perms = {
'upload': 'terminal.add_applet', 'upload': 'terminal.add_applet',
'download': 'terminal.view_applet', 'download': 'terminal.view_applet',

@ -29,7 +29,7 @@ class AppletSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Applet model = Applet
fields_mini = ['id', 'name', 'display_name'] fields_mini = ['id', 'name', 'display_name', 'is_active']
read_only_fields = [ read_only_fields = [
'icon', 'date_created', 'date_updated', 'icon', 'date_created', 'date_updated',
] ]

Loading…
Cancel
Save