improve efficiency of the lookatme animation

Signed-off-by: Iksas <Iksas@users.noreply.github.com>
This commit is contained in:
Iksas
2021-12-24 03:32:24 +01:00
parent fe32e57390
commit 369170105a
4 changed files with 45 additions and 22 deletions

View File

@@ -213,9 +213,15 @@ function loadCacheInfo() {
var cachelivefreed = parseInt(data.cacheinfo["cache-live-freed"], 10);
$("#cache-live-freed").text(cachelivefreed);
if (cachelivefreed > 0) {
$("#cache-live-freed").parent("tr").addClass("lookatme");
$("#cache-live-freed").parent("tr").children("th").children("span").addClass("lookatme");
$("#cache-live-freed").parent("tr").children("td").addClass("lookatme");
$("#cache-live-freed")
.parent("tr")
.children("td")
.attr("lookatme-text", cachelivefreed.toString());
} else {
$("#cache-live-freed").parent("tr").removeClass("lookatme");
$("#cache-live-freed").parent("tr").children("th").children("span").removeClass("lookatme");
$("#cache-live-freed").parent("tr").children("td").removeClass("lookatme");
}
// Update cache info every 10 seconds