Skip to content

Commit

Permalink
REST API for 'get/task/<int:pk>/frame/<int:frame>'
Browse files Browse the repository at this point in the history
Replaced by REST_API_PREFIX + 'tasks/<int:pk>/frames/<int:frame>'
  • Loading branch information
Nikita Manovich committed Jan 25, 2019
1 parent b1d0867 commit e3a049b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cvat/apps/dashboard/templates/dashboard/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<center class="dashboardTitleWrapper">
<label class="regular dashboardStatusLabel"> {{ item.status }} </label>
</center>
<div class="dashboardTaskIntro" style='background-image: url("/get/task/{{item.id}}/frame/0")'> </div>
<div class="dashboardTaskIntro" style='background-image: url("/api/v1/tasks/{{item.id}}/frames/0")'> </div>
<div class="dashboardButtonsUI">
<button class="dashboardDumpAnnotation regular dashboardButtonUI"> Dump Annotation </button>
<button class="dashboardUploadAnnotation regular dashboardButtonUI"> Upload Annotation </button>
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/static/engine/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
1 change: 0 additions & 1 deletion cvat/apps/engine/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
name='plugin-request-detail'),

path('create/task', views.create_task), ####
path('get/task/<int:pk>/frame/<int:frame>', views.get_frame), ###
path('check/task/<int:tid>', views.check_task), ####
path('delete/task/<int:tid>', views.delete_task), ####
path('update/task/<int:tid>', views.update_task), ####
Expand Down
2 changes: 1 addition & 1 deletion cvat/settings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e3a049b

Please sign in to comment.