Browse Source

js update for bot stats update

master
filesite 1 month ago
parent
commit
7a73005872
  1. 7
      www/js/beauty.js

7
www/js/beauty.js

@ -926,6 +926,7 @@ $('.expand-icon').click(function(evt) { @@ -926,6 +926,7 @@ $('.expand-icon').click(function(evt) {
/* MainBot扫描进度展示 */
if ($('.botstats').length > 0) {
var didScan = false;
var refreshBotStats = function() {
$.ajax({
url: '/site/botstats',
@ -942,16 +943,18 @@ if ($('.botstats').length > 0) { @@ -942,16 +943,18 @@ if ($('.botstats').length > 0) {
$('.botstats .progress-bar').text(data.percent + '%');
}
if (data.percent < 100) {
didScan = true;
$('.btnStartScan').prop('disabled', true);
$('.botstats').removeClass('hide');
$('.botstats .progress-bar').removeClass('progress-bar-success');
setTimeout(refreshBotStats, 10000);
}else {
}else if (didScan) {
$('.botstats .progress-bar').addClass('progress-bar-success');
setTimeout(function() {
$('.botstats').addClass('hide');
$('.btnStartScan').removeAttr('disabled');
}, 3000);
location.reload();
}, 4000);
}
}
}).fail(function(jqXHR, textStatus, errorThrown) {

Loading…
Cancel
Save