Skip to content

Commit b2062ce

Browse files
committed
showConvertToPipeline
1 parent 6f59d5b commit b2062ce

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,12 +1598,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
15981598
const duplicateStudyButton = this.__getDuplicateMenuButton(studyData);
15991599
menu.add(duplicateStudyButton);
16001600

1601-
if (writeAccess) {
1601+
if (writeAccess && osparc.product.Utils.showConvertToPipeline()) {
16021602
const convertToPipelineButton = this.__getConvertToPipelineMenuButton(studyData);
16031603
menu.add(convertToPipelineButton);
16041604
}
16051605

1606-
if (osparc.product.Utils.hasExportCMisEnabled()) {
1606+
if (osparc.product.Utils.showExportCMis()) {
16071607
const exportStudyButton = this.__getExportCMisMenuButton(studyData);
16081608
menu.add(exportStudyButton);
16091609
}

services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", {
111111
optionsMenu.add(this.getChildControl("study-menu-info"));
112112
optionsMenu.add(this.getChildControl("study-menu-reload"));
113113
optionsMenu.add(this.getChildControl("study-menu-conversations"));
114-
optionsMenu.add(this.getChildControl("study-menu-convert-to-pipeline"));
115-
optionsMenu.add(this.getChildControl("study-menu-restore"));
114+
if (osparc.product.Utils.showConvertToPipeline()) {
115+
optionsMenu.add(this.getChildControl("study-menu-convert-to-pipeline"));
116+
}
116117
optionsMenu.add(this.getChildControl("study-menu-open-logger"));
117118
control = new qx.ui.form.MenuButton().set({
118119
appearance: "fab-button",
@@ -162,15 +163,12 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", {
162163
converter: mode => mode === "standalone" ? "visible" : "excluded"
163164
});
164165

165-
const convertToPipelineButton = this.getChildControl("study-menu-convert-to-pipeline");
166-
study.getUi().bind("mode", convertToPipelineButton, "visibility", {
167-
converter: mode => mode === "standalone" ? "visible" : "excluded"
168-
});
169-
170-
const restoreButton = this.getChildControl("study-menu-restore");
171-
study.getUi().bind("mode", restoreButton, "visibility", {
172-
converter: mode => mode === "standalone" ? "visible" : "excluded"
173-
});
166+
if (osparc.product.Utils.showConvertToPipeline()) {
167+
const convertToPipelineButton = this.getChildControl("study-menu-convert-to-pipeline");
168+
study.getUi().bind("mode", convertToPipelineButton, "visibility", {
169+
converter: mode => mode === "standalone" ? "visible" : "excluded"
170+
});
171+
}
174172

175173
const loggerButton = this.getChildControl("study-menu-open-logger");
176174
study.getUi().bind("mode", loggerButton, "visibility", {

services/static-webserver/client/source/class/osparc/product/Utils.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ qx.Class.define("osparc.product.Utils", {
230230
},
231231

232232
// oSPARC only
233-
hasExportCMisEnabled: function() {
233+
showExportCMis: function() {
234234
const product = this.getProductName();
235235
return product === "osparc";
236236
},
@@ -307,17 +307,15 @@ qx.Class.define("osparc.product.Utils", {
307307
},
308308

309309
showQuality: function() {
310-
if (this.isProduct("osparc")) {
311-
return true;
312-
}
313-
return false;
310+
return this.isProduct("osparc");
314311
},
315312

316313
showClassifiers: function() {
317-
if (this.getProductName().includes("s4l")) {
318-
return false;
319-
}
320-
return true;
314+
return this.isProduct("osparc");
315+
},
316+
317+
showConvertToPipeline: function() {
318+
return this.isS4LProduct() || this.isProduct("osparc");
321319
},
322320

323321
showS4LStore: function() {

0 commit comments

Comments
 (0)