diff --git a/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js b/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js index 5cc4f16fe71..21b09135f4d 100644 --- a/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js +++ b/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js @@ -26,7 +26,8 @@ qx.Class.define("osparc.editor.HtmlEditor", { this.getChildControl("preview-html"); this.getChildControl("subtitle").set({ - value: this.tr("Supports HTML") + value: this.tr("Supports HTML"), + url: "https://en.wikipedia.org/wiki/HTML", }); }, diff --git a/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js b/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js index 2d08dc0bcf6..0aa96f7781c 100644 --- a/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js +++ b/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js @@ -31,7 +31,8 @@ qx.Class.define("osparc.editor.MarkdownEditor", { this.getChildControl("preview-markdown"); this.getChildControl("subtitle").set({ - value: this.tr("Markdown supported") + value: this.tr("Markdown supported"), + url: "https://en.wikipedia.org/wiki/Markdown", }); }, diff --git a/services/static-webserver/client/source/class/osparc/editor/TextEditor.js b/services/static-webserver/client/source/class/osparc/editor/TextEditor.js index 6aacc3c560f..1acf44f50b5 100644 --- a/services/static-webserver/client/source/class/osparc/editor/TextEditor.js +++ b/services/static-webserver/client/source/class/osparc/editor/TextEditor.js @@ -81,15 +81,13 @@ qx.Class.define("osparc.editor.TextEditor", { writePage.add(control, { flex: 1 }); - const subtitle = this.getChildControl("subtitle").set({ - value: this.tr("Supports HTML") - }); + const subtitle = this.getChildControl("subtitle"); writePage.add(subtitle); tabs.add(writePage); break; } case "subtitle": - control = new qx.ui.basic.Label().set({ + control = new osparc.ui.basic.LinkLabel().set({ font: "text-12" }); this._add(control); diff --git a/services/static-webserver/client/source/class/osparc/info/CommentUI.js b/services/static-webserver/client/source/class/osparc/info/CommentUI.js index d945cd65f8e..22263198564 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentUI.js +++ b/services/static-webserver/client/source/class/osparc/info/CommentUI.js @@ -113,10 +113,8 @@ qx.Class.define("osparc.info.CommentUI", { __buildLayout: function() { const thumbnail = this.getChildControl("thumbnail"); - thumbnail.setSource(osparc.utils.Avatar.emailToThumbnail("", "", 32)); const userName = this.getChildControl("user-name"); - userName.setValue("Unknown"); const date = new Date(this.__comment["modified"]); const date2 = osparc.utils.Utils.formatDateAndTime(date); @@ -131,7 +129,14 @@ qx.Class.define("osparc.info.CommentUI", { if (user) { thumbnail.setSource(user.getThumbnail()); userName.setValue(user.getLabel()); + } else { + thumbnail.setSource(osparc.utils.Avatar.emailToThumbnail()); + userName.setValue("Unknown user"); } + }) + .catch(() => { + thumbnail.setSource(osparc.utils.Avatar.emailToThumbnail()); + userName.setValue("Unknown user"); }); this.getChildControl("spacer"); diff --git a/services/static-webserver/client/source/class/osparc/store/Services.js b/services/static-webserver/client/source/class/osparc/store/Services.js index c77b31b54c2..7d4903235bf 100644 --- a/services/static-webserver/client/source/class/osparc/store/Services.js +++ b/services/static-webserver/client/source/class/osparc/store/Services.js @@ -385,11 +385,18 @@ qx.Class.define("osparc.store.Services", { }, __addToCache: function(key, version, value) { - // some services that go to the cache are not complete, e.g. study services + // some services that go to the cache are not complete: /latest, /study/services // if the one in the cache is the complete one, do not overwrite it if ( this.__isInCache(key, version) && - "inputs" in this.__servicesCached[key][version] + "history" in this.__servicesCached[key][version] // the most complete service metadata is already in cache + ) { + return; + } + if ( + this.__isInCache(key, version) && + "inputs" in this.__servicesCached[key][version] && // this is the second most complete service metadata (/latest) + value && !("inputs" in value) // the one to be added is not more complete ) { return; } diff --git a/services/static-webserver/client/source/class/osparc/store/Users.js b/services/static-webserver/client/source/class/osparc/store/Users.js index 693df0b59c7..2b0ecfbe33c 100644 --- a/services/static-webserver/client/source/class/osparc/store/Users.js +++ b/services/static-webserver/client/source/class/osparc/store/Users.js @@ -19,6 +19,12 @@ qx.Class.define("osparc.store.Users", { extend: qx.core.Object, type: "singleton", + construct: function() { + this.base(arguments); + + this.__unknowns = []; + }, + properties: { users: { check: "Array", @@ -28,6 +34,8 @@ qx.Class.define("osparc.store.Users", { }, members: { + __unknowns: null, + __fetchUser: function(groupId) { const params = { url: { @@ -38,10 +46,17 @@ qx.Class.define("osparc.store.Users", { .then(userData => { const user = this.addUser(userData[0]); return user; + }) + .catch(() => { + this.__unknowns.push(groupId); + return null; }); }, getUser: async function(groupId, fetchIfNotFound = true) { + if (this.__unknowns.includes(groupId)) { + return null; + } const userFound = this.getUsers().find(user => user.getGroupId() === groupId); if (userFound) { return userFound; diff --git a/services/static-webserver/client/source/class/osparc/utils/Avatar.js b/services/static-webserver/client/source/class/osparc/utils/Avatar.js index c108a661355..a43544718eb 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Avatar.js +++ b/services/static-webserver/client/source/class/osparc/utils/Avatar.js @@ -34,11 +34,7 @@ qx.Class.define("osparc.utils.Avatar", { type: "static", statics: { - emailToThumbnail: function(email, username) { - return this.__getUrl(email, username, 32); - }, - - __getUrl: function(email, username, size = 100) { + emailToThumbnail: function(email, username = "??", size = 32) { email = email || ""; // MD5 (Message-Digest Algorithm) by WebToolkit const MD5 = function(s) { diff --git a/services/static-webserver/client/source/resource/osparc/ui_config.json b/services/static-webserver/client/source/resource/osparc/ui_config.json index 157e0426c57..655adf60f86 100644 --- a/services/static-webserver/client/source/resource/osparc/ui_config.json +++ b/services/static-webserver/client/source/resource/osparc/ui_config.json @@ -156,6 +156,11 @@ "title": "${replace_me_product_name}", "newStudyLabel": "New Project", "idToWidget": "startS4LButton" + }, { + "resourceType": "service", + "expectedKey": "simcore/services/dynamic/s4l-ui-framework", + "title": "Sim4Life.framework", + "newStudyLabel": "Sim4Life.framework" }] } },