perf: 优化 audit log

pull/9528/head
ibuler 2 years ago
parent b3244d0215
commit 8b0a967306

@ -1,8 +1,8 @@
from assets.models import Host, Asset
from assets.serializers import HostSerializer, HostInfoSerializer
from rest_framework.decorators import action
from rest_framework.response import Response
from assets.models import Host, Asset
from assets.serializers import HostSerializer, HostInfoSerializer
from .asset import AssetViewSet
__all__ = ['HostViewSet']
@ -22,4 +22,3 @@ class HostViewSet(AssetViewSet):
def info(self, *args, **kwargs):
asset = super().get_object()
return Response(asset.info)

@ -39,8 +39,7 @@ class ProtocolSettingSerializer(serializers.Serializer):
script = serializers.JSONField(default=list, label=_("Script"))
# Redis
auth_username = serializers.BooleanField(default=False, label=_("Auth with username"),
help_text=_("Auth with username"))
auth_username = serializers.BooleanField(default=False, label=_("Auth with username"))
class PlatformAutomationSerializer(serializers.ModelSerializer):

Loading…
Cancel
Save