Closed NicoCaldo closed 1 year ago
Have a look at the code for the onProgressDefault
function. You can use this as a template to do what you need in your own version.
onProgressDefault(progressBarElement, progressBarMessageElement, progress) {
progressBarElement.style.backgroundColor = this.barColors.progress;
progressBarElement.style.width = progress.percent + "%";
var description = progress.description || "";
if (progress.current == 0) {
if (progress.pending === true) {
progressBarMessageElement.textContent = this.messages.waiting;
} else {
progressBarMessageElement.textContent = this.messages.started;
}
} else {
progressBarMessageElement.textContent = progress.current + ' of ' + progress.total + ' processed. ' + description;
}
}
How is possible to show percentage inside progress bar ? Thanks
The above code shows an example of that.
I'm going to close this as I don't think there is any action needed.
First of all, thanks for the library as it resolved half of my problem when it comes to visualize tasks progressions
I'm trying to personalize the progress bar and I'm using boostrap for it with
Now, I would like to access the number (var i from the code below) in my front end
I understand I can use something like
But how do I update my var if the actual worker is executing so, if
progress_recorder.set_progress(i, 100)
has been updated?