Skip to content

Commit 63df90c

Browse files
author
Pedro Crespo
committed
Merge branch 'master' into is309/webserver-uses-apihub
2 parents bd48b1e + e71ed59 commit 63df90c

File tree

25 files changed

+1338
-209
lines changed

25 files changed

+1338
-209
lines changed

services/director/src/simcore_service_director/registry_proxy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __registry_request(path, method="GET"):
9595
# r = s.get(api_url, verify=False) #getattr(s, method.lower())(api_url)
9696
request_result = getattr(_SESSION, method.lower())(api_url)
9797
_logger.info("Request status: %s",request_result.status_code)
98-
if request_result.status_code > 399:
98+
if request_result.status_code > 399:
9999
request_result.raise_for_status()
100100

101101
return request_result

services/web/client/source/class/qxapp/auth/ui/LoginPage.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ qx.Class.define("qxapp.auth.ui.LoginPage", {
3838
this.__form = new qx.ui.form.Form();
3939

4040
let atm = new qx.ui.basic.Atom().set({
41-
icon: "qxapp/osparc-white-small.png",
41+
icon: "qxapp/osparc-white.svg",
4242
iconPosition: "top"
4343
});
44+
atm.getChildControl("icon").set({
45+
width: 250,
46+
height: 150,
47+
scale: true
48+
});
4449
this.add(atm);
4550

4651
let email = new qx.ui.form.TextField();

services/web/client/source/class/qxapp/component/widget/PersistentIframe.js

+25-17
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ qx.Class.define("qxapp.component.widget.PersistentIframe", {
4545
},
4646
members: {
4747
__iframe: null,
48+
__syncScheduled: null,
4849
__actionButton: null,
4950
// override
5051
_createContentElement : function() {
@@ -96,11 +97,11 @@ qx.Class.define("qxapp.component.widget.PersistentIframe", {
9697
});
9798
this.addListener("move", e => {
9899
// got to let the new layout render first or we don't see it
99-
qx.event.Timer.once(this.__syncIframePos, this, 0);
100+
this.__syncIframePos();
100101
});
101102
this.addListener("resize", e => {
102103
// got to let the new layout render first or we don't see it
103-
qx.event.Timer.once(this.__syncIframePos, this, 0);
104+
this.__syncIframePos();
104105
});
105106
this.addListener("changeVisibility", e => {
106107
var visibility = e.getData()[0];
@@ -115,21 +116,28 @@ qx.Class.define("qxapp.component.widget.PersistentIframe", {
115116
return standin;
116117
},
117118
__syncIframePos: function() {
118-
let iframeParentPos = qx.bom.element.Location.get(qx.bom.element.Location.getOffsetParent(this.__iframe.getContentElement().getDomElement()), "scroll");
119-
let divPos = qx.bom.element.Location.get(this.getContentElement().getDomElement(), "scroll");
120-
let divSize = qx.bom.element.Dimension.getSize(this.getContentElement().getDomElement());
121-
this.__iframe.setLayoutProperties({
122-
top: divPos.top - iframeParentPos.top,
123-
left: (divPos.left - iframeParentPos.left)
124-
});
125-
this.__iframe.set({
126-
width: (divSize.width),
127-
height: (divSize.height)
128-
});
129-
this.__actionButton.setLayoutProperties({
130-
top: (divPos.top - iframeParentPos.top),
131-
right: (iframeParentPos.right - iframeParentPos.left - divPos.right)
132-
});
119+
if (this.__syncScheduled) {
120+
return;
121+
}
122+
this.__syncScheduled = true;
123+
window.setTimeout(() => {
124+
this.__syncScheduled = false;
125+
let iframeParentPos = qx.bom.element.Location.get(qx.bom.element.Location.getOffsetParent(this.__iframe.getContentElement().getDomElement()), "scroll");
126+
let divPos = qx.bom.element.Location.get(this.getContentElement().getDomElement(), "scroll");
127+
let divSize = qx.bom.element.Dimension.getSize(this.getContentElement().getDomElement());
128+
this.__iframe.setLayoutProperties({
129+
top: divPos.top - iframeParentPos.top,
130+
left: (divPos.left - iframeParentPos.left)
131+
});
132+
this.__iframe.set({
133+
width: (divSize.width),
134+
height: (divSize.height)
135+
});
136+
this.__actionButton.setLayoutProperties({
137+
top: (divPos.top - iframeParentPos.top),
138+
right: (iframeParentPos.right - iframeParentPos.left - divPos.right)
139+
});
140+
}, 0);
133141
},
134142
_applyShowMaximize: function(newValue, oldValue) {
135143
this._maximizeBtn.show();

services/web/client/source/class/qxapp/component/widget/TreeTool.js

+58-38
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,22 @@
1-
/* eslint no-warning-comments: "off" */
2-
31
qx.Class.define("qxapp.component.widget.TreeTool", {
42
extend: qx.ui.core.Widget,
53

64
construct: function(projectName, workbenchModel) {
75
this.base(arguments);
86

9-
let treeLayout = new qx.ui.layout.VBox(10);
10-
this._setLayout(treeLayout);
11-
127
this.set({
138
projectName: projectName,
149
workbenchModel: workbenchModel
1510
});
1611

17-
this.__buildLayout();
18-
this.buildTree();
12+
this._setLayout(new qx.ui.layout.VBox());
13+
14+
this.__tree = this._createChildControlImpl("tree");
15+
this.populateTree();
1916

2017
this.addListener("keypress", function(keyEvent) {
2118
if (keyEvent.getKeyIdentifier() === "F2") {
22-
let treeSelection = this.__tree.getSelection();
23-
if (treeSelection.length < 1) {
24-
return;
25-
}
26-
let selectedItem = treeSelection.toArray()[0];
27-
const selectedNodeId = selectedItem.getNodeId();
28-
if (selectedNodeId === "root") {
29-
return;
30-
}
31-
32-
let treeItemRenamer = new qxapp.component.widget.TreeItemRenamer(selectedItem);
33-
treeItemRenamer.addListener("LabelChanged", e => {
34-
const data = e.getData();
35-
const newLabel = data.newLabel;
36-
const nodeId = selectedItem.getNodeId();
37-
let nodeModel = this.getWorkbenchModel().getNodeModel(nodeId);
38-
nodeModel.setLabel(newLabel);
39-
}, this);
40-
const bounds = this.getLayoutParent().getBounds();
41-
treeItemRenamer.moveTo(bounds.left+100, bounds.top+150);
42-
treeItemRenamer.open();
19+
this.__renameItem();
4320
}
4421
}, this);
4522
},
@@ -62,27 +39,36 @@ qx.Class.define("qxapp.component.widget.TreeTool", {
6239
members: {
6340
__tree: null,
6441

65-
__buildLayout: function() {
66-
let tree = this.__tree = new qx.ui.tree.VirtualTree(null, "label", "children").set({
67-
openMode: "none"
68-
});
42+
_createChildControlImpl: function(id) {
43+
let control;
44+
switch (id) {
45+
case "tree":
46+
control = this.__buildTree();
47+
this._add(control, {
48+
flex: 1
49+
});
50+
break;
51+
}
6952

70-
this._removeAll();
71-
this._add(tree, {
72-
flex: 1
73-
});
53+
return control || this.base(arguments, id);
54+
},
7455

75-
this.__tree.addListener("dblclick", e => {
56+
__buildTree: function() {
57+
let tree = new qx.ui.tree.VirtualTree(null, "label", "children").set({
58+
openMode: "none"
59+
});
60+
tree.addListener("dblclick", e => {
7661
let selection = this.__tree.getSelection();
7762
let currentSelection = selection.toArray();
7863
if (currentSelection.length > 0) {
7964
let selectedRow = currentSelection[0];
8065
this.fireDataEvent("NodeDoubleClicked", selectedRow.getNodeId());
8166
}
8267
}, this);
68+
return tree;
8369
},
8470

85-
buildTree: function() {
71+
populateTree: function() {
8672
const topLevelNodes = this.getWorkbenchModel().getNodeModels();
8773
let data = {
8874
label: this.getProjectName(),
@@ -137,6 +123,40 @@ qx.Class.define("qxapp.component.widget.TreeTool", {
137123
return null;
138124
},
139125

126+
__getSelection: function() {
127+
let treeSelection = this.__tree.getSelection();
128+
if (treeSelection.length < 1) {
129+
return null;
130+
}
131+
132+
let selectedItem = treeSelection.toArray()[0];
133+
const selectedNodeId = selectedItem.getNodeId();
134+
if (selectedNodeId === "root") {
135+
return null;
136+
}
137+
138+
return selectedItem;
139+
},
140+
141+
__renameItem: function() {
142+
let selectedItem = this.__getSelection();
143+
if (selectedItem === null) {
144+
return;
145+
}
146+
147+
let treeItemRenamer = new qxapp.component.widget.TreeItemRenamer(selectedItem);
148+
treeItemRenamer.addListener("LabelChanged", e => {
149+
const data = e.getData();
150+
const newLabel = data.newLabel;
151+
const nodeId = selectedItem.getNodeId();
152+
let nodeModel = this.getWorkbenchModel().getNodeModel(nodeId);
153+
nodeModel.setLabel(newLabel);
154+
}, this);
155+
const bounds = this.getLayoutParent().getBounds();
156+
treeItemRenamer.moveTo(bounds.left+100, bounds.top+150);
157+
treeItemRenamer.open();
158+
},
159+
140160
nodeSelected: function(nodeId) {
141161
const dataModel = this.__tree.getModel();
142162
let nodeInTree = this.__getNodeInTree(dataModel, nodeId);
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
qx.Class.define("qxapp.component.workbench.LinkBase", {
22
extend: qx.core.Object,
33

4-
construct: function(representation) {
4+
construct: function(linkModel, representation) {
55
this.base();
66

7+
this.setLinkModel(linkModel);
78
this.setRepresentation(representation);
8-
9-
this.setLinkId(qxapp.utils.Utils.uuidv4());
109
},
1110

1211
events: {
1312
"linkSelected": "qx.event.type.Data"
1413
},
1514

1615
properties: {
17-
representation: {
18-
init: null
19-
},
20-
linkId: {
21-
check: "String",
16+
linkModel: {
17+
check: "qxapp.data.model.LinkModel",
2218
nullable: false
2319
},
24-
inputNodeId: {
25-
init: null,
26-
check: "String"
27-
},
28-
outputNodeId: {
29-
init: null,
30-
check: "String"
20+
21+
representation: {
22+
init: null
23+
}
24+
},
25+
26+
members: {
27+
getLinkId: function() {
28+
return this.getLinkModel().getLinkId();
3129
}
3230
}
3331
});

0 commit comments

Comments
 (0)