From e3a049b01bd4555f4322b04283c731e975c3c2f5 Mon Sep 17 00:00:00 2001 From: Nikita Manovich Date: Fri, 25 Jan 2019 10:37:40 +0300 Subject: [PATCH] REST API for 'get/task//frame/' Replaced by REST_API_PREFIX + 'tasks//frames/' --- cvat/apps/dashboard/templates/dashboard/task.html | 2 +- cvat/apps/engine/static/engine/js/player.js | 2 +- cvat/apps/engine/urls.py | 1 - cvat/settings/staging.py | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cvat/apps/dashboard/templates/dashboard/task.html b/cvat/apps/dashboard/templates/dashboard/task.html index 073fca8fadba..5b18c4f4f025 100644 --- a/cvat/apps/dashboard/templates/dashboard/task.html +++ b/cvat/apps/dashboard/templates/dashboard/task.html @@ -10,7 +10,7 @@
-
+
diff --git a/cvat/apps/engine/static/engine/js/player.js b/cvat/apps/engine/static/engine/js/player.js index 191a22a824d8..2305ba4d1071 100644 --- a/cvat/apps/engine/static/engine/js/player.js +++ b/cvat/apps/engine/static/engine/js/player.js @@ -114,7 +114,7 @@ class FrameProvider extends Listener { image.onload = null; image.onerror = null; }; - image.src = `get/task/${this._tid}/frame/${frame}`; + image.src = `/api/v1/tasks/${this._tid}/frames/${frame}`; }.bind(this), 25); } } diff --git a/cvat/apps/engine/urls.py b/cvat/apps/engine/urls.py index 25cb93e75c85..30b04c2ab7f0 100644 --- a/cvat/apps/engine/urls.py +++ b/cvat/apps/engine/urls.py @@ -76,7 +76,6 @@ name='plugin-request-detail'), path('create/task', views.create_task), #### - path('get/task//frame/', views.get_frame), ### path('check/task/', views.check_task), #### path('delete/task/', views.delete_task), #### path('update/task/', views.update_task), #### diff --git a/cvat/settings/staging.py b/cvat/settings/staging.py index 46ddeb8c150a..6992f5ab0368 100644 --- a/cvat/settings/staging.py +++ b/cvat/settings/staging.py @@ -30,7 +30,7 @@ SILKY_MAX_RECORDED_REQUESTS = 10**4 def SILKY_INTERCEPT_FUNC(request): # Ignore all requests which try to get a frame (too many of them) - if request.method == 'GET' and '/frame/' in request.path: + if request.method == 'GET' and '/frames/' in request.path: return False return True