From 574d18f6e24151a9da41b0ea7f5b319041c6e396 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 7 Feb 2022 12:24:43 +0100 Subject: [PATCH 1/3] minor --- .../source/class/osparc/ui/message/Loading.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/services/web/client/source/class/osparc/ui/message/Loading.js b/services/web/client/source/class/osparc/ui/message/Loading.js index 509466b64d1..d73ac0c8fce 100644 --- a/services/web/client/source/class/osparc/ui/message/Loading.js +++ b/services/web/client/source/class/osparc/ui/message/Loading.js @@ -40,10 +40,17 @@ qx.Class.define("osparc.ui.message.Loading", { this.base(arguments); this._setLayout(new qx.ui.layout.HBox()); + this.set({ + alignX: "center" + }); this.__buildLayout(showMaximize); - this.setHeader(header); - this.setMessages(messages); + if (header) { + this.setHeader(header); + } + if (messages.length) { + this.setMessages(messages); + } }, properties: { @@ -88,22 +95,19 @@ qx.Class.define("osparc.ui.message.Loading", { }); atom.getChildControl("icon").getContentElement().addClass("rotate"); - const messages = this.__messages = new qx.ui.container.Composite(new qx.ui.layout.VBox(10)).set({ + const messages = this.__messages = new qx.ui.container.Composite(new qx.ui.layout.VBox(10).set({ + alignX: "center" + })).set({ padding: 20 }); const loadingWidget = new qx.ui.container.Composite(new qx.ui.layout.VBox().set({ + alignX: "center", alignY: "middle" })); - loadingWidget.add(new qx.ui.core.Widget(), { - flex: 1 - }); loadingWidget.add(image); loadingWidget.add(atom); loadingWidget.add(messages); - loadingWidget.add(new qx.ui.core.Widget(), { - flex: 1 - }); this._add(new qx.ui.core.Widget(), { flex: 1 From afb0d33709372831940134c84a170ba6a5bb661a Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 7 Feb 2022 12:31:29 +0100 Subject: [PATCH 2/3] last cosmetics on Loading page --- services/web/client/source/class/osparc/ui/message/Loading.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/client/source/class/osparc/ui/message/Loading.js b/services/web/client/source/class/osparc/ui/message/Loading.js index d73ac0c8fce..5ac01567f9d 100644 --- a/services/web/client/source/class/osparc/ui/message/Loading.js +++ b/services/web/client/source/class/osparc/ui/message/Loading.js @@ -91,7 +91,8 @@ qx.Class.define("osparc.ui.message.Loading", { icon: "@FontAwesome5Solid/circle-notch/32", font: "nav-bar-label", alignX: "center", - gap: 15 + gap: 15, + allowGrowX: false }); atom.getChildControl("icon").getContentElement().addClass("rotate"); From 8e45b97c94c216fc381029a4d231250701e5c504 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Mon, 7 Feb 2022 12:33:36 +0100 Subject: [PATCH 3/3] Show loading message for Nature Publication services --- .../source/class/osparc/data/model/Node.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/services/web/client/source/class/osparc/data/model/Node.js b/services/web/client/source/class/osparc/data/model/Node.js index db091cc77a6..e84b1131b9e 100644 --- a/services/web/client/source/class/osparc/data/model/Node.js +++ b/services/web/client/source/class/osparc/data/model/Node.js @@ -872,14 +872,19 @@ qx.Class.define("osparc.data.model.Node", { return this.tr("Starting ") + label; }, + __getExtraMessages: function() { + if (this.getKey() && this.getKey().includes("pub-nat-med")) { + return [ + this.tr("This might take a couple of minutes") + ]; + } + return []; + }, + __initLoadingIPage: function() { - const loadingPage = new osparc.ui.message.Loading(this.__getLoadingPageHeader(), [], true); - this.addListener("changeLabel", e => { - loadingPage.setHeader(this.__getLoadingPageHeader()); - }, this); - this.getStatus().addListener("changeInteractive", e => { - loadingPage.setHeader(this.__getLoadingPageHeader()); - }, this); + const loadingPage = new osparc.ui.message.Loading(this.__getLoadingPageHeader(), this.__getExtraMessages(), true); + this.addListener("changeLabel", () => loadingPage.setHeader(this.__getLoadingPageHeader()), this); + this.getStatus().addListener("changeInteractive", () => loadingPage.setHeader(this.__getLoadingPageHeader()), this); this.setLoadingPage(loadingPage); },