We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb97b83 commit 9082b8eCopy full SHA for 9082b8e
services/static-webserver/client/source/class/osparc/data/PollTask.js
@@ -102,9 +102,13 @@ qx.Class.define("osparc.data.PollTask", {
102
},
103
104
extractProgress: function(updateData) {
105
+ const toNumberWithMaxTwoDecimals = value => {
106
+ return Math.round(Number(value) * 100) / 100;
107
+ };
108
+
109
if ("task_progress" in updateData) {
110
const taskProgress = updateData["task_progress"];
- const percent = taskProgress["percent"] ? parseFloat(taskProgress["percent"].toFixed(3)) : taskProgress["percent"];
111
+ const percent = taskProgress["percent"] ? toNumberWithMaxTwoDecimals(taskProgress["percent"]) : taskProgress["percent"];
112
return percent;
113
}
114
return 0;
0 commit comments