Skip to content

Commit

Permalink
Fixed dashboard pagination (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored and nmanovic committed Apr 15, 2019
1 parent b8006be commit b6cdd82
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion cvat/apps/dashboard/static/dashboard/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,26 @@ class DashboardView {
const dashboardPagination = $('#dashboardPagination');

const baseURL = this._baseURL;
let overlay = null;
dashboardPagination.pagination({
dataSource: this._dashboardList,
dataSource: '/api/v1/tasks',
locator: 'results',
alias: {
pageNumber: 'page',
},
totalNumberLocator: function(response) {
return response.count;
},
ajax: {
beforeSend() {
overlay = showOverlay('Loading..');
},
},
callback: function(pageList) {
if (overlay) {
overlay.remove();
overlay = null;
}
dashboardList.empty();
for (let details of pageList) {
const detailsCopy = JSON.parse(JSON.stringify(details));
Expand Down

0 comments on commit b6cdd82

Please sign in to comment.