diff --git a/services/static-webserver/client/source/class/osparc/data/Resources.js b/services/static-webserver/client/source/class/osparc/data/Resources.js index fecd1b5c09e..afd3b79c0b8 100644 --- a/services/static-webserver/client/source/class/osparc/data/Resources.js +++ b/services/static-webserver/client/source/class/osparc/data/Resources.js @@ -1259,7 +1259,7 @@ qx.Class.define("osparc.data.Resources", { method: "POST", url: statics.API + "/tags" }, - put: { + patch: { method: "PATCH", url: statics.API + "/tags/{tagId}" }, diff --git a/services/static-webserver/client/source/class/osparc/data/model/Node.js b/services/static-webserver/client/source/class/osparc/data/model/Node.js index 7a37517f898..25e6c86e2b6 100644 --- a/services/static-webserver/client/source/class/osparc/data/model/Node.js +++ b/services/static-webserver/client/source/class/osparc/data/model/Node.js @@ -115,12 +115,6 @@ qx.Class.define("osparc.data.model.Node", { event: "changeServiceUrl" }, - thumbnail: { - check: "String", - nullable: true, - init: "" - }, - portsConnected: { check: "Array", init: [], @@ -421,9 +415,12 @@ qx.Class.define("osparc.data.model.Node", { __getInputUnits: function() { if (this.isPropertyInitialized("propsForm") && this.getPropsForm()) { - return this.getPropsForm().getChangedXUnits(); + const changedUnits = this.getPropsForm().getChangedXUnits(); + if (Object.keys(changedUnits).length) { + return changedUnits; + } } - return {}; + return null; }, getInput: function(inputId) { @@ -478,9 +475,6 @@ qx.Class.define("osparc.data.model.Node", { } this.populateInputOutputData(nodeData); this.populateStates(nodeData); - if (nodeData.thumbnail) { - this.setThumbnail(nodeData.thumbnail); - } if (nodeData.bootOptions) { this.setBootOptions(nodeData.bootOptions); } @@ -1254,7 +1248,6 @@ qx.Class.define("osparc.data.model.Node", { inputAccess: this.getInputAccess(), inputNodes: this.getInputNodes(), inputsRequired: this.getInputsRequired(), - thumbnail: this.getThumbnail(), bootOptions: this.getBootOptions() }; if (!clean) { diff --git a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js index 871afbf33b2..a735b2532d6 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js +++ b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js @@ -790,24 +790,33 @@ qx.Class.define("osparc.desktop.WorkbenchView", { this.__studyOptionsPage.getChildControl("button").show(); this.getChildControl("side-panel-right-tabs").setSelection([this.__studyOptionsPage]); - this.__studyOptionsPage.add(new osparc.info.StudyMedium(study), { + const scrollView = new qx.ui.container.Scroll(); + const secondaryColumnStudyContent = new qx.ui.container.Composite(new qx.ui.layout.VBox(15)).set({ + backgroundColor: "transparent" + }); + scrollView.add(secondaryColumnStudyContent); + this.__studyOptionsPage.add(scrollView, { + flex: 1 + }); + + secondaryColumnStudyContent.add(new osparc.info.StudyMedium(study), { flex: 1 }); - this.__studyOptionsPage.add(this.__getSlideshowSection()); + secondaryColumnStudyContent.add(this.__getSlideshowSection()); - this.__studyOptionsPage.add(this.__getAnnotationsSection()); + secondaryColumnStudyContent.add(this.__getAnnotationsSection()); const snaps = this.__getSnapshotsSection(); snaps.exclude(); const isVCDisabled = osparc.utils.DisabledPlugins.isVersionControlDisabled(); snaps.setVisibility(isVCDisabled ? "excluded" : "visible"); - this.__studyOptionsPage.add(snaps); + secondaryColumnStudyContent.add(snaps); const iters = this.__getIterationsSection(); const isMMDisabled = osparc.utils.DisabledPlugins.isMetaModelingDisabled(); snaps.setVisibility(isMMDisabled ? "excluded" : "visible"); - this.__studyOptionsPage.add(iters); + secondaryColumnStudyContent.add(iters); }, __getSlideshowSection: function() { diff --git a/services/static-webserver/client/source/class/osparc/form/tag/TagItem.js b/services/static-webserver/client/source/class/osparc/form/tag/TagItem.js index 97600c48bd4..c1a458426c7 100644 --- a/services/static-webserver/client/source/class/osparc/form/tag/TagItem.js +++ b/services/static-webserver/client/source/class/osparc/form/tag/TagItem.js @@ -275,7 +275,7 @@ qx.Class.define("osparc.form.tag.TagItem", { saveButton.setFetching(true); const tagsStore = osparc.store.Tags.getInstance(); if (this.isPropertyInitialized("id")) { - tagsStore.putTag(this.getId(), data) + tagsStore.patchTag(this.getId(), data) .then(tag => this.setTag(tag)) .catch(console.error) .finally(() => { @@ -336,7 +336,7 @@ qx.Class.define("osparc.form.tag.TagItem", { return { name: name.trim(), description: description ? description.trim() : "", - color: color + color: color, }; }, __applyMode: function() { diff --git a/services/static-webserver/client/source/class/osparc/share/Collaborators.js b/services/static-webserver/client/source/class/osparc/share/Collaborators.js index cdeeb99c419..6eedcc1483f 100644 --- a/services/static-webserver/client/source/class/osparc/share/Collaborators.js +++ b/services/static-webserver/client/source/class/osparc/share/Collaborators.js @@ -194,7 +194,7 @@ qx.Class.define("osparc.share.Collaborators", { switch (this._resourceType) { case "study": case "template": - canIShare = osparc.study.Utils.canIWrite(this._serializedDataCopy["accessRights"]); + canIShare = osparc.data.model.Study.canIWrite(this._serializedDataCopy["accessRights"]); break; case "service": canIShare = osparc.service.Utils.canIWrite(this._serializedDataCopy["accessRights"]); diff --git a/services/static-webserver/client/source/class/osparc/store/Tags.js b/services/static-webserver/client/source/class/osparc/store/Tags.js index dcc0c15cbd6..c2830262cd9 100644 --- a/services/static-webserver/client/source/class/osparc/store/Tags.js +++ b/services/static-webserver/client/source/class/osparc/store/Tags.js @@ -88,15 +88,19 @@ qx.Class.define("osparc.store.Tags", { .catch(console.error); }, - putTag: function(tagId, updateData) { + patchTag: function(tagId, updateData) { const params = { url: { tagId }, data: updateData }; - return osparc.data.Resources.getInstance().fetch("tags", "put", params) + return osparc.data.Resources.getInstance().fetch("tags", "patch", params) .then(tagData => { + if ("accessRights" in tagData) { + // accessRights are not patched in this endpoint + delete tagData["accessRights"]; + } return this.__addToCache(tagData); }) .catch(console.error); diff --git a/services/static-webserver/client/source/class/osparc/workbench/NodeUI.js b/services/static-webserver/client/source/class/osparc/workbench/NodeUI.js index ce0bdb71043..cc1af9a52e3 100644 --- a/services/static-webserver/client/source/class/osparc/workbench/NodeUI.js +++ b/services/static-webserver/client/source/class/osparc/workbench/NodeUI.js @@ -203,9 +203,6 @@ qx.Class.define("osparc.workbench.NodeUI", { __createWindowLayout: function() { const node = this.getNode(); - if (node.getThumbnail()) { - this.setThumbnail(node.getThumbnail()); - } this.getChildControl("chips").show(); diff --git a/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js b/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js index 37279ed42c1..19a123cf547 100644 --- a/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js +++ b/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js @@ -1140,7 +1140,6 @@ qx.Class.define("osparc.workbench.WorkbenchUI", { // create nodes const nodes = model.getNodes(); this.__renderNodes(nodes); - qx.ui.core.queue.Layout.flush(); this.__renderAnnotations(model.getStudy().getUi()); } }, @@ -1154,7 +1153,14 @@ qx.Class.define("osparc.workbench.WorkbenchUI", { nodeUI.addListenerOnce("appear", () => { nNodesToRender--; if (nNodesToRender === 0) { + // all nodes rendered this.__renderEdges(nodes); + + setTimeout(() => { + // move to position (0, 0) + this._workbenchLayoutScroll.scrollToX(0); + this._workbenchLayoutScroll.scrollToY(0); + }, 10); } }, this); this._addNodeUIToWorkbench(nodeUI, node.getPosition());