Skip to content

Commit c04a389

Browse files
authored
🎨 [Frontend] Hide Sim4Life->oSparc integration features (#7207)
1 parent 5726949 commit c04a389

File tree

15 files changed

+99
-105
lines changed

15 files changed

+99
-105
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ qx.Class.define("osparc.dashboard.Dashboard", {
3838
construct: function() {
3939
this.base(arguments);
4040

41-
this.getChildControl("bar").set({
42-
visibility: "excluded",
43-
});
41+
osparc.utils.Utils.setIdToWidget(this.getChildControl("bar"), "dashboardTabs");
42+
osparc.utils.Utils.setIdToWidget(this, "dashboard");
4443

4544
this.set({
4645
contentPadding: this.self().PADDING,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
253253
const dateBy = this.getChildControl("date-by");
254254
dateBy.set({
255255
date: value,
256-
toolTipText: this.tr("Moved to the bin"),
256+
toolTipText: this.tr("Deleted"),
257257
});
258258
}
259259
},
@@ -302,7 +302,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
302302

303303
menu.addSeparator();
304304

305-
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
305+
const trashButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
306306
trashButton.addListener("execute", () => this.fireDataEvent("trashFolderRequested", this.getFolderId()), this);
307307
menu.add(trashButton);
308308
} else if (studyBrowserContext === "trash") {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
194194
const dateBy = this.getChildControl("date-by");
195195
dateBy.set({
196196
date: value,
197-
toolTipText: this.tr("Moved to the bin"),
197+
toolTipText: this.tr("Deleted"),
198198
});
199199
}
200200
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
203203
const dateBy = this.getChildControl("date-by");
204204
dateBy.set({
205205
date: value,
206-
toolTipText: this.tr("Moved to the bin"),
206+
toolTipText: this.tr("Deleted"),
207207
});
208208
}
209209
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
2323

2424
osparc.utils.Utils.prettifyMenu(this);
2525

26+
this.getContentElement().setStyles({
27+
"border-color": qx.theme.manager.Color.getInstance().resolve("strong-main"),
28+
});
29+
2630
this.set({
2731
position: "bottom-left",
2832
spacingX: 20,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
5757
case "study": {
5858
this._add(this.__createWorkspacesAndFoldersTree());
5959
this._add(this.__createTrashBin());
60-
this._add(this.__createResourceTypeContextButtons());
60+
// this._add(this.__createResourceTypeContextButtons());
6161
this._add(filtersSpacer);
6262
const scrollView = new qx.ui.container.Scroll();
6363
scrollView.add(this.__createTagsFilterLayout());
@@ -67,7 +67,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
6767
break;
6868
}
6969
case "template": {
70-
this._add(this.__createResourceTypeContextButtons());
70+
// this._add(this.__createResourceTypeContextButtons());
7171
this._add(filtersSpacer);
7272
this._add(this.__createSharedWithFilterLayout());
7373
const scrollView = new qx.ui.container.Scroll();
@@ -78,7 +78,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
7878
break;
7979
}
8080
case "service":
81-
this._add(this.__createResourceTypeContextButtons());
81+
// this._add(this.__createResourceTypeContextButtons());
8282
this._add(filtersSpacer);
8383
this._add(this.__createSharedWithFilterLayout());
8484
this._add(this.__createServiceTypeFilterLayout());
@@ -124,7 +124,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
124124
const trashButton = this.__trashButton = new qx.ui.toolbar.RadioButton().set({
125125
value: false,
126126
appearance: "filter-toggle-button",
127-
label: this.tr("Bin"),
127+
label: this.tr("Recently Deleted"),
128128
icon: "@FontAwesome5Solid/trash-alt/16",
129129
paddingLeft: 10, // align it with the context
130130
});

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

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
476476
osparc.store.Workspaces.getInstance().trashWorkspace(workspaceId)
477477
.then(() => {
478478
this.__reloadWorkspaces();
479-
const msg = this.tr("Successfully moved to Bin");
479+
const msg = this.tr("Successfully deleted");
480480
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
481481
this._resourceFilter.setTrashEmpty(false);
482482
})
@@ -614,7 +614,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
614614
osparc.store.Folders.getInstance().trashFolder(folderId, this.getCurrentWorkspaceId())
615615
.then(() => {
616616
this.__reloadFolders();
617-
const msg = this.tr("Successfully moved to Bin");
617+
const msg = this.tr("Successfully deleted");
618618
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
619619
this._resourceFilter.setTrashEmpty(false);
620620
})
@@ -626,11 +626,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
626626

627627
_trashFolderRequested: function(folderId) {
628628
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
629-
let msg = this.tr("Are you sure you want to move the Folder and all its content to the Bin?");
629+
let msg = this.tr("Are you sure you want to delete the Folder and all its content?");
630630
msg += "<br><br>" + this.tr("It will be permanently deleted after ") + trashDays + " days.";
631631
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
632-
caption: this.tr("Move to Bin"),
633-
confirmText: this.tr("Move to Bin"),
632+
caption: this.tr("Delete"),
633+
confirmText: this.tr("Delete"),
634634
confirmAction: "warning",
635635
});
636636
confirmationWin.center();
@@ -1124,7 +1124,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
11241124

11251125
studiesTrashButton.set({
11261126
visibility: selection.length && currentContext === "studiesAndFolders" ? "visible" : "excluded",
1127-
label: this.tr("Move to Bin") + (selection.length > 1 ? ` (${selection.length})` : ""),
1127+
label: this.tr("Delete") + (selection.length > 1 ? ` (${selection.length})` : ""),
11281128
});
11291129

11301130
studiesDeleteButton.set({
@@ -1388,7 +1388,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
13881388
},
13891389

13901390
__createTrashStudiesButton: function() {
1391-
const trashButton = new qx.ui.form.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/14").set({
1391+
const trashButton = new qx.ui.form.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/14").set({
13921392
appearance: "warning-button",
13931393
visibility: "excluded"
13941394
});
@@ -1648,11 +1648,13 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
16481648
const duplicateStudyButton = this.__getDuplicateMenuButton(studyData);
16491649
menu.add(duplicateStudyButton);
16501650

1651-
const convertToPipelineButton = this.__getConvertToPipelineMenuButton(studyData);
1652-
menu.add(convertToPipelineButton);
1651+
if (osparc.product.Utils.hasConvertToPipelineEnabled()) {
1652+
const convertToPipelineButton = this.__getConvertToPipelineMenuButton(studyData);
1653+
menu.add(convertToPipelineButton);
1654+
}
16531655

1654-
if (osparc.product.Utils.isProduct("osparc")) {
1655-
const exportStudyButton = this.__getExportMenuButton(studyData);
1656+
if (osparc.product.Utils.hasExportCMisEnabled()) {
1657+
const exportStudyButton = this.__getExportCMisMenuButton(studyData);
16561658
menu.add(exportStudyButton);
16571659
}
16581660

@@ -1886,7 +1888,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
18861888
.then(() => this._updateStudyData(studyData))
18871889
},
18881890

1889-
__getExportMenuButton: function(studyData) {
1891+
__getExportCMisMenuButton: function(studyData) {
18901892
const exportButton = new qx.ui.menu.Button(this.tr("Export cMIS"), "@FontAwesome5Solid/cloud-download-alt/12");
18911893
exportButton["exportCMISButton"] = true;
18921894
const isDisabled = osparc.utils.DisabledPlugins.isExportDisabled();
@@ -1936,7 +1938,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
19361938
},
19371939

19381940
__getTrashStudyMenuButton: function(studyData) {
1939-
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
1941+
const trashButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
19401942
trashButton["trashButton"] = true;
19411943
trashButton.set({
19421944
appearance: "menu-button"
@@ -2137,7 +2139,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
21372139
osparc.store.Store.getInstance().trashStudy(studyData.uuid)
21382140
.then(() => {
21392141
this.__removeFromStudyList(studyData.uuid);
2140-
const msg = this.tr("Successfully moved to Bin");
2142+
const msg = this.tr("Successfully deleted");
21412143
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
21422144
this._resourceFilter.setTrashEmpty(false);
21432145
})
@@ -2190,19 +2192,18 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
21902192
},
21912193

21922194
__createConfirmTrashWindow: function(studyNames) {
2193-
let msg = this.tr("Are you sure you want to move");
2195+
let msg = this.tr("Are you sure you want to delete");
21942196
if (studyNames.length > 1) {
21952197
const studiesText = osparc.product.Utils.getStudyAlias({plural: true});
21962198
msg += ` ${studyNames.length} ${studiesText} `
21972199
} else {
21982200
msg += ` '${studyNames[0]}' `;
21992201
}
2200-
msg += this.tr("to the Bin?");
22012202
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
22022203
msg += "<br><br>" + (studyNames.length > 1 ? "They" : "It") + this.tr(` will be permanently deleted after ${trashDays} days.`);
22032204
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
2204-
caption: this.tr("Move to Bin"),
2205-
confirmText: this.tr("Move to Bin"),
2205+
caption: this.tr("Delete"),
2206+
confirmText: this.tr("Delete"),
22062207
confirmAction: "warning",
22072208
});
22082209
osparc.utils.Utils.setIdToWidget(confirmationWin.getConfirmButton(), "confirmDeleteStudyBtn");
@@ -2234,7 +2235,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
22342235
},
22352236

22362237
__createConfirmEmptyTrashWindow: function() {
2237-
const msg = this.tr("Items in the bin will be permanently deleted");
2238+
const msg = this.tr("All items will be permanently deleted");
22382239
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
22392240
caption: this.tr("Delete"),
22402241
confirmText: this.tr("Delete permanently"),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
193193
break;
194194
}
195195
case "empty-trash-button": {
196-
control = new qx.ui.form.Button(this.tr("Empty Bin"), "@FontAwesome5Solid/trash/14").set({
196+
control = new qx.ui.form.Button(this.tr("Delete all"), "@FontAwesome5Solid/trash/14").set({
197197
appearance: "danger-button",
198198
allowGrowY: false,
199199
alignY: "middle",
@@ -276,10 +276,10 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
276276
break;
277277
case "trash": {
278278
this.__setIcon("@FontAwesome5Solid/trash/20");
279-
title.setValue(this.tr("Bin"));
279+
title.setValue(this.tr("Recently Deleted"));
280280
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
281281
description.set({
282-
value: this.tr(`Items in the Bin will be permanently deleted after ${trashDays} days.`),
282+
value: this.tr(`Items here will be permanently deleted after ${trashDays} days.`),
283283
visibility: "visible",
284284
});
285285
break;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
217217

218218
menu.addSeparator();
219219

220-
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
220+
const trashButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
221221
trashButton.addListener("execute", () => this.__trashWorkspaceRequested(), this);
222222
menu.add(trashButton);
223223
} else if (studyBrowserContext === "trash") {
@@ -263,7 +263,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
263263
const dateBy = this.getChildControl("date-by");
264264
dateBy.set({
265265
date: value,
266-
toolTipText: this.tr("Moved to the bin"),
266+
toolTipText: this.tr("Deleted"),
267267
});
268268
}
269269
},
@@ -300,11 +300,11 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
300300

301301
__trashWorkspaceRequested: function() {
302302
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
303-
let msg = this.tr("Are you sure you want to move the Workspace and all its content to the Bin?");
303+
let msg = this.tr("Are you sure you want to delete the Workspace and all its content?");
304304
msg += "<br><br>" + this.tr("It will be permanently deleted after ") + trashDays + " days.";
305305
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
306-
caption: this.tr("Move to Bin"),
307-
confirmText: this.tr("Move to Bin"),
306+
caption: this.tr("Delete"),
307+
confirmText: this.tr("Delete"),
308308
confirmAction: "delete"
309309
});
310310
confirmationWin.center();

services/static-webserver/client/source/class/osparc/desktop/MainPage.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ qx.Class.define("osparc.desktop.MainPage", {
5050
const navBar = this.__navBar = new osparc.navigation.NavigationBar();
5151
navBar.populateLayout();
5252
navBar.addListener("backToDashboardPressed", () => this.__backToDashboardPressed(), this);
53-
navBar.addListener("downloadStudyLogs", () => this.__downloadStudyLogs(), this);
53+
navBar.addListener("openLogger", () => this.__openLogger(), this);
5454
this._add(navBar);
5555

5656
// Some resources request before building the main stack
@@ -171,9 +171,9 @@ qx.Class.define("osparc.desktop.MainPage", {
171171
}
172172
},
173173

174-
__downloadStudyLogs: function() {
174+
__openLogger: function() {
175175
if (this.__studyEditor) {
176-
this.__studyEditor.getStudyLogger().downloadLogs();
176+
osparc.ui.window.Window.popUpInWindow(this.__studyEditor.getStudyLogger(), this.tr("Platform logger"), 950, 650);
177177
}
178178
},
179179

@@ -199,6 +199,11 @@ qx.Class.define("osparc.desktop.MainPage", {
199199

200200
__createDashboardLayout: function() {
201201
const dashboard = this.__dashboard = new osparc.dashboard.Dashboard();
202+
const tabsBar = dashboard.getChildControl("bar");
203+
tabsBar.set({
204+
paddingBottom: 6
205+
});
206+
this.__navBar.addDashboardTabButtons(tabsBar);
202207
const dashboardLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
203208
dashboardLayout.add(dashboard, {
204209
flex: 1

0 commit comments

Comments
 (0)