File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
services/static-webserver/client/source/class/osparc/jobs Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ qx.Class.define("osparc.jobs.RunsTableModel", {
125125 }
126126 return promise
127127 . then ( jobs => {
128+ console . log ( "Jobs fetched" , jobs ) ;
128129 const data = [ ] ;
129130 const jobsCols = osparc . jobs . RunsTable . COLS ;
130131 jobs . forEach ( job => {
@@ -143,11 +144,14 @@ qx.Class.define("osparc.jobs.RunsTableModel", {
143144
144145 // Divides the model row request into several server requests to comply with the number of rows server limit
145146 const reqLimit = lastRow - firstRow + 1 ; // Number of requested rows
146- const nRequests = Math . ceil ( reqLimit / this . self ( ) . SERVER_MAX_LIMIT ) ;
147+ let nRequests = Math . ceil ( reqLimit / this . self ( ) . SERVER_MAX_LIMIT ) ;
147148 if ( nRequests > 1 ) {
148149 const requests = [ ] ;
149150 for ( let i = firstRow ; i <= lastRow ; i += this . self ( ) . SERVER_MAX_LIMIT ) {
150- requests . push ( getFetchPromise ( i , i > lastRow - this . self ( ) . SERVER_MAX_LIMIT + 1 ? reqLimit % this . self ( ) . SERVER_MAX_LIMIT : this . self ( ) . SERVER_MAX_LIMIT ) )
151+ // fetch the first page only
152+ if ( i < 1 ) {
153+ requests . push ( getFetchPromise ( i , i > lastRow - this . self ( ) . SERVER_MAX_LIMIT + 1 ? reqLimit % this . self ( ) . SERVER_MAX_LIMIT : this . self ( ) . SERVER_MAX_LIMIT ) )
154+ }
151155 }
152156 Promise . all ( requests )
153157 . then ( responses => this . _onRowDataLoaded ( responses . flat ( ) ) )
You can’t perform that action at this time.
0 commit comments