From 1c918c2dd68f38de7a9ab432ffb55fc807edb2c5 Mon Sep 17 00:00:00 2001 From: Odei Maiz <33152403+odeimaiz@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:47:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20[Frontend]=20TIP:=20Hide=20Boot?= =?UTF-8?q?=20Options=20(#6316)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/class/osparc/dashboard/ResourceDetails.js | 5 ++++- .../client/source/class/osparc/data/Permissions.js | 2 ++ .../client/source/class/osparc/desktop/WorkbenchView.js | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js b/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js index 7a32749e1b5..88675e85166 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js @@ -672,7 +672,10 @@ qx.Class.define("osparc.dashboard.ResourceDetails", { __getServicesBootOptionsPage: function() { const resourceData = this.__resourceData; - if (osparc.utils.Resources.isService(resourceData)) { + if ( + osparc.utils.Resources.isService(resourceData) || + !osparc.data.Permissions.getInstance().canDo("study.node.bootOptions.read") + ) { return null; } diff --git a/services/static-webserver/client/source/class/osparc/data/Permissions.js b/services/static-webserver/client/source/class/osparc/data/Permissions.js index b4e99c3c604..f4557b9b6bd 100644 --- a/services/static-webserver/client/source/class/osparc/data/Permissions.js +++ b/services/static-webserver/client/source/class/osparc/data/Permissions.js @@ -115,6 +115,7 @@ qx.Class.define("osparc.data.Permissions", { "study.node.data.push", "study.node.data.delete", "study.node.export", + "study.node.bootOptions.read", "study.edge.create", "study.edge.delete", "study.classifier", @@ -153,6 +154,7 @@ qx.Class.define("osparc.data.Permissions", { fromUserToTester = [ "dashboard.templates.read", "dashboard.services.read", + "study.node.bootOptions.read", "study.slides.edit", "study.slides.stop" ]; 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 a8b4aa0b8f9..ad1c351f072 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js +++ b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js @@ -1012,6 +1012,14 @@ qx.Class.define("osparc.desktop.WorkbenchView", { this.__serviceOptionsPage.bind("width", vBox, "width"); + // HEADER + const nodeMetadata = node.getMetaData(); + const version = osparc.service.Utils.getVersionDisplay(nodeMetadata["key"], nodeMetadata["version"]); + const header = new qx.ui.basic.Label(`${nodeMetadata["name"]} ${version}`).set({ + paddingLeft: 5 + }); + vBox.add(header); + // INPUTS FORM if (node.isPropertyInitialized("propsForm") && node.getPropsForm()) { const inputsForm = node.getPropsForm();