Skip to content

Commit 9408dfe

Browse files
committed
PUBLISHED
1 parent 0c9d72c commit 9408dfe

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,12 +790,13 @@ qx.Class.define("osparc.dashboard.CardBase", {
790790
}
791791
},
792792

793-
// pipelineState: ["NOT_STARTED", "STARTED", "SUCCESS", "ABORTED", "FAILED", "UNKNOWN"]
793+
// pipelineState: ["NOT_STARTED", "PUBLISHED", "STARTED", "SUCCESS", "ABORTED", "FAILED", "UNKNOWN"]
794794
__applyPipelineState: function(pipelineState) {
795795
let iconSource;
796796
let toolTipText;
797797
let borderColor;
798798
switch (pipelineState) {
799+
case "PUBLISHED":
799800
case "STARTED":
800801
iconSource = "@FontAwesome5Solid/spinner/10";
801802
toolTipText = this.tr("Running");

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ qx.Class.define("osparc.jobs.JobsButton", {
3232
toolTipText: this.tr("Activity Center"),
3333
});
3434

35-
this.addListener("tap", () => osparc.jobs.ActivityCenterWindow.openWindow(), this);
35+
this.addListener("tap", () => {
36+
osparc.jobs.ActivityCenterWindow.openWindow();
37+
this.__fetchNJobs();
38+
}, this);
3639

37-
this.fetchNJobs();
40+
this.__fetchNJobs();
41+
42+
this.__attachListener();
3843
},
3944

4045
members: {
@@ -76,12 +81,22 @@ qx.Class.define("osparc.jobs.JobsButton", {
7681
return control || this.base(arguments, id);
7782
},
7883

79-
fetchNJobs: function() {
84+
__fetchNJobs: function() {
8085
const jobsStore = osparc.store.Jobs.getInstance();
8186
jobsStore.fetchJobsLatest()
8287
.then(jobs => this.__updateJobsButton(jobs.length))
8388
},
8489

90+
__attachListener: function() {
91+
const socket = osparc.wrapper.WebSocket.getInstance();
92+
socket.on("projectStateUpdated", data => {
93+
console.log("projectStateUpdated", data);
94+
const state = data["state"]; // "STARTED"
95+
// for now this is needed
96+
const state = data["locked"];
97+
}, this);
98+
},
99+
85100
__updateJobsButton: function(isActive) {
86101
isActive = true;
87102
this.getChildControl("icon");

0 commit comments

Comments
 (0)