Skip to content

Commit 0323aaa

Browse files
authored
✨ Rocket-lite Navigation Bar review (ITISFoundation#3619)
1 parent 719bf1c commit 0323aaa

File tree

21 files changed

+597
-107
lines changed

21 files changed

+597
-107
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ qx.Class.define("osparc.auth.core.Utils", {
4646
const regEx = /^\+[1-9]\d{4,14}$/;
4747
const isValid = regEx.test(phoneNumber);
4848
item.set({
49-
invalidMessage: isValid ? "" : qx.locale.Manager.tr("Invalid phone number. Please, [+][country code][phone number plus area code]"),
49+
invalidMessage: isValid ? "" : qx.locale.Manager.tr("Invalid phone number. Please, [+][country code][phone number]"),
5050
valid: isValid
5151
});
5252
return isValid;

services/static-webserver/client/source/class/osparc/component/metadata/ServicesInStudy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ qx.Class.define("osparc.component.metadata.ServicesInStudy", {
144144
const infoButton = new qx.ui.form.Button(null, "@MaterialIcons/info_outline/14");
145145
infoButton.addListener("execute", () => {
146146
const metadata = osparc.utils.Services.getMetaData(node["key"], node["version"]);
147-
const serviceDetails = new osparc.servicecard.Large(metadata, {
147+
const serviceDetails = new osparc.info.ServiceLarge(metadata, {
148148
nodeId,
149149
label: node["label"]
150150
});

services/static-webserver/client/source/class/osparc/component/node/BaseNodeView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ qx.Class.define("osparc.component.node.BaseNodeView", {
225225

226226
__openServiceDetails: function() {
227227
const node = this.getNode();
228-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), {
228+
const serviceDetails = new osparc.info.ServiceLarge(node.getMetaData(), {
229229
nodeId: node.getNodeId(),
230230
label: node.getLabel(),
231231
study: node.getStudy()

services/static-webserver/client/source/class/osparc/component/widget/NodesTree.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ qx.Class.define("osparc.component.widget.NodesTree", {
237237
if (nodeId) {
238238
const study = this.getStudy();
239239
if (nodeId === study.getUuid()) {
240-
const studyDetails = new osparc.studycard.Large(study);
240+
const studyDetails = new osparc.info.StudyLarge(study);
241241
const title = this.tr("Study Information");
242242
const width = 500;
243243
const height = 500;
244244
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height);
245245
} else {
246246
const node = study.getWorkbench().getNode(nodeId);
247-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), {
247+
const serviceDetails = new osparc.info.ServiceLarge(node.getMetaData(), {
248248
nodeId,
249249
label: node.getLabel(),
250250
study

services/static-webserver/client/source/class/osparc/component/widget/StudyTitleOnlyTree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ qx.Class.define("osparc.component.widget.StudyTitleOnlyTree", {
5757
},
5858

5959
__openStudyInfo: function() {
60-
const studyDetails = new osparc.studycard.Large(this.getStudy());
60+
const studyDetails = new osparc.info.StudyLarge(this.getStudy());
6161
const title = this.tr("Study Information");
6262
const width = 500;
6363
const height = 500;

services/static-webserver/client/source/class/osparc/component/widget/logger/LoggerView.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ qx.Class.define("osparc.component.widget.logger.LoggerView", {
193193
toolTipText: this.tr("Download logs"),
194194
appearance: "toolbar-button"
195195
});
196-
osparc.utils.Utils.setIdToWidget(control, "downloadLogsToClipboardButton");
196+
osparc.utils.Utils.setIdToWidget(control, "downloadLogsButton");
197197
toolbar.add(control);
198198
break;
199199
}
@@ -226,7 +226,7 @@ qx.Class.define("osparc.component.widget.logger.LoggerView", {
226226
toolbar.add(copyToClipboardButton);
227227

228228
const downloadButton = this.getChildControl("download-logs-button");
229-
downloadButton.addListener("execute", () => this.__downloadLogs(), this);
229+
downloadButton.addListener("execute", () => this.downloadLogs(), this);
230230
toolbar.add(downloadButton);
231231

232232
return toolbar;
@@ -297,7 +297,7 @@ qx.Class.define("osparc.component.widget.logger.LoggerView", {
297297
osparc.utils.Utils.copyTextToClipboard(this.__getLogsString());
298298
},
299299

300-
__downloadLogs: function() {
300+
downloadLogs: function() {
301301
const logs = this.__getLogsString();
302302
osparc.utils.Utils.downloadContent("data:text/plain;charset=utf-8," + logs, "logs.log");
303303
},

services/static-webserver/client/source/class/osparc/component/workbench/ServiceCatalog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ qx.Class.define("osparc.component.workbench.ServiceCatalog", {
304304
},
305305

306306
__showServiceDetails: function() {
307-
const serviceDetails = new osparc.servicecard.Large(this.__getSelectedService());
307+
const serviceDetails = new osparc.info.ServiceLarge(this.__getSelectedService());
308308
const title = this.tr("Service information");
309309
const width = 600;
310310
const height = 700;

services/static-webserver/client/source/class/osparc/component/workbench/WorkbenchUI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", {
15201520
__openNodeInfo: function(nodeId) {
15211521
if (nodeId) {
15221522
const node = this.getStudy().getWorkbench().getNode(nodeId);
1523-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), {
1523+
const serviceDetails = new osparc.info.ServiceLarge(node.getMetaData(), {
15241524
nodeId,
15251525
label: node.getLabel(),
15261526
study: this.getStudy()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
200200
const title = this.tr("Information");
201201
const icon = "@FontAwesome5Solid/info";
202202
const resourceData = this.__resourceData;
203-
const infoCard = osparc.utils.Resources.isService(resourceData) ? new osparc.servicecard.Large(resourceData, null, false) : new osparc.studycard.Large(resourceData, false);
203+
const infoCard = osparc.utils.Resources.isService(resourceData) ? new osparc.info.ServiceLarge(resourceData, null, false) : new osparc.info.StudyLarge(resourceData, false);
204204
infoCard.addListener("openAccessRights", () => this.openAccessRights());
205205
infoCard.addListener("openClassifiers", () => this.openClassfiers());
206206
infoCard.addListener("openQuality", () => this.openQuality());

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ qx.Class.define("osparc.desktop.MainPage", {
7474
__createNavigationBar: function() {
7575
const navBar = new osparc.navigation.NavigationBar();
7676
navBar.addListener("backToDashboardPressed", () => this.__backToDashboardPressed(), this);
77+
navBar.addListener("downloadStudyLogs", () => this.__downloadStudyLogs(), this);
7778
return navBar;
7879
},
7980

@@ -124,6 +125,12 @@ qx.Class.define("osparc.desktop.MainPage", {
124125
dashboardBtn.setFetching(false);
125126
},
126127

128+
__downloadStudyLogs: function() {
129+
if (this.__studyEditor) {
130+
this.__studyEditor.getStudyLogger().downloadLogs();
131+
}
132+
},
133+
127134
__createMainStack: function() {
128135
const mainStack = new qx.ui.container.Stack().set({
129136
alignX: "center"

0 commit comments

Comments
 (0)