Skip to content

Commit 0b25b9b

Browse files
committed
pipeline running to secondary column
1 parent 9ec7616 commit 0b25b9b

File tree

5 files changed

+13
-43
lines changed

5 files changed

+13
-43
lines changed

services/static-webserver/client/source/class/osparc/data/model/Node.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -599,23 +599,6 @@ qx.Class.define("osparc.data.model.Node", {
599599

600600
__applyPropsForm: function(propsForm) {
601601
osparc.utils.Utils.setIdToWidget(propsForm, "settingsForm_" + this.getNodeId());
602-
603-
const checkIsPipelineRunning = () => {
604-
const isPipelineRunning = this.getStudy().isPipelineRunning();
605-
this.getPropsForm().setEnabled(!isPipelineRunning);
606-
};
607-
this.getStudy().addListener("changeState", () => checkIsPipelineRunning(), this);
608-
609-
// potentially disabling the inputs form might have side effects if the deserialization is not over
610-
if (this.getWorkbench().isDeserialized()) {
611-
checkIsPipelineRunning();
612-
} else {
613-
this.getWorkbench().addListener("changeDeserialized", e => {
614-
if (e.getData()) {
615-
checkIsPipelineRunning();
616-
}
617-
}, this);
618-
}
619602
},
620603

621604
/**

services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,12 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
798798
} else if (node) {
799799
this.__populateSecondaryColumnNode(node);
800800
}
801+
802+
if (node instanceof osparc.data.model.Node) {
803+
node.getStudy().bind("pipelineRunning", this.__serviceOptionsPage, "enabled", {
804+
converter: pipelineRunning => !pipelineRunning
805+
});
806+
}
801807
},
802808

803809
__populateSecondaryColumnStudy: function(study) {

services/static-webserver/client/source/class/osparc/node/slideshow/BaseNodeView.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,6 @@ qx.Class.define("osparc.node.slideshow.BaseNodeView", {
277277
return this._settingsLayout;
278278
},
279279

280-
/**
281-
* @abstract
282-
*/
283-
isSettingsGroupShowable: function() {
284-
throw new Error("Abstract method called!");
285-
},
286-
287280
/**
288281
* @abstract
289282
*/

services/static-webserver/client/source/class/osparc/node/slideshow/FilePickerView.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ qx.Class.define("osparc.node.slideshow.FilePickerView", {
2727
},
2828

2929
members: {
30-
// overridden
31-
isSettingsGroupShowable: function() {
32-
return false;
33-
},
34-
3530
// overridden
3631
_addSettings: function() {
3732
return;

services/static-webserver/client/source/class/osparc/node/slideshow/NodeView.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
5959
if (propsForm && node.hasInputs()) {
6060
this._settingsLayout.add(propsForm);
6161
}
62-
this.__checkSettingsVisibility();
62+
63+
const showSettings = node.isComputational();
64+
this._settingsLayout.setVisibility(showSettings ? "visible" : "excluded");
65+
66+
node.getStudy().bind("pipelineRunning", this._settingsLayout, "enabled", {
67+
converter: pipelineRunning => !pipelineRunning
68+
});
6369

6470
this._mainView.add(this._settingsLayout);
6571
},
@@ -128,19 +134,6 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
128134
this.base(arguments, node);
129135
},
130136

131-
__checkSettingsVisibility: function() {
132-
const isSettingsGroupShowable = this.isSettingsGroupShowable();
133-
this._settingsLayout.setVisibility(isSettingsGroupShowable ? "visible" : "excluded");
134-
},
135-
136-
isSettingsGroupShowable: function() {
137-
const node = this.getNode();
138-
if (node.isComputational()) {
139-
return this.self().isPropsFormShowable(node);
140-
}
141-
return false;
142-
},
143-
144137
__iFrameChanged: function() {
145138
this._iFrameLayout.removeAll();
146139

0 commit comments

Comments
 (0)