mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
update queue-bar after adding new tasks
This commit is contained in:
parent
42d5eacc0d
commit
b1df3b460b
|
@ -62,6 +62,7 @@ function check_queue() {
|
||||||
data: {command: 'indexdocument', id: docid},
|
data: {command: 'indexdocument', id: docid},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
queue_count++; // Add request to the counter
|
queue_count++; // Add request to the counter
|
||||||
|
$('.queue-bar').css('width', (queue_count*100/MAX_REQUESTS)+'%');
|
||||||
},
|
},
|
||||||
error: function(xhr, textstatus) {
|
error: function(xhr, textstatus) {
|
||||||
noty({
|
noty({
|
||||||
|
@ -90,10 +91,10 @@ function check_queue() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: function(xhr, textstatus) {
|
complete: function(xhr, textstatus) {
|
||||||
|
queue_count--; // Substract request to the counter
|
||||||
$('.queue-bar').css('width', (queue_count*100/MAX_REQUESTS)+'%');
|
$('.queue-bar').css('width', (queue_count*100/MAX_REQUESTS)+'%');
|
||||||
$('.total-bar').css('width', (100 - (funcArray.length+queue_count)*100/docstoindex)+'%');
|
$('.total-bar').css('width', (100 - (funcArray.length+queue_count)*100/docstoindex)+'%');
|
||||||
$('.total-bar').text(Math.round(100 - (funcArray.length+queue_count)*100/docstoindex)+' %');
|
$('.total-bar').text(Math.round(100 - (funcArray.length+queue_count)*100/docstoindex)+' %');
|
||||||
queue_count--; // Substract request to the counter
|
|
||||||
if(funcArray.length+queue_count == 0)
|
if(funcArray.length+queue_count == 0)
|
||||||
$('.total-bar').addClass('bar-success');
|
$('.total-bar').addClass('bar-success');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user