Skip to content

Commit 21dbf5e

Browse files
committed
comments
1 parent 1581a84 commit 21dbf5e

File tree

1 file changed

+5
-1
lines changed
  • services/static-webserver/client/source/class/osparc/jobs

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ qx.Class.define("osparc.jobs.JobsButton", {
9797
const filters = undefined; // use default filters
9898
const resolveWResponse = true;
9999
jobsStore.fetchJobsLatest(runningOnly, offset, limit, orderBy, filters, resolveWResponse)
100-
.then(resp => this.__updateJobsButton(Boolean(resp["_meta"]["total"])));
100+
.then(resp => {
101+
// here we have the real number of jobs running
102+
this.__updateJobsButton(Boolean(resp["_meta"]["total"]));
103+
});
101104
},
102105

103106
__attachSocketListener: function() {
@@ -106,6 +109,7 @@ qx.Class.define("osparc.jobs.JobsButton", {
106109
socket.on("projectStateUpdated", content => {
107110
// for now, we can only access the activity of my user, not the whole project...
108111
if (osparc.study.Utils.amIRunningTheStudy(content)) {
112+
// we know that I am running at least one study
109113
this.__updateJobsButton(true);
110114
}
111115
// ...in the next iteration: listen to main store's "studyStateChanged", which will cover all users

0 commit comments

Comments
 (0)