Skip to content

Commit 4fa5a23

Browse files
committed
output
1 parent 00304a1 commit 4fa5a23

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

services/static-webserver/client/source/class/osparc/service/StatusUI.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ qx.Class.define("osparc.service.StatusUI", {
199199
// output
200200
case "busy":
201201
return "busy-orange";
202+
case "not-available":
203+
return "workbench-edge";
202204
case "out-of-date":
203205
return "failed-red";
204-
/*
205206
case "up-to-date":
206207
return "ready-green";
207-
*/
208208

209209
default:
210210
return "text";

services/static-webserver/client/source/class/osparc/workbench/EdgeUI.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ qx.Class.define("osparc.workbench.EdgeUI", {
4848
representation.hint = hint;
4949

5050
if (edge.getInputNode()) {
51-
edge.getInputNode().getStatus().addListener("changeModified", () => this.__updateEdgeState());
51+
edge.getInputNode().getStatus().addListener("changeOutput", () => this.__updateEdgeState());
5252
}
5353
edge.addListener("changePortConnected", () => this.__updateEdgeState());
5454

@@ -69,13 +69,8 @@ qx.Class.define("osparc.workbench.EdgeUI", {
6969
},
7070

7171
statics: {
72-
getEdgeColor: function(modified) {
73-
let newColor = null;
74-
if (modified === null) {
75-
newColor = qx.theme.manager.Color.getInstance().resolve("workbench-edge-comp-active");
76-
} else {
77-
newColor = osparc.service.StatusUI.getColor(modified ? "modified" : "ready");
78-
}
72+
getEdgeColor: function(outputState) {
73+
const newColor = osparc.service.StatusUI.getColor(outputState);
7974
const colorHex = qx.theme.manager.Color.getInstance().resolve(newColor);
8075
return colorHex;
8176
},
@@ -89,10 +84,10 @@ qx.Class.define("osparc.workbench.EdgeUI", {
8984
__updateEdgeState: function() {
9085
const inputNode = this.getEdge().getInputNode();
9186
const portConnected = this.getEdge().isPortConnected();
92-
const modified = inputNode ? inputNode.getStatus().getModified() : false;
87+
const output = inputNode ? inputNode.getStatus().getOutput() : null;
9388

9489
// color
95-
const colorHex = this.self().getEdgeColor(modified);
90+
const colorHex = this.self().getEdgeColor(output);
9691
osparc.wrapper.Svg.updateCurveColor(this.getRepresentation(), colorHex);
9792

9893
// shape
@@ -102,7 +97,7 @@ qx.Class.define("osparc.workbench.EdgeUI", {
10297
const hint = this.getHint();
10398
if (this.getEdge().isPortConnected() === false) {
10499
hint.setText(this.self().noPortsConnectedText(this.getEdge()));
105-
} else if (modified) {
100+
} else if (output === "out-of-date") {
106101
hint.setText("Out-of-date");
107102
} else {
108103
hint.setText(null);

services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
10541054
portLabel.setSource(osparc.workbench.NodeUI.PORT_CONNECTED);
10551055

10561056
if (!this.__tempEdgeIsInput) {
1057-
const modified = nodeUI.getNode().getStatus().getModified();
1058-
const colorHex = osparc.workbench.EdgeUI.getEdgeColor(modified);
1057+
const output = nodeUI.getNode().getStatus().getOutput();
1058+
const colorHex = osparc.workbench.EdgeUI.getEdgeColor(output);
10591059
osparc.wrapper.Svg.updateCurveColor(this.__tempEdgeRepr, colorHex);
10601060
}
10611061
},

services/static-webserver/client/source/class/osparc/wrapper/Svg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ qx.Class.define("osparc.wrapper.Svg", {
6767
drawCurve: function(draw, controls, dashed) {
6868
const edgeWidth = 3;
6969
const arrowSize = 4;
70-
const edgeColor = qx.theme.manager.Color.getInstance().getTheme().colors["workbench-edge-comp-active"];
70+
const edgeColor = qx.theme.manager.Color.getInstance().getTheme().colors["workbench-edge"];
7171

7272
osparc.wrapper.Svg.curateCurveControls(controls);
7373

@@ -391,7 +391,7 @@ qx.Class.define("osparc.wrapper.Svg", {
391391
/* / ANNOTATIONS */
392392

393393
drawDashedRect: function(draw, width, height, x, y) {
394-
const edgeColor = qx.theme.manager.Color.getInstance().getTheme().colors["workbench-edge-comp-active"];
394+
const edgeColor = qx.theme.manager.Color.getInstance().getTheme().colors["workbench-edge"];
395395
const rect = draw.rect(width, height)
396396
.fill("none")
397397
.stroke({

0 commit comments

Comments
 (0)