Skip to content
Snippets Groups Projects
Commit dd3a62a1 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

rounding progress status

parent 212e35b1
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!599Resolve "Improve display of progress when downloading a genome"
Pipeline #8493 passed
...@@ -99,17 +99,18 @@ ReferenceGenome.prototype.setDownloadProgress = function (downloadProgress) { ...@@ -99,17 +99,18 @@ ReferenceGenome.prototype.setDownloadProgress = function (downloadProgress) {
* @returns {string} * @returns {string}
*/ */
ReferenceGenome.prototype.getDownloadProgressStatus = function () { ReferenceGenome.prototype.getDownloadProgressStatus = function () {
if (this.getDownloadProgress() === 100) { var progress = this.getDownloadProgress();
if (progress === 100) {
if (this.getLocalUrl() !== undefined) { if (this.getLocalUrl() !== undefined) {
return "READY"; return "READY";
} else { } else {
return "ERROR"; return "ERROR";
} }
} else { } else {
if (this.getDownloadProgress() === undefined) { if (progress === undefined) {
return "N/A"; return "N/A";
} else { } else {
return this.getDownloadProgress().toString(); return progress.toFixed(2) + ' %';
} }
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment