From bfb72cd60c3096f13d6aca1d48659d77d7eb763c Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Tue, 26 Jan 2021 13:30:05 +0100 Subject: [PATCH 01/21] minor --- .../source/class/osparc/component/widget/Thumbnail.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/client/source/class/osparc/component/widget/Thumbnail.js b/services/web/client/source/class/osparc/component/widget/Thumbnail.js index d36fc310a97..7855fa3dcdd 100644 --- a/services/web/client/source/class/osparc/component/widget/Thumbnail.js +++ b/services/web/client/source/class/osparc/component/widget/Thumbnail.js @@ -106,10 +106,10 @@ qx.Class.define("osparc.component.widget.Thumbnail", { const image = this.getChildControl("image"); const source = image.getSource(); if (source) { - const width = qx.io.ImageLoader.getWidth(source); - const height = qx.io.ImageLoader.getHeight(source); - if (width && height) { - const aspectRatio = width/height; + const srcWidth = qx.io.ImageLoader.getWidth(source); + const srcHeight = qx.io.ImageLoader.getHeight(source); + if (srcWidth && srcHeight) { + const aspectRatio = srcWidth/srcHeight; const maxWidth = image.getMaxWidth(); const maxHeight = image.getMaxHeight(); From d75d4676ab603b50aa69be23cbb7874205311e39 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Tue, 26 Jan 2021 13:36:17 +0100 Subject: [PATCH 02/21] Fix https://github.com/ITISFoundation/osparc-issues/issues/396 --- .../source/class/osparc/component/widget/Thumbnail.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/web/client/source/class/osparc/component/widget/Thumbnail.js b/services/web/client/source/class/osparc/component/widget/Thumbnail.js index 7855fa3dcdd..3e90b176f48 100644 --- a/services/web/client/source/class/osparc/component/widget/Thumbnail.js +++ b/services/web/client/source/class/osparc/component/widget/Thumbnail.js @@ -110,6 +110,12 @@ qx.Class.define("osparc.component.widget.Thumbnail", { const srcHeight = qx.io.ImageLoader.getHeight(source); if (srcWidth && srcHeight) { const aspectRatio = srcWidth/srcHeight; + if (this.getBounds() && this.getBounds().width < image.getMaxWidth()) { + image.setMaxWidth(this.getBounds().width); + } + if (this.getBounds() && this.getBounds().height < image.getMaxHeight()) { + image.setMaxHeight(this.getBounds().height); + } const maxWidth = image.getMaxWidth(); const maxHeight = image.getMaxHeight(); From 80440d649ea4ca4ea21cbba16b981009ada3cb2c Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Tue, 26 Jan 2021 14:31:05 +0100 Subject: [PATCH 03/21] minor --- .../client/source/class/osparc/component/widget/Thumbnail.js | 2 +- .../source/class/osparc/dashboard/StudyBrowserButtonBase.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/client/source/class/osparc/component/widget/Thumbnail.js b/services/web/client/source/class/osparc/component/widget/Thumbnail.js index 3e90b176f48..fb688b88452 100644 --- a/services/web/client/source/class/osparc/component/widget/Thumbnail.js +++ b/services/web/client/source/class/osparc/component/widget/Thumbnail.js @@ -72,7 +72,7 @@ qx.Class.define("osparc.component.widget.Thumbnail", { } [ - "changeSource", + "appear", "loaded" ].forEach(eventName => { image.addListener(eventName, e => { diff --git a/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js b/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js index a9eb1c8206f..17347fa2504 100644 --- a/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js +++ b/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js @@ -39,7 +39,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", { this._setLayout(new qx.ui.layout.Canvas()); - const mainLayout = this._mainLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(6)).set({ + const mainLayout = this._mainLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(this.self().V_SPACING)).set({ maxWidth: this.self().ITEM_WIDTH - 2*this.self().PADDING, maxHeight: this.self().ITEM_HEIGHT - 2*this.self().PADDING }); @@ -58,6 +58,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", { ITEM_WIDTH: 190, ITEM_HEIGHT: 220, PADDING: 10, + V_SPACING: 6, SPACING: 12, POS: { TITLE: 0, From ecb27aaa69f733b77a647332a3df3da93d1f0a33 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Tue, 26 Jan 2021 15:00:03 +0100 Subject: [PATCH 04/21] expose recheckSize --- .../client/source/class/osparc/component/widget/Thumbnail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/client/source/class/osparc/component/widget/Thumbnail.js b/services/web/client/source/class/osparc/component/widget/Thumbnail.js index fb688b88452..f98d9e82753 100644 --- a/services/web/client/source/class/osparc/component/widget/Thumbnail.js +++ b/services/web/client/source/class/osparc/component/widget/Thumbnail.js @@ -76,7 +76,7 @@ qx.Class.define("osparc.component.widget.Thumbnail", { "loaded" ].forEach(eventName => { image.addListener(eventName, e => { - this.__calculateMaxHeight(); + this.calculateMaxHeight(); }, this); }); }, @@ -102,7 +102,7 @@ qx.Class.define("osparc.component.widget.Thumbnail", { return control || this.base(arguments, id); }, - __calculateMaxHeight: function() { + recheckSize: function() { const image = this.getChildControl("image"); const source = image.getSource(); if (source) { From ff17125c42455e5d55775ad6a6f0e8087ea0831c Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Tue, 26 Jan 2021 15:09:04 +0100 Subject: [PATCH 05/21] calculate thumnbail's maxHeight of studycard --- .../osparc/component/widget/Thumbnail.js | 2 +- .../dashboard/StudyBrowserButtonBase.js | 28 +++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/services/web/client/source/class/osparc/component/widget/Thumbnail.js b/services/web/client/source/class/osparc/component/widget/Thumbnail.js index f98d9e82753..fa18d9cbaeb 100644 --- a/services/web/client/source/class/osparc/component/widget/Thumbnail.js +++ b/services/web/client/source/class/osparc/component/widget/Thumbnail.js @@ -76,7 +76,7 @@ qx.Class.define("osparc.component.widget.Thumbnail", { "loaded" ].forEach(eventName => { image.addListener(eventName, e => { - this.calculateMaxHeight(); + this.recheckSize(); }, this); }); }, diff --git a/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js b/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js index 17347fa2504..46031115f36 100644 --- a/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js +++ b/services/web/client/source/class/osparc/dashboard/StudyBrowserButtonBase.js @@ -129,11 +129,11 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", { } case "icon": { const maxWidth = this.self().ITEM_WIDTH - 2*this.self().PADDING; - const image = new osparc.component.widget.Thumbnail(null, maxWidth, 124); - control = image.getChildControl("image").set({ + control = new osparc.component.widget.Thumbnail(null, maxWidth, 124); + control.getChildControl("image").set({ anonymous: true }); - this._mainLayout.addAt(image, this.self().POS.THUMBNAIL, { + this._mainLayout.addAt(control, this.self().POS.THUMBNAIL, { flex: 1 }); break; @@ -160,10 +160,28 @@ qx.Class.define("osparc.dashboard.StudyBrowserButtonBase", { }, _applyIcon: function(value, old) { - let icon = this.getChildControl("icon"); - icon.set({ + const iconLayout = this.getChildControl("icon"); + const image = iconLayout.getChildControl("image"); + image.set({ source: value }); + + [ + "appear", + "loaded" + ].forEach(eventName => { + image.addListener(eventName, () => { + let maxHeight = this.self().ITEM_HEIGHT - 2*this.self().PADDING; + // eslint-disable-next-line no-underscore-dangle + this._mainLayout._getChildren().forEach(child => { + if (child.getSubcontrolId() !== "icon") { + maxHeight -= (child.getBounds().height + 6); + } + }); + iconLayout.setMaxHeight(maxHeight); + iconLayout.recheckSize(); + }, this); + }); }, /** From b5496b9cf837ddc8f668952bab27031dbb338e91 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Tue, 26 Jan 2021 15:15:44 +0100 Subject: [PATCH 06/21] Update BaseNodeView.js --- .../client/source/class/osparc/component/node/BaseNodeView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/web/client/source/class/osparc/component/node/BaseNodeView.js b/services/web/client/source/class/osparc/component/node/BaseNodeView.js index e0b89a30e03..740766339fa 100644 --- a/services/web/client/source/class/osparc/component/node/BaseNodeView.js +++ b/services/web/client/source/class/osparc/component/node/BaseNodeView.js @@ -110,6 +110,7 @@ qx.Class.define("osparc.component.node.BaseNodeView", { collapsedMinWidth: collapsedWidth, collapsedWidth: collapsedWidth }); + sidePanel.getLayout().resetSeparator(); const sideHeader = new qx.ui.toolbar.ToolBar(); const titlePart = new qx.ui.toolbar.Part(); From 3db2a83bcb49027c5510c4cb0b43ed7c788e8b38 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Wed, 27 Jan 2021 10:44:24 +0100 Subject: [PATCH 07/21] minor --- .../osparc/component/workbench/WorkbenchUI.js | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index 0681a673460..54f0069f86c 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -178,8 +178,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { __svgWidgetDrop: null, __tempEdgeNodeId: null, __tempEdgeRepr: null, - __pointerPosX: null, - __pointerPosY: null, + __pointerPos: null, __selectedItemId: null, __currentModel: null, __startHint: null, @@ -596,12 +595,8 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { let dragNodeId = data.nodeId; if (this.__tempEdgeNodeId === dragNodeId) { - const winPos = this.__unscaleCoordinates(this.__pointerPosX, this.__pointerPosY); - const srvPos = { - x: this.__pointerPosX, - y: this.__pointerPosY - }; - const srvCat = this.__createServiceCatalog(winPos, srvPos); + const winPos = this.__unscaleCoordinates(this.__pointerPos.x, this.__pointerPos.y); + const srvCat = this.__createServiceCatalog(winPos, this.__pointerPos); if (this.__tempEdgeIsInput === true) { srvCat.setContext(dragNodeId, this.getNodeUI(dragNodeId).getInputPort()); } else { @@ -770,8 +765,10 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { const scrollX = this.__workbenchLayoutScroll.getScrollX(); const scrollY = this.__workbenchLayoutScroll.getScrollY(); const scaledScroll = this.__scaleCoordinates(scrollX, scrollY); - this.__pointerPosX = scaledPos.x + scaledScroll.x; - this.__pointerPosY = scaledPos.y + scaledScroll.y; + this.__pointerPos = { + x: scaledPos.x + scaledScroll.x, + y: scaledPos.y + scaledScroll.y + }; let portPos = nodeUI.getEdgePoint(port); if (portPos[0] === null) { @@ -783,15 +780,15 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { let x2; let y2; if (port.isInput) { - x1 = this.__pointerPosX; - y1 = this.__pointerPosY; + x1 = this.__pointerPos.x; + y1 = this.__pointerPos.y; x2 = portPos[0]; y2 = portPos[1]; } else { x1 = portPos[0]; y1 = portPos[1]; - x2 = this.__pointerPosX; - y2 = this.__pointerPosY; + x2 = this.__pointerPos.x; + y2 = this.__pointerPos.y; } if (this.__tempEdgeRepr === null) { @@ -807,8 +804,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { } this.__tempEdgeRepr = null; this.__tempEdgeNodeId = null; - this.__pointerPosX = null; - this.__pointerPosY = null; + this.__pointerPos = null; }, __getEdgePoints: function(node1, port1, node2, port2) { @@ -1001,12 +997,8 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }; }, - - __mouseWheel: function(e) { - this.__zoom(e.getWheelDelta() < 0); - }, - - __zoom: function(zoomIn = true) { + __zoom: function(e) { + const zoomIn = e.getWheelDelta() < 0; const zoomValues = this.self().ZoomValues; const nextItem = () => { const i = zoomValues.indexOf(this.getScale()); @@ -1132,7 +1124,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { domEl.addEventListener("dragleave", this.__dragLeave.bind(this), false); domEl.addEventListener("drop", this.__drop.bind(this), false); - this.addListener("mousewheel", this.__mouseWheel, this); + this.addListener("mousewheel", this.__zoom, this); commandDel.setEnabled(true); commandEsc.setEnabled(true); From b7d52f53152b5490d167e9e4caed088ad8f791d4 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Wed, 27 Jan 2021 10:50:42 +0100 Subject: [PATCH 08/21] minor --- .../osparc/component/workbench/WorkbenchUI.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index 54f0069f86c..3a2836c2350 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -1143,12 +1143,12 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { this.resetSelectedNodes(); }, this); - this.__workbenchLayout.addListener("dbltap", e => { + this.__workbenchLayout.addListener("dbltap", pointerEvent => { if (this.getStudy().isReadOnly()) { return; } - const winPos = this.__pointerEventToWorkbenchPos(e, false); - const scaledPos = this.__pointerEventToWorkbenchPos(e, true); + const winPos = this.__pointerEventToWorkbenchPos(pointerEvent, false); + const scaledPos = this.__pointerEventToWorkbenchPos(pointerEvent, true); const srvCat = this.__createServiceCatalog(winPos, scaledPos); srvCat.open(); }, this); @@ -1169,27 +1169,27 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { return files.length === 1; }, - __dragEnter: function(e) { - this.__dragging(e, true); + __dragEnter: function(pointerEvent) { + this.__dragging(pointerEvent, true); }, - __dragOver: function(e) { - this.__dragging(e, true); + __dragOver: function(pointerEvent) { + this.__dragging(pointerEvent, true); }, - __dragLeave: function(e) { - this.__dragging(e, false); + __dragLeave: function(pointerEvent) { + this.__dragging(pointerEvent, false); }, - __drop: function(e) { - this.__dragging(e, false); + __drop: function(pointerEvent) { + this.__dragging(pointerEvent, false); - if (this.__allowDropFile(e)) { + if (this.__allowDropFile(pointerEvent)) { const pos = { - x: e.offsetX, - y: e.offsetY + x: pointerEvent.offsetX, + y: pointerEvent.offsetY }; - const fileList = e.dataTransfer.files; + const fileList = pointerEvent.dataTransfer.files; if (fileList.length) { const data = { service: qx.data.marshal.Json.createModel(osparc.utils.Services.getFilePicker()) From 764543dbfddc5db24b4e7bc4aa17c11f32657383 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Wed, 27 Jan 2021 11:22:32 +0100 Subject: [PATCH 09/21] minor --- .../osparc/component/workbench/WorkbenchUI.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index 3a2836c2350..1429b920bff 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -139,7 +139,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { TOP_OFFSET: osparc.navigation.NavigationBar.HEIGHT + 46, - ZoomValues: [0.25, 0.4, 0.5, 0.6, 0.8, 1, 1.25, 1.5, 2, 3] + ZOOM_VALUES: [0.25, 0.4, 0.5, 0.6, 0.8, 1, 1.25, 1.5, 2, 3] }, events: { @@ -156,7 +156,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }, scale: { - check: "osparc.component.workbench.WorkbenchUI.ZoomValues", + check: "osparc.component.workbench.WorkbenchUI.ZOOM_VALUES", init: 1, apply: "__applyScale", event: "changeScale", @@ -997,9 +997,12 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }; }, - __zoom: function(e) { - const zoomIn = e.getWheelDelta() < 0; - const zoomValues = this.self().ZoomValues; + __mouseWheel: function() { + this.__zoom(e.getWheelDelta() < 0, 3); + }, + + __zoom: function(zoomIn = true) { + const zoomValues = this.self().ZOOM_VALUES; const nextItem = () => { const i = zoomValues.indexOf(this.getScale()); if (i+1 Date: Wed, 27 Jan 2021 11:50:07 +0100 Subject: [PATCH 10/21] minor --- .../source/class/osparc/component/workbench/WorkbenchUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index 1429b920bff..b911adcae6a 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -997,8 +997,8 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }; }, - __mouseWheel: function() { this.__zoom(e.getWheelDelta() < 0, 3); + __mouseWheel: function(e) { }, __zoom: function(zoomIn = true) { From ef1054d64e1978e3721433c22985ca166221624e Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Wed, 27 Jan 2021 11:52:52 +0100 Subject: [PATCH 11/21] minor --- .../source/class/osparc/component/workbench/WorkbenchUI.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index b911adcae6a..ef64fa203d7 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -997,8 +997,9 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }; }, - this.__zoom(e.getWheelDelta() < 0, 3); __mouseWheel: function(e) { + const zoomIn = e.getWheelDelta() < 0; + this.__zoom(zoomIn); }, __zoom: function(zoomIn = true) { From 68c59315f241ec045fa485cc024bba7d85e5dcd4 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 13:36:47 +0100 Subject: [PATCH 12/21] minor --- .../source/class/osparc/component/workbench/WorkbenchUI.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index ef64fa203d7..a4e0e213f4b 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -998,6 +998,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }, __mouseWheel: function(e) { + this.__pointerPos = this.__pointerEventToWorkbenchPos(e, false); const zoomIn = e.getWheelDelta() < 0; this.__zoom(zoomIn); }, @@ -1061,7 +1062,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { const transformOrigin = [0, 0]; const p = ["webkit", "moz", "ms", "o"]; const s = `scale(${zoom})`; - const oString = (transformOrigin[0] * 100) + "% " + (transformOrigin[1] * 100) + "%"; + const oString = transformOrigin[0] + "px " + transformOrigin[1] + "px"; for (let i = 0; i < p.length; i++) { el.style[p[i] + "Transform"] = s; el.style[p[i] + "TransformOrigin"] = oString; From 8fd02fbb3e635215fb2549825f90c27606bd233f Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 13:52:49 +0100 Subject: [PATCH 13/21] Tooltip for zoom buttons --- .../osparc/component/workbench/WorkbenchUI.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index a4e0e213f4b..94f7c13f03d 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -200,16 +200,19 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { return zoomToolbar; }, - __getZoomBtn: function(icon) { + __getZoomBtn: function(icon, tooltip) { const btn = new qx.ui.toolbar.Button(null, icon+"/18").set({ width: ZOOM_BUTTON_SIZE, height: ZOOM_BUTTON_SIZE }); + if (tooltip) { + btn.setToolTipText(tooltip); + } return btn; }, __getZoomInButton: function() { - const btn = this.__getZoomBtn("@MaterialIcons/zoom_in"); + const btn = this.__getZoomBtn("@MaterialIcons/zoom_in", this.tr("Zoom In")); btn.addListener("execute", () => { this.__zoom(true); }, this); @@ -217,7 +220,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }, __getZoomOutButton: function() { - const btn = this.__getZoomBtn("@MaterialIcons/zoom_out"); + const btn = this.__getZoomBtn("@MaterialIcons/zoom_out", this.tr("Zoom Out")); btn.addListener("execute", () => { this.__zoom(false); }, this); @@ -225,7 +228,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }, __getZoomResetButton: function() { - const btn = this.__getZoomBtn("@MaterialIcons/find_replace"); + const btn = this.__getZoomBtn("@MaterialIcons/find_replace", this.tr("Reset Zoom")); btn.addListener("execute", () => { this.setScale(1); }, this); @@ -233,7 +236,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }, __getZoomAllButton: function() { - const btn = this.__getZoomBtn("@MaterialIcons/zoom_out_map"); + const btn = this.__getZoomBtn("@MaterialIcons/zoom_out_map", this.tr("Zoom All")); btn.addListener("execute", () => { this.__zoomAll(); }, this); @@ -1062,7 +1065,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { const transformOrigin = [0, 0]; const p = ["webkit", "moz", "ms", "o"]; const s = `scale(${zoom})`; - const oString = transformOrigin[0] + "px " + transformOrigin[1] + "px"; + const oString = (transformOrigin[0] * 100) + "% " + (transformOrigin[1] * 100) + "%"; for (let i = 0; i < p.length; i++) { el.style[p[i] + "Transform"] = s; el.style[p[i] + "TransformOrigin"] = oString; From 1126a0329634d6098404a8b01d92371505c93194 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 13:59:22 +0100 Subject: [PATCH 14/21] renaming --- .../client/source/class/osparc/desktop/SlideShowToolbar.js | 2 +- services/web/client/source/class/osparc/desktop/Toolbar.js | 6 +++--- .../client/source/class/osparc/desktop/WorkbenchToolbar.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/web/client/source/class/osparc/desktop/SlideShowToolbar.js b/services/web/client/source/class/osparc/desktop/SlideShowToolbar.js index fb95e24471a..a6563b194b3 100644 --- a/services/web/client/source/class/osparc/desktop/SlideShowToolbar.js +++ b/services/web/client/source/class/osparc/desktop/SlideShowToolbar.js @@ -47,7 +47,7 @@ qx.Class.define("osparc.desktop.SlideShowToolbar", { }, // overriden - _populateGuidedNodesLayout: function() { + _populateNodesNavigationLayout: function() { const study = this.getStudy(); if (study) { const slideShow = study.getUi().getSlideshow(); diff --git a/services/web/client/source/class/osparc/desktop/Toolbar.js b/services/web/client/source/class/osparc/desktop/Toolbar.js index 4a9ae991841..58e98867a2c 100644 --- a/services/web/client/source/class/osparc/desktop/Toolbar.js +++ b/services/web/client/source/class/osparc/desktop/Toolbar.js @@ -92,11 +92,11 @@ qx.Class.define("osparc.desktop.Toolbar", { __applyStudy: function(study) { if (study) { study.getUi().addListener("changeCurrentNodeId", () => { - this._populateGuidedNodesLayout(); + this._populateNodesNavigationLayout(); }); this._startStopBtns.setVisibility(study.isReadOnly() ? "excluded" : "visible"); - this._populateGuidedNodesLayout(); + this._populateNodesNavigationLayout(); } }, @@ -104,7 +104,7 @@ qx.Class.define("osparc.desktop.Toolbar", { throw new Error("Abstract method called!"); }, - _populateGuidedNodesLayout: function() { + _populateNodesNavigationLayout: function() { throw new Error("Abstract method called!"); } } diff --git a/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js b/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js index 54c261ffcd7..25bbd5f35c6 100644 --- a/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js +++ b/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js @@ -32,7 +32,7 @@ qx.Class.define("osparc.desktop.WorkbenchToolbar", { }, // overriden - _populateGuidedNodesLayout: function() { + _populateNodesNavigationLayout: function() { const study = this.getStudy(); if (study) { const nodeIds = study.getWorkbench().getPathIds(study.getUi().getCurrentNodeId()); From 416c91467f267e8f974f1dd0597dc27272e95b1d Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 14:11:18 +0100 Subject: [PATCH 15/21] Sweeper button to WorkbenchToolbar --- .../class/osparc/desktop/ControlsBar.js | 16 --------- .../class/osparc/desktop/WorkbenchToolbar.js | 36 +++++++++++++++++++ .../class/osparc/desktop/WorkbenchView.js | 2 +- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/services/web/client/source/class/osparc/desktop/ControlsBar.js b/services/web/client/source/class/osparc/desktop/ControlsBar.js index 8f1d743f711..a7b71292733 100644 --- a/services/web/client/source/class/osparc/desktop/ControlsBar.js +++ b/services/web/client/source/class/osparc/desktop/ControlsBar.js @@ -42,7 +42,6 @@ qx.Class.define("osparc.desktop.ControlsBar", { }, events: { - "showSweeper": "qx.event.type.Event", "showWorkbench": "qx.event.type.Event", "showSettings": "qx.event.type.Event", "groupSelection": "qx.event.type.Event", @@ -95,21 +94,6 @@ qx.Class.define("osparc.desktop.ControlsBar", { if (osparc.data.Permissions.getInstance().canDo("study.node.grouping")) { this.add(groupCtrls); } - - const moreCtrls = new qx.ui.toolbar.Part(); - osparc.data.model.Sweeper.isSweeperEnabled() - .then(isSweeperEnabled => { - if (isSweeperEnabled) { - const sweeperButton = this.__createShowSweeperButton(); - moreCtrls.add(sweeperButton); - } - }); - this.add(moreCtrls); - }, - - __createShowSweeperButton: function() { - const parametersButton = this.__createButton(this.tr("Sweeper"), "paw", "showSweeperButton", "showSweeper"); - return parametersButton; }, __createWorkbenchButton: function() { diff --git a/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js b/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js index 25bbd5f35c6..337b001ec79 100644 --- a/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js +++ b/services/web/client/source/class/osparc/desktop/WorkbenchToolbar.js @@ -24,10 +24,46 @@ qx.Class.define("osparc.desktop.WorkbenchToolbar", { this.__attachEventHandlers(); }, + events: { + "showSweeper": "qx.event.type.Event" + }, + members: { + _createChildControlImpl: function(id) { + let control; + switch (id) { + case "sweeper-btn": { + control = new qx.ui.form.Button(this.tr("Sweeper"), "@FontAwesome5Solid/paw/14").set({ + toolTipText: this.tr("Sweeper"), + icon: "@FontAwesome5Solid/paw/14", + ...osparc.navigation.NavigationBar.BUTTON_OPTIONS, + allowGrowX: false + }); + control.addListener("execute", e => { + this.fireDataEvent("showSweeper"); + }, this); + this._add(control); + break; + } + } + return control || this.base(arguments, id); + }, + // overriden _buildLayout: function() { this.getChildControl("breadcrumb-navigation"); + + this._add(new qx.ui.core.Spacer(20)); + + const sweeperBtn = this.getChildControl("sweeper-btn"); + sweeperBtn.exclude(); + osparc.data.model.Sweeper.isSweeperEnabled() + .then(isSweeperEnabled => { + if (isSweeperEnabled) { + sweeperBtn.show(); + } + }); + this._startStopBtns = this.getChildControl("start-stop-btns"); }, diff --git a/services/web/client/source/class/osparc/desktop/WorkbenchView.js b/services/web/client/source/class/osparc/desktop/WorkbenchView.js index be29bc027df..3a59e292f44 100644 --- a/services/web/client/source/class/osparc/desktop/WorkbenchView.js +++ b/services/web/client/source/class/osparc/desktop/WorkbenchView.js @@ -281,7 +281,6 @@ qx.Class.define("osparc.desktop.WorkbenchView", { }, this); const controlsBar = this.__mainPanel.getControls(); - controlsBar.addListener("showSweeper", this.__showSweeper, this); controlsBar.addListener("showWorkbench", this.__showWorkbenchUI, this); controlsBar.addListener("showSettings", this.__showSettings, this); controlsBar.addListener("groupSelection", this.__groupSelection, this); @@ -439,6 +438,7 @@ qx.Class.define("osparc.desktop.WorkbenchView", { this.nodeSelected(nodeId); }, this); }); + workbenchToolbar.addListener("showSweeper", this.__showSweeper, this); nodesTree.addListener("changeSelectedNode", e => { const node = workbenchUI.getNodeUI(e.getData()); From 538e733fd4395fb5b5b4587a7c4c84fdeb9081c0 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 14:21:36 +0100 Subject: [PATCH 16/21] catch error in p2e --- tests/e2e/portal/2D_Plot.js | 75 ++++++++++-------- tests/e2e/portal/3D_Anatomical.js | 55 +++++++------ tests/e2e/portal/3D_EM.js | 55 +++++++------ tests/e2e/portal/Bornstein.js | 63 +++++++++------ tests/e2e/portal/CC_Human.js | 81 +++++++++++-------- tests/e2e/portal/CC_Rabbit.js | 83 ++++++++++--------- tests/e2e/portal/Kember.js | 127 ++++++++++++++++-------------- tests/e2e/portal/Mattward.js | 73 +++++++++-------- tests/e2e/portal/opencor.js | 59 ++++++++------ 9 files changed, 385 insertions(+), 286 deletions(-) diff --git a/tests/e2e/portal/2D_Plot.js b/tests/e2e/portal/2D_Plot.js index c53dff2a7b4..88f72fecc78 100644 --- a/tests/e2e/portal/2D_Plot.js +++ b/tests/e2e/portal/2D_Plot.js @@ -18,46 +18,57 @@ const screenshotPrefix = "2DPlot_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); - const workbenchData = utils.extractWorkbenchData(studyData["data"]); - await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][1]]); + const workbenchData = utils.extractWorkbenchData(studyData["data"]); + await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][1]]); - // Some time for starting the service - await tutorial.waitFor(5000); - await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); + // Some time for starting the service + await tutorial.waitFor(5000); + await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); - // await tutorial.openNode(1); - auto.openNode(page, 1); + // await tutorial.openNode(1); + auto.openNode(page, 1); - await tutorial.waitFor(2000); - await utils.takeScreenshot(page, screenshotPrefix + 'iFrame0'); + await tutorial.waitFor(2000); + await utils.takeScreenshot(page, screenshotPrefix + 'iFrame0'); - const iframeHandles = await page.$$("iframe"); - // expected two iframes = loading + raw-graph - const frame = await iframeHandles[1].contentFrame(); + const iframeHandles = await page.$$("iframe"); + // expected two iframes = loading + raw-graph + const frame = await iframeHandles[1].contentFrame(); - // inside the iFrame, click on "oSPARC inputs" - const oSPARCInputsSelector = '#load-data > div > div:nth-child(2) > div.col-lg-2 > ul > li:nth-child(5)'; - await frame.waitForSelector(oSPARCInputsSelector); - await frame.click(oSPARCInputsSelector); - await tutorial.waitFor(2000); - await utils.takeScreenshot(page, screenshotPrefix + 'iFrame1'); + // inside the iFrame, click on "oSPARC inputs" + const oSPARCInputsSelector = '#load-data > div > div:nth-child(2) > div.col-lg-2 > ul > li:nth-child(5)'; + await frame.waitForSelector(oSPARCInputsSelector); + await frame.click(oSPARCInputsSelector); + await tutorial.waitFor(2000); + await utils.takeScreenshot(page, screenshotPrefix + 'iFrame1'); - // after click on "oSPARC inputs", click on the input coming from the File Picker - const oSPARCInputSelector = '#load-data > div > div:nth-child(2) > div.col-lg-10 > div:nth-child(8) > div'; - await frame.waitForSelector(oSPARCInputSelector); - await frame.click(oSPARCInputSelector); - await tutorial.waitFor(2000); - await utils.takeScreenshot(page, screenshotPrefix + 'iFrame2'); + // after click on "oSPARC inputs", click on the input coming from the File Picker + const oSPARCInputSelector = '#load-data > div > div:nth-child(2) > div.col-lg-10 > div:nth-child(8) > div'; + await frame.waitForSelector(oSPARCInputSelector); + await frame.click(oSPARCInputSelector); + await tutorial.waitFor(2000); + await utils.takeScreenshot(page, screenshotPrefix + 'iFrame2'); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/3D_Anatomical.js b/tests/e2e/portal/3D_Anatomical.js index ede95ae8562..864811f97dd 100644 --- a/tests/e2e/portal/3D_Anatomical.js +++ b/tests/e2e/portal/3D_Anatomical.js @@ -17,28 +17,39 @@ const screenshotPrefix = "3DAnatomical_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); - - const workbenchData = utils.extractWorkbenchData(studyData["data"]); - await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][1]]); - - // Some time for starting the service - await tutorial.waitFor(10000); - await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); - - await tutorial.openNodeFiles(1); - const outFiles = [ - "data.zip" - ]; - await tutorial.checkResults(outFiles.length); - - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); + + const workbenchData = utils.extractWorkbenchData(studyData["data"]); + await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][1]]); + + // Some time for starting the service + await tutorial.waitFor(10000); + await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); + + await tutorial.openNodeFiles(1); + const outFiles = [ + "data.zip" + ]; + await tutorial.checkResults(outFiles.length); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } + + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/3D_EM.js b/tests/e2e/portal/3D_EM.js index c809bee2639..4201ff6fef7 100644 --- a/tests/e2e/portal/3D_EM.js +++ b/tests/e2e/portal/3D_EM.js @@ -17,28 +17,39 @@ const screenshotPrefix = "3DEM_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); - - const workbenchData = utils.extractWorkbenchData(studyData["data"]); - await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][2]]); - - // Some time for starting the service - await tutorial.waitFor(10000); - await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); - - await tutorial.openNodeFiles(2); - const outFiles = [ - "data.zip" - ]; - await tutorial.checkResults(outFiles.length); - - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); + + const workbenchData = utils.extractWorkbenchData(studyData["data"]); + await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][2]]); + + // Some time for starting the service + await tutorial.waitFor(10000); + await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); + + await tutorial.openNodeFiles(2); + const outFiles = [ + "data.zip" + ]; + await tutorial.checkResults(outFiles.length); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } + + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/Bornstein.js b/tests/e2e/portal/Bornstein.js index 827d61b7c6f..b72d09a1e21 100644 --- a/tests/e2e/portal/Bornstein.js +++ b/tests/e2e/portal/Bornstein.js @@ -17,32 +17,43 @@ const screenshotPrefix = "Bornstein_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); - - const workbenchData = utils.extractWorkbenchData(studyData["data"]); - await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][0]]); - - // Some time for starting the service - await tutorial.waitFor(60000); - await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); - - // This study opens in fullscreen mode - await tutorial.restoreIFrame(); - - await tutorial.openNodeFiles(0); - const outFiles = [ - "output.csv", - "traces.pkl" - ]; - await tutorial.checkResults(outFiles.length); - - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); + + const workbenchData = utils.extractWorkbenchData(studyData["data"]); + await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][0]]); + + // Some time for starting the service + await tutorial.waitFor(60000); + await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); + + // This study opens in fullscreen mode + await tutorial.restoreIFrame(); + + await tutorial.openNodeFiles(0); + const outFiles = [ + "output.csv", + "traces.pkl" + ]; + await tutorial.checkResults(outFiles.length); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } + + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/CC_Human.js b/tests/e2e/portal/CC_Human.js index 7ae1e67f7d6..35f17578375 100644 --- a/tests/e2e/portal/CC_Human.js +++ b/tests/e2e/portal/CC_Human.js @@ -17,48 +17,59 @@ const screenshotPrefix = "CCHuman_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); - // Some time for loading the workbench - await tutorial.waitFor(10000); - await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); + // Some time for loading the workbench + await tutorial.waitFor(10000); + await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); - await tutorial.runPipeline(studyId, 1800000); - await utils.takeScreenshot(page, screenshotPrefix + 'after_1-2-3_run'); + await tutorial.runPipeline(studyId, 1800000); + await utils.takeScreenshot(page, screenshotPrefix + 'after_1-2-3_run'); - await tutorial.openNodeFiles(1); - const outFiles0 = [ - "vm_1Hz.txt", - "logs.zip", - "allresult_1Hz.txt" - ]; - await tutorial.checkResults(outFiles0.length); + await tutorial.openNodeFiles(1); + const outFiles0 = [ + "vm_1Hz.txt", + "logs.zip", + "allresult_1Hz.txt" + ]; + await tutorial.checkResults(outFiles0.length); - await tutorial.openNodeFiles(2); - const outFiles1 = [ - "model_INPUT.from1D", - "y_1D.txt", - "logs.zip", - "ECGs.txt" - ]; - await tutorial.checkResults(outFiles1.length); + await tutorial.openNodeFiles(2); + const outFiles1 = [ + "model_INPUT.from1D", + "y_1D.txt", + "logs.zip", + "ECGs.txt" + ]; + await tutorial.checkResults(outFiles1.length); - await tutorial.openNodeFiles(3); - const outFiles2 = [ - "aps.zip", - "logs.zip" - ]; - await tutorial.checkResults(outFiles2.length); + await tutorial.openNodeFiles(3); + const outFiles2 = [ + "aps.zip", + "logs.zip" + ]; + await tutorial.checkResults(outFiles2.length); - // await tutorial.openNodeRetrieveAndRestart(4); + // await tutorial.openNodeRetrieveAndRestart(4); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/CC_Rabbit.js b/tests/e2e/portal/CC_Rabbit.js index 7a30ee2c910..2548caf37b3 100644 --- a/tests/e2e/portal/CC_Rabbit.js +++ b/tests/e2e/portal/CC_Rabbit.js @@ -17,49 +17,60 @@ const screenshotPrefix = "CCRabbit_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); - // Some time for loading the workbench - await tutorial.waitFor(10000); - await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); + // Some time for loading the workbench + await tutorial.waitFor(10000); + await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); - await tutorial.runPipeline(studyId, 1500000); - await utils.takeScreenshot(page, screenshotPrefix + 'after_1-2-3_run'); + await tutorial.runPipeline(studyId, 1500000); + await utils.takeScreenshot(page, screenshotPrefix + 'after_1-2-3_run'); - await tutorial.openNodeFiles(1); - const outFiles0 = [ - "logs.zip", - "allresult_1Hz.txt", - "vm_1Hz.txt" - ]; - await tutorial.checkResults(outFiles0.length); + await tutorial.openNodeFiles(1); + const outFiles0 = [ + "logs.zip", + "allresult_1Hz.txt", + "vm_1Hz.txt" + ]; + await tutorial.checkResults(outFiles0.length); - await tutorial.openNodeFiles(2); - const outFiles1 = [ - "model_INPUT.from1D", - "logs.zip", - "cai_1D.txt", - "ap_1D.txt", - "ECGs.txt" - ]; - await tutorial.checkResults(outFiles1.length); + await tutorial.openNodeFiles(2); + const outFiles1 = [ + "model_INPUT.from1D", + "logs.zip", + "cai_1D.txt", + "ap_1D.txt", + "ECGs.txt" + ]; + await tutorial.checkResults(outFiles1.length); - await tutorial.openNodeFiles(3); - const outFiles2 = [ - "aps.zip", - "logs.zip" - ]; - await tutorial.checkResults(outFiles2.length); + await tutorial.openNodeFiles(3); + const outFiles2 = [ + "aps.zip", + "logs.zip" + ]; + await tutorial.checkResults(outFiles2.length); - // await tutorial.openNodeRetrieveAndRestart(4); + // await tutorial.openNodeRetrieveAndRestart(4); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/Kember.js b/tests/e2e/portal/Kember.js index 33ffa9e5f73..c9c1bc68ec1 100644 --- a/tests/e2e/portal/Kember.js +++ b/tests/e2e/portal/Kember.js @@ -18,64 +18,75 @@ const screenshotPrefix = "Kember_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); - - // Some time for loading the workbench - await tutorial.waitFor(10000); - await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); - - await tutorial.runPipeline(studyId, 120000); - await utils.takeScreenshot(page, screenshotPrefix + 'pipeline_run'); - - await tutorial.openNodeFiles(0); - const outFiles = [ - "logs.zip", - "outputController.dat" - ]; - await tutorial.checkResults(outFiles.length); - - - // open kember viewer - auto.openNode(page, 1); - - await tutorial.waitFor(2000); - await utils.takeScreenshot(page, screenshotPrefix + 'iFrame0'); - const iframeHandles = await page.$$("iframe"); - // expected just one iframe = kember-notebook - const frame = await iframeHandles[0].contentFrame(); - - // restart kernel: click restart and accept - const restartSelector = "#run_int > button:nth-child(3)"; - await frame.waitForSelector(restartSelector); - await frame.click(restartSelector); - await tutorial.waitFor(2000); - await utils.takeScreenshot(page, screenshotPrefix + 'restart_pressed'); - const acceptSelector = "body > div.modal.fade.in > div > div > div.modal-footer > button.btn.btn-default.btn-sm.btn-danger"; - await frame.waitForSelector(acceptSelector); - await frame.click(acceptSelector); - await tutorial.waitFor(2000); - await utils.takeScreenshot(page, screenshotPrefix + 'restart_accept'); - - await tutorial.waitFor(20000); - await utils.takeScreenshot(page, screenshotPrefix + 'notebook_run'); - - // check output - await tutorial.openNodeFiles(1); - const outFiles2 = [ - "Hear_Rate.csv", - "notebooks.zip", - "Parasympathetic_Cell_Activity.csv", - "Table_Data.csv" - ]; - await tutorial.checkResults(outFiles2.length); - - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); + + // Some time for loading the workbench + await tutorial.waitFor(10000); + await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); + + await tutorial.runPipeline(studyId, 120000); + await utils.takeScreenshot(page, screenshotPrefix + 'pipeline_run'); + + await tutorial.openNodeFiles(0); + const outFiles = [ + "logs.zip", + "outputController.dat" + ]; + await tutorial.checkResults(outFiles.length); + + + // open kember viewer + auto.openNode(page, 1); + + await tutorial.waitFor(2000); + await utils.takeScreenshot(page, screenshotPrefix + 'iFrame0'); + const iframeHandles = await page.$$("iframe"); + // expected just one iframe = kember-notebook + const frame = await iframeHandles[0].contentFrame(); + + // restart kernel: click restart and accept + const restartSelector = "#run_int > button:nth-child(3)"; + await frame.waitForSelector(restartSelector); + await frame.click(restartSelector); + await tutorial.waitFor(2000); + await utils.takeScreenshot(page, screenshotPrefix + 'restart_pressed'); + const acceptSelector = "body > div.modal.fade.in > div > div > div.modal-footer > button.btn.btn-default.btn-sm.btn-danger"; + await frame.waitForSelector(acceptSelector); + await frame.click(acceptSelector); + await tutorial.waitFor(2000); + await utils.takeScreenshot(page, screenshotPrefix + 'restart_accept'); + + await tutorial.waitFor(20000); + await utils.takeScreenshot(page, screenshotPrefix + 'notebook_run'); + + // check output + await tutorial.openNodeFiles(1); + const outFiles2 = [ + "Hear_Rate.csv", + "notebooks.zip", + "Parasympathetic_Cell_Activity.csv", + "Table_Data.csv" + ]; + await tutorial.checkResults(outFiles2.length); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } + + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/Mattward.js b/tests/e2e/portal/Mattward.js index d833d849ad5..6f68185ec82 100644 --- a/tests/e2e/portal/Mattward.js +++ b/tests/e2e/portal/Mattward.js @@ -17,37 +17,48 @@ const screenshotPrefix = "Mattward_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); - - const workbenchData = utils.extractWorkbenchData(studyData["data"]); - await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][0]]); - - // Some time for starting the service - await tutorial.waitFor(20000); - await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); - - // This study opens in fullscreen mode - await tutorial.restoreIFrame(); - - await tutorial.openNodeFiles(0); - const outFiles = [ - "CAP_plot.csv", - "CV_plot.csv", - "Lpred_plot.csv", - "V_pred_plot.csv", - "input.csv", - "t_plot.csv", - "tst_plot.csv" - ]; - await tutorial.checkResults(outFiles.length); - - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); + + const workbenchData = utils.extractWorkbenchData(studyData["data"]); + await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][0]]); + + // Some time for starting the service + await tutorial.waitFor(20000); + await utils.takeScreenshot(page, screenshotPrefix + 'service_started'); + + // This study opens in fullscreen mode + await tutorial.restoreIFrame(); + + await tutorial.openNodeFiles(0); + const outFiles = [ + "CAP_plot.csv", + "CV_plot.csv", + "Lpred_plot.csv", + "V_pred_plot.csv", + "input.csv", + "t_plot.csv", + "tst_plot.csv" + ]; + await tutorial.checkResults(outFiles.length); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } + + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() diff --git a/tests/e2e/portal/opencor.js b/tests/e2e/portal/opencor.js index dd0bf5b8d01..c378d003d43 100644 --- a/tests/e2e/portal/opencor.js +++ b/tests/e2e/portal/opencor.js @@ -17,30 +17,41 @@ const screenshotPrefix = "Opencor_"; async function runTutorial () { const tutorial = new tutorialBase.TutorialBase(anonURL, screenshotPrefix, null, null, null, enableDemoMode); - tutorial.startScreenshooter(); - const page = await tutorial.beforeScript(); - const studyData = await tutorial.openStudyLink(); - const studyId = studyData["data"]["uuid"]; - console.log("Study ID:", studyId); - - // Some time for loading the workbench - await tutorial.waitFor(10000); - await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); - - await tutorial.runPipeline(studyId, 30000); - await utils.takeScreenshot(page, screenshotPrefix + 'pipeline_run'); - - await tutorial.openNodeFiles(0); - const outFiles = [ - "results.json", - "logs.zip", - "membrane-potential.csv" - ]; - await tutorial.checkResults(outFiles.length); - - await tutorial.logOut(); - tutorial.stopScreenshooter(); - await tutorial.close(); + try { + tutorial.startScreenshooter(); + const page = await tutorial.beforeScript(); + const studyData = await tutorial.openStudyLink(); + const studyId = studyData["data"]["uuid"]; + console.log("Study ID:", studyId); + + // Some time for loading the workbench + await tutorial.waitFor(10000); + await utils.takeScreenshot(page, screenshotPrefix + 'workbench_loaded'); + + await tutorial.runPipeline(studyId, 30000); + await utils.takeScreenshot(page, screenshotPrefix + 'pipeline_run'); + + await tutorial.openNodeFiles(0); + const outFiles = [ + "results.json", + "logs.zip", + "membrane-potential.csv" + ]; + await tutorial.checkResults(outFiles.length); + } + catch(err) { + tutorial.setTutorialFailed(true); + console.log('Tutorial error: ' + err); + } + finally { + await tutorial.logOut(); + tutorial.stopScreenshooter(); + await tutorial.close(); + } + + if (tutorial.getTutorialFailed()) { + throw "Tutorial Failed"; + } } runTutorial() From 7ea9d7ee8a62b5a0b375607c197ad95a657b22b0 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 14:22:00 +0100 Subject: [PATCH 17/21] throw error if "Timeout reached waiting for services" --- tests/e2e/tutorials/tutorialBase.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/e2e/tutorials/tutorialBase.js b/tests/e2e/tutorials/tutorialBase.js index b6a52d5c09c..c29ef46b90a 100644 --- a/tests/e2e/tutorials/tutorialBase.js +++ b/tests/e2e/tutorials/tutorialBase.js @@ -220,8 +220,9 @@ class TutorialBase { return; } } - console.log("Timeout reached waiting for services", ((new Date().getTime()) - start) / 1000); - return; + const errorMsg = "Timeout reached waiting for services"; + console.log(errorMsg, ((new Date().getTime()) - start) / 1000); + throw new Error(errorMsg); } async waitForStudyRun(studyId, timeout = 60000) { From 63d892fdc33903cb7327ee499a83cb7424377526 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 16:43:18 +0100 Subject: [PATCH 18/21] removed fake categories --- .../osparc/component/filter/NodeTypeFilter.js | 2 - .../osparc/component/service/ServiceJumbo.js | 3 +- .../osparc/component/workbench/NodeUI.js | 4 - .../dashboard/ServiceBrowserListItem.js | 5 +- .../source/class/osparc/utils/Services.js | 207 ------------------ 5 files changed, 3 insertions(+), 218 deletions(-) diff --git a/services/web/client/source/class/osparc/component/filter/NodeTypeFilter.js b/services/web/client/source/class/osparc/component/filter/NodeTypeFilter.js index 6547d58662e..76e34125dfc 100644 --- a/services/web/client/source/class/osparc/component/filter/NodeTypeFilter.js +++ b/services/web/client/source/class/osparc/component/filter/NodeTypeFilter.js @@ -39,8 +39,6 @@ qx.Class.define("osparc.component.filter.NodeTypeFilter", { */ __buildMenu: function() { osparc.utils.Services.getTypes().forEach(serviceType => this._addOption(osparc.utils.Utils.capitalize(serviceType))); - this._addSeparator(); - osparc.utils.Services.getCategories().forEach(serviceCategory => this._addOption(osparc.utils.Utils.capitalize(serviceCategory))); } } }); diff --git a/services/web/client/source/class/osparc/component/service/ServiceJumbo.js b/services/web/client/source/class/osparc/component/service/ServiceJumbo.js index 0f34f4b7d45..40deac7db0e 100644 --- a/services/web/client/source/class/osparc/component/service/ServiceJumbo.js +++ b/services/web/client/source/class/osparc/component/service/ServiceJumbo.js @@ -63,9 +63,8 @@ qx.Class.define("osparc.component.service.ServiceJumbo", { } } if (data.tags && data.tags.length) { - const category = this.getServiceModel().getCategory ? this.getServiceModel().getCategory() : ""; const type = this.getServiceModel().getType() || ""; - if (!data.tags.includes(osparc.utils.Utils.capitalize(category.trim())) && !data.tags.includes(osparc.utils.Utils.capitalize(type.trim()))) { + if (!data.tags.includes(osparc.utils.Utils.capitalize(type.trim()))) { return true; } } diff --git a/services/web/client/source/class/osparc/component/workbench/NodeUI.js b/services/web/client/source/class/osparc/component/workbench/NodeUI.js index 812858d34ae..71307adfaa7 100644 --- a/services/web/client/source/class/osparc/component/workbench/NodeUI.js +++ b/services/web/client/source/class/osparc/component/workbench/NodeUI.js @@ -140,15 +140,11 @@ qx.Class.define("osparc.component.workbench.NodeUI", { control = new qx.ui.container.Composite(new qx.ui.layout.Flow(3, 3)).set({ margin: [3, 4] }); - const category = this.getNode().isContainer() ? null : osparc.utils.Services.getCategory(this.getNode().getMetaData().category); const nodeType = this.getNode().isContainer() ? "container" : this.getNode().getMetaData().type; const type = osparc.utils.Services.getType(nodeType); if (type) { control.add(new osparc.ui.basic.Chip(type.label, type.icon + "12")); } - if (category) { - control.add(new osparc.ui.basic.Chip(category.label, category.icon + "12")); - } this.add(control, { row: 1, column: 0 diff --git a/services/web/client/source/class/osparc/dashboard/ServiceBrowserListItem.js b/services/web/client/source/class/osparc/dashboard/ServiceBrowserListItem.js index 27e2f7fb39e..d18fe367fbe 100644 --- a/services/web/client/source/class/osparc/dashboard/ServiceBrowserListItem.js +++ b/services/web/client/source/class/osparc/dashboard/ServiceBrowserListItem.js @@ -261,10 +261,9 @@ qx.Class.define("osparc.dashboard.ServiceBrowserListItem", { return true; } } - if (data.tags && data.tags.length && this.getCategory()) { - const category = this.getCategory() || ""; + if (data.tags && data.tags.length) { const type = this.getType() || ""; - if (!data.tags.includes(osparc.utils.Utils.capitalize(category.trim())) && !data.tags.includes(osparc.utils.Utils.capitalize(type.trim()))) { + if (!data.tags.includes(osparc.utils.Utils.capitalize(type.trim()))) { return true; } } diff --git a/services/web/client/source/class/osparc/utils/Services.js b/services/web/client/source/class/osparc/utils/Services.js index 96f96e33f27..da5bda24914 100644 --- a/services/web/client/source/class/osparc/utils/Services.js +++ b/services/web/client/source/class/osparc/utils/Services.js @@ -32,34 +32,6 @@ qx.Class.define("osparc.utils.Services", { type: "static", statics: { - - CATEGORIES: { - postpro: { - label: "Postpro", - icon: "@FontAwesome5Solid/chart-bar/" - }, - notebook: { - label: "Notebook", - icon: "@FontAwesome5Solid/file-code/" - }, - solver: { - label: "Solver", - icon: "@FontAwesome5Solid/calculator/" - }, - simulator: { - label: "Simulator", - icon: "@FontAwesome5Solid/brain/" - }, - modeling: { - label: "Modeling", - icon: "@FontAwesome5Solid/cube/" - }, - data: { - label: "Data", - icon: "@FontAwesome5Solid/file/" - } - }, - TYPES: { computational: { label: "Computational", @@ -81,14 +53,6 @@ qx.Class.define("osparc.utils.Services", { return Object.keys(this.TYPES); }, - getCategories: function() { - return Object.keys(this.CATEGORIES); - }, - - getCategory: function(category) { - return this.CATEGORIES[category.trim().toLowerCase()]; - }, - getType: function(type) { return this.TYPES[type.trim().toLowerCase()]; }, @@ -229,184 +193,13 @@ qx.Class.define("osparc.utils.Services", { }, __addExtraInfo: function(services) { - const categories = this.__getCategories(); Object.values(services).forEach(serviceWVersion => { Object.values(serviceWVersion).forEach(service => { - if (Object.prototype.hasOwnProperty.call(categories, service["key"])) { - service["category"] = categories[service["key"]]["category"]; - } else { - service["category"] = "Unknown"; - } if (osparc.data.model.Node.isComputational(service)) { osparc.component.metadata.Quality.attachQualityToObject(service); } }); }); - }, - - __getCategories: function() { - return { - "simcore/services/frontend/file-picker": { - "category": "Data" - }, - "simcore/services/dynamic/mattward-viewer": { - "category": "Solver" - }, - "simcore/services/dynamic/bornstein-viewer": { - "category": "Solver" - }, - "simcore/services/dynamic/cc-0d-viewer": { - "category": "PostPro" - }, - "simcore/services/dynamic/cc-1d-viewer": { - "category": "PostPro" - }, - "simcore/services/dynamic/cc-2d-viewer": { - "category": "PostPro" - }, - "simcore/services/dynamic/raw-graphs": { - "category": "PostPro" - }, - "simcore/services/dynamic/3d-viewer": { - "category": "PostPro" - }, - "simcore/services/dynamic/3d-viewer-gpu": { - "category": "PostPro" - }, - "simcore/services/dynamic/jupyter-r-notebook": { - "category": "Notebook" - }, - "simcore/services/dynamic/jupyter-base-notebook": { - "category": "Notebook" - }, - "simcore/services/dynamic/jupyter-scipy-notebook": { - "category": "Notebook" - }, - "simcore/services/comp/rabbit-ss-0d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/rabbit-ss-1d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/rabbit-ss-2d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/human-gb-0d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/human-gb-1d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/human-gb-2d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/human-ord-0d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/human-ord-1d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/human-ord-2d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/osparc-opencor": { - "category": "Solver" - }, - - "simcore/services/comp/itis/sleeper": { - "category": "Solver" - }, - "simcore/services/comp/itis/isolve-emlf": { - "category": "Solver" - }, - "simcore/services/comp/itis/neuron-isolve": { - "category": "Solver" - }, - "simcore/services/comp/ucdavis-singlecell-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/ucdavis-1d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/ucdavis-2d-cardiac-model": { - "category": "Solver" - }, - "simcore/services/comp/kember-cardiac-model": { - "category": "Solver" - }, - "simcore/services/demodec/computational/itis/Solver-LF": { - "category": "Solver" - }, - "simcore/services/demodec/container/itis/s4l/Simulator/LF": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/MaterialDB": { - "category": "Solver" - }, - "simcore/services/demodec/dynamic/itis/s4l/Modeler": { - "category": "Modeling" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/Boundary": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/Grid": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/Materials": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/Sensors": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/Setup": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/SolverSettings": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/LF/Voxel": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/NetworkConnection": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/Neurons": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/PointProcesses": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/Sensors": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/Setup": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/SolverSettings": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/Simulator/Neuron/Sources": { - "category": "Simulator" - }, - "simcore/services/demodec/dynamic/itis/s4l/StimulationSelectivity": { - "category": "PostPro" - }, - "simcore/services/demodec/dynamic/itis/s4l/neuroman": { - "category": "Modeling" - }, - "simcore/services/dynamic/kember-viewer": { - "category": "PostPro" - }, - "simcore/services/dynamic/modeler/webserver": { - "category": "Modeling" - }, - "simcore/services/dynamic/modeler/webserverwithrat": { - "category": "Modeling" - }, - "simcore/services/frontend/multi-plot": { - "category": "PostPro" - } - }; } } }); From 85e818d769f284195ccfdee00f2bcc7f2cd20d84 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 16:49:00 +0100 Subject: [PATCH 19/21] minor aesthetics --- .../class/osparc/component/filter/group/ServiceFilterGroup.js | 2 +- .../class/osparc/component/filter/group/StudyFilterGroup.js | 2 +- .../class/osparc/component/service/manager/ActivityManager.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/client/source/class/osparc/component/filter/group/ServiceFilterGroup.js b/services/web/client/source/class/osparc/component/filter/group/ServiceFilterGroup.js index 7d618cd2539..4e9088077de 100644 --- a/services/web/client/source/class/osparc/component/filter/group/ServiceFilterGroup.js +++ b/services/web/client/source/class/osparc/component/filter/group/ServiceFilterGroup.js @@ -27,7 +27,7 @@ qx.Class.define("osparc.component.filter.group.ServiceFilterGroup", { */ construct: function(filterGroupId) { this.base(arguments); - this._setLayout(new qx.ui.layout.HBox()); + this._setLayout(new qx.ui.layout.HBox(5)); this.__filterGroupId = filterGroupId; const textFilter = this.__textFilter = new osparc.component.filter.TextFilter("text", filterGroupId); osparc.utils.Utils.setIdToWidget(textFilter, "serviceFiltersTextFld"); diff --git a/services/web/client/source/class/osparc/component/filter/group/StudyFilterGroup.js b/services/web/client/source/class/osparc/component/filter/group/StudyFilterGroup.js index 033cd093db7..d21a9a1403a 100644 --- a/services/web/client/source/class/osparc/component/filter/group/StudyFilterGroup.js +++ b/services/web/client/source/class/osparc/component/filter/group/StudyFilterGroup.js @@ -18,7 +18,7 @@ qx.Class.define("osparc.component.filter.group.StudyFilterGroup", { */ construct: function(filterGroupId) { this.base(arguments); - this._setLayout(new qx.ui.layout.HBox()); + this._setLayout(new qx.ui.layout.HBox(5)); this.__textFilter = new osparc.component.filter.TextFilter("text", filterGroupId); this.__textFilter.getChildControl("textfield").setFont("text-14"); diff --git a/services/web/client/source/class/osparc/component/service/manager/ActivityManager.js b/services/web/client/source/class/osparc/component/service/manager/ActivityManager.js index 7e97008a273..aa31dcace63 100644 --- a/services/web/client/source/class/osparc/component/service/manager/ActivityManager.js +++ b/services/web/client/source/class/osparc/component/service/manager/ActivityManager.js @@ -48,7 +48,7 @@ qx.Class.define("osparc.component.service.manager.ActivityManager", { const filtersPart = new qx.ui.toolbar.Part(); toolbar.add(filtersPart); - const filtersContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox()); + const filtersContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox(5)); const nameFilter = new osparc.component.filter.TextFilter("name", "activityMonitor"); const studyFilter = this.__studyFilter = new osparc.component.filter.StudyFilter("study", "activityMonitor"); filtersContainer.add(nameFilter); From f31b81f40c023567b1f8bc4a37323384cd7251bc Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 17:10:01 +0100 Subject: [PATCH 20/21] minor --- .../source/class/osparc/component/workbench/WorkbenchUI.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index 94f7c13f03d..dbc57864ad7 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -1149,6 +1149,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { this.__workbenchLayout.addListener("tap", () => { this.resetSelectedNodes(); + this.__selectedItemChanged(null); }, this); this.__workbenchLayout.addListener("dbltap", pointerEvent => { @@ -1163,9 +1164,6 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { this.__workbenchLayout.addListener("resize", () => this.__updateHint(), this); - this.__workbenchLayout.addListener("tap", e => { - this.__selectedItemChanged(null); - }, this); }, __allowDrag: function(pointerEvent) { From 5b4395faf59771ba7200122c8aacd1d696e98b42 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Thu, 28 Jan 2021 17:19:08 +0100 Subject: [PATCH 21/21] linter --- .../source/class/osparc/component/workbench/WorkbenchUI.js | 1 - 1 file changed, 1 deletion(-) diff --git a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js index dbc57864ad7..2501f888f00 100644 --- a/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js +++ b/services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js @@ -1163,7 +1163,6 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", { }, this); this.__workbenchLayout.addListener("resize", () => this.__updateHint(), this); - }, __allowDrag: function(pointerEvent) {