Skip to content

Commit 95cfd6b

Browse files
committed
complete list
1 parent bb5afbe commit 95cfd6b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ qx.Class.define("osparc.jobs.JobsTableModel", {
5858
_loadRowCount() {
5959
const offset = 0;
6060
const limit = 1;
61-
osparc.store.Jobs.getInstance().fetchJobs(offset, limit, JSON.stringify(this.getOrderBy()))
62-
.then(jobs => {
63-
this._onRowCountLoaded(jobs.length)
61+
const resolveWResponse = true;
62+
osparc.store.Jobs.getInstance().fetchJobs(offset, limit, JSON.stringify(this.getOrderBy()), resolveWResponse)
63+
.then(resp => {
64+
this._onRowCountLoaded(resp["_meta"].total)
6465
})
6566
.catch(() => {
6667
this._onRowCountLoaded(null)

services/static-webserver/client/source/class/osparc/store/Jobs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ qx.Class.define("osparc.store.Jobs", {
4343
orderBy = {
4444
field: "submitted_at",
4545
direction: "desc"
46-
}
46+
},
47+
resolveWResponse = false
4748
) {
4849
const params = {
4950
url: {
@@ -63,6 +64,9 @@ qx.Class.define("osparc.store.Jobs", {
6364
jobs.push(this.addJob(jobData));
6465
});
6566
}
67+
if (resolveWResponse) {
68+
return jobsResp;
69+
}
6670
return jobs;
6771
})
6872
.catch(err => console.error(err));

0 commit comments

Comments
 (0)