Skip to content

Commit

Permalink
Merge branch 'master' into feature/make-service-public
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Mar 20, 2023
2 parents 6100456 + bfff087 commit d2d6a36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", {

nodeUI.addListener("dbltap", e => {
this.fireDataEvent("nodeSelected", nodeUI.getNodeId());
if (nodeUI.getNode().canNodeStart()) {
nodeUI.getNode().requestStartNode();
}
e.stopPropagation();
}, this);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,14 @@ qx.Class.define("osparc.data.model.Node", {
},
// !---- Output Nodes -----

canNodeStart: function() {
return this.isDynamic() && ["idle", "failed"].includes(this.getStatus().getInteractive());
},

requestStartNode: function() {
if (!this.canNodeStart()) {
return false;
}
const params = {
url: {
studyId: this.getStudy().getUuid(),
Expand Down Expand Up @@ -1391,6 +1398,7 @@ qx.Class.define("osparc.data.model.Node", {
converter: state => (state === "ready") ? "excluded" : "visible"
});
this.getStatus().bind("interactive", startButton, "enabled", {
// OM
converter: state => ["idle", "failed"].includes(state)
});
const executeListenerId = startButton.addListener("execute", this.requestStartNode, this);
Expand Down

0 comments on commit d2d6a36

Please sign in to comment.