Feature: auto update 512 feature statistic

CR: sonhh (fake)
This commit is contained in:
dongpd 2021-08-23 15:27:25 +07:00
parent eb88996797
commit 0b50249cdf

View File

@ -17,7 +17,14 @@ $(function () {
btnImage();
$("#Code").select2();
getTotalFeature();
setInterval(function () {
var current = parseInt($("#current-512").html());
var total = parseInt($("#total-512").html());
if (current < total)
getTotalFeature();
}, 5000);
});
function _search(e) {
var location = $(e).attr("data-href"); // + "?from=" + $("input[name='From']").val() + "&to=" + $("input[name='To']").val();
location = location + "?id=" + $("input[name='IDSearch']").val();
@ -618,7 +625,7 @@ function getTotalFeature() {
console.log(data);
$("#totalPeople").html(`<b class="text-red">` + data.statistics.totalImg + `</b>/<b>` + data.statistics.total + `</b>`);
$("#total128").html(`<b class="text-red">` + data.statistics["128"] + `</b>/<b>` + data.statistics.img + `</b>`);
$("#total512").html(`<b class="text-red">` + data.statistics["512"] + `</b>/<b>` + data.statistics.img + `</b>`);
$("#total512").html(`<b class="text-red" id="current-512">` + data.statistics["512"] + `</b>/<b id="total-512">` + data.statistics.img + `</b>`);
},
error: function (jqXHR, textStatus, errorThrown) {
}