Skip to content

Commit 77a1b4f

Browse files
committed
minor
1 parent 0b8aaaa commit 77a1b4f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ qx.Class.define("osparc.jobs.SubRunsTableModel", {
5757
},
5858
},
5959

60-
statics: {
61-
SERVER_MAX_LIMIT: 49,
62-
},
63-
6460
members: {
6561
// overridden
6662
sortByColumn(columnIndex, ascending) {
@@ -132,12 +128,13 @@ qx.Class.define("osparc.jobs.SubRunsTableModel", {
132128
};
133129

134130
// Divides the model row request into several server requests to comply with the number of rows server limit
131+
const serverMaxLimit = osparc.store.Jobs.SERVER_MAX_LIMIT;
135132
const reqLimit = lastRow - firstRow + 1; // Number of requested rows
136-
const nRequests = Math.ceil(reqLimit / this.self().SERVER_MAX_LIMIT);
133+
const nRequests = Math.ceil(reqLimit / serverMaxLimit);
137134
if (nRequests > 1) {
138135
const requests = [];
139-
for (let i=firstRow; i <= lastRow; i += this.self().SERVER_MAX_LIMIT) {
140-
requests.push(getFetchPromise(i, i > lastRow - this.self().SERVER_MAX_LIMIT + 1 ? reqLimit % this.self().SERVER_MAX_LIMIT : this.self().SERVER_MAX_LIMIT))
136+
for (let i=firstRow; i <= lastRow; i += serverMaxLimit) {
137+
requests.push(getFetchPromise(i, i > lastRow - serverMaxLimit + 1 ? reqLimit % serverMaxLimit : serverMaxLimit))
141138
}
142139
Promise.all(requests)
143140
.then(responses => this._onRowDataLoaded(responses.flat()))

0 commit comments

Comments
 (0)