Skip to content

Commit f929006

Browse files
committed
minor
1 parent 7b1a8b9 commit f929006

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

services/static-webserver/client/source/class/osparc/jobs/RunsTableModel.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ qx.Class.define("osparc.jobs.RunsTableModel", {
7979
},
8080
},
8181

82-
statics: {
83-
SERVER_MAX_LIMIT: 49,
84-
},
85-
8682
members: {
8783
__includeChildren: false,
8884

@@ -154,13 +150,14 @@ qx.Class.define("osparc.jobs.RunsTableModel", {
154150

155151
// Divides the model row request into several server requests to comply with the number of rows server limit
156152
const reqLimit = lastRow - firstRow + 1; // Number of requested rows
157-
let nRequests = Math.ceil(reqLimit / this.self().SERVER_MAX_LIMIT);
153+
const serverMaxLimit = osparc.store.Jobs.SERVER_MAX_LIMIT;
154+
let nRequests = Math.ceil(reqLimit / serverMaxLimit);
158155
if (nRequests > 1) {
159156
const requests = [];
160-
for (let i=firstRow; i <= lastRow; i += this.self().SERVER_MAX_LIMIT) {
157+
for (let i=firstRow; i <= lastRow; i += serverMaxLimit) {
161158
// fetch the first page only
162159
if (i < 1) {
163-
requests.push(getFetchPromise(i, i > lastRow - this.self().SERVER_MAX_LIMIT + 1 ? reqLimit % this.self().SERVER_MAX_LIMIT : this.self().SERVER_MAX_LIMIT))
160+
requests.push(getFetchPromise(i, i > lastRow - serverMaxLimit + 1 ? reqLimit % osparc.store.Jobs.SERVER_MAX_LIMIT : serverMaxLimit))
164161
}
165162
}
166163
Promise.all(requests)

0 commit comments

Comments
 (0)