Skip to content

Commit b095f5b

Browse files
jsaq007matusdrobuliak66
authored andcommitted
🎨 Improve the service startup progress display (#5760)
1 parent 7a7ee23 commit b095f5b

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

services/static-webserver/client/source/class/osparc/data/model/NodeProgressSequence.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
4949
clusterUpScaling: {
5050
check: "Object",
5151
init: {
52-
progressLabel: qx.locale.Manager.tr("Waiting..."),
52+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
5353
value: 0
5454
},
5555
nullable: false,
@@ -59,7 +59,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
5959
sidecarPulling: {
6060
check: "Object",
6161
init: {
62-
progressLabel: qx.locale.Manager.tr("Waiting..."),
62+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
6363
value: 0
6464
},
6565
nullable: false,
@@ -69,7 +69,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
6969
outputsPulling: {
7070
check: "Object",
7171
init: {
72-
progressLabel: qx.locale.Manager.tr("Waiting..."),
72+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
7373
value: 0
7474
},
7575
nullable: false,
@@ -79,7 +79,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
7979
statePulling: {
8080
check: "Object",
8181
init: {
82-
progressLabel: qx.locale.Manager.tr("Waiting..."),
82+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
8383
value: 0
8484
},
8585
nullable: false,
@@ -89,7 +89,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
8989
imagesPulling: {
9090
check: "Object",
9191
init: {
92-
progressLabel: qx.locale.Manager.tr("Waiting..."),
92+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
9393
value: 0
9494
},
9595
nullable: false,
@@ -99,7 +99,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
9999
inputsPulling: {
100100
check: "Object",
101101
init: {
102-
progressLabel: qx.locale.Manager.tr("Waiting..."),
102+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
103103
value: 0
104104
},
105105
nullable: false,
@@ -151,7 +151,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
151151

152152
const progressState = new qx.ui.basic.Label();
153153
progressState.set({
154-
value: qx.locale.Manager.tr("Waiting..."),
154+
value: qx.locale.Manager.tr("Waiting ..."),
155155
textColor: "text",
156156
allowGrowX: true,
157157
allowShrinkX: true
@@ -216,7 +216,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
216216

217217
getDefaultStartValues: function() {
218218
return {
219-
progressLabel: qx.locale.Manager.tr("Waiting..."),
219+
progressLabel: qx.locale.Manager.tr("Waiting ..."),
220220
value: 0
221221
}
222222
},
@@ -246,7 +246,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
246246
getProgress: function(report) {
247247
if (report.unit) {
248248
return {
249-
progressLabel: `${osparc.utils.Utils.bytesToSize(report["actual_value"], 1, false)} / ${osparc.utils.Utils.bytesToSize(report["total"], 1)}`,
249+
progressLabel: `${osparc.utils.Utils.bytesToSize(report["actual_value"], 1, false)} / ${osparc.utils.Utils.bytesToSize(report["total"], 1, false)}`,
250250
value: report["actual_value"] / report["total"]
251251
}
252252
}
@@ -290,7 +290,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
290290
paddingBottom: 8
291291
});
292292

293-
const progressTitle = new qx.ui.basic.Label(qx.locale.Manager.tr("LOADING...")).set({
293+
const progressTitle = new qx.ui.basic.Label(qx.locale.Manager.tr("LOADING ...")).set({
294294
font: "text-12",
295295
alignX: "center",
296296
alignY: "middle",
@@ -302,7 +302,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
302302
sequenceLoadingPage.add(overallPBar);
303303

304304
const disclaimerText = this.__disclaimerText = new qx.ui.basic.Atom().set({
305-
label: qx.locale.Manager.tr("Please be patient, this process can take a few minutes..."),
305+
label: qx.locale.Manager.tr("Please be patient, this process can take a few minutes ..."),
306306
padding: [20, 10],
307307
gap: 15,
308308
icon: "@FontAwesome5Solid/exclamation-triangle/16",
@@ -317,22 +317,22 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
317317
disclaimerText.exclude();
318318

319319

320-
const scalingLayout = this.__clusterUpScalingLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Increasing system capacity..."));
320+
const scalingLayout = this.__clusterUpScalingLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Increasing system capacity ..."));
321321
sequenceLoadingPage.add(scalingLayout);
322322

323-
const pullingSidecarLayout = this.__pullingSidecarLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Setting up key components..."));
323+
const pullingSidecarLayout = this.__pullingSidecarLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Setting up key components ..."));
324324
sequenceLoadingPage.add(pullingSidecarLayout);
325325

326-
const pullingOutputsLayout = this.__pullingOutputsLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Retrieving your output data..."));
326+
const pullingOutputsLayout = this.__pullingOutputsLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Retrieving your output data ..."));
327327
sequenceLoadingPage.add(pullingOutputsLayout);
328328

329-
const pullingStateLayout = this.__pullingStateLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Retrieving your work..."));
329+
const pullingStateLayout = this.__pullingStateLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Retrieving your work ..."));
330330
sequenceLoadingPage.add(pullingStateLayout);
331331

332-
const pullingImagesLayout = this.__pullingImagesLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Installing software..."));
332+
const pullingImagesLayout = this.__pullingImagesLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Installing software ..."));
333333
sequenceLoadingPage.add(pullingImagesLayout);
334334

335-
const pullingInputsLayout = this.__pullingInputsLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Retrieving your input data..."));
335+
const pullingInputsLayout = this.__pullingInputsLayout = this.self().createTaskLayout(qx.locale.Manager.tr("Retrieving your input data ..."));
336336
sequenceLoadingPage.add(pullingInputsLayout);
337337

338338
this.__mainLoadingPage.addAt(sequenceLoadingPage, 0, {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ qx.Class.define("osparc.utils.Utils", {
552552
return L > 0.35 ? "#FFF" : "#000";
553553
},
554554

555-
bytesToSize: function(bytes, decimals = 2, isPrefixVisible = true) {
555+
bytesToSize: function(bytes, decimals = 2, isDecimalColapsed = true) {
556556
if (!+bytes) {
557557
return "0 Bytes";
558558
}
@@ -561,7 +561,7 @@ qx.Class.define("osparc.utils.Utils", {
561561
const dm = decimals < 0 ? 0 : decimals;
562562

563563
const i = Math.floor(Math.log(bytes) / Math.log(k))
564-
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${isPrefixVisible ? sizes[i] : ""}`
564+
return `${isDecimalColapsed ? parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) : (bytes / Math.pow(k, i)).toFixed(dm)} ${sizes[i]}`
565565
},
566566

567567
bytesToGB: function(bytes) {

0 commit comments

Comments
 (0)