* [Update] 添加loading

* [Update] stash

* [Update] 修改permission
This commit is contained in:
老广
2019-08-31 12:07:03 +08:00
committed by GitHub
parent d5dcab15a8
commit de43980ee2
14 changed files with 260 additions and 118 deletions

View File

@@ -12,11 +12,14 @@ from rest_framework import generics, serializers
from .http import HttpResponseTemporaryRedirect
from .const import KEY_CACHE_RESOURCES_ID
from .utils import get_logger
__all__ = [
'LogTailApi', 'ResourcesIDCacheApi',
]
logger = get_logger(__file__)
class OutputSerializer(serializers.Serializer):
output = serializers.CharField()
@@ -93,6 +96,7 @@ class ResourcesIDCacheApi(APIView):
@csrf_exempt
def redirect_plural_name_api(request, *args, **kwargs):
resource = kwargs.get("resource", "")
full_path = request.get_full_path()
full_path = full_path.replace(resource, resource+"s", 1)
org_full_path = request.get_full_path()
full_path = org_full_path.replace(resource, resource+"s", 1)
logger.debug("Redirect {} => {}".format(org_full_path, full_path))
return HttpResponseTemporaryRedirect(full_path)