File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
services/static-webserver/client/source/class/osparc/jobs Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff 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 ( ) ) )
You can’t perform that action at this time.
0 commit comments