From 71e949f76093e4287f3999caede5b671f0d46fd1 Mon Sep 17 00:00:00 2001 From: Jarno Rankinen Date: Fri, 24 Feb 2023 21:56:15 +0200 Subject: [PATCH] Highlight changed values in web looking glass pages (/coils, /registers) --- enervent-ctrl-go/static/html/css/tabledata.css | 3 +++ enervent-ctrl-go/static/html/js/tabledata.js | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/enervent-ctrl-go/static/html/css/tabledata.css b/enervent-ctrl-go/static/html/css/tabledata.css index 3f7a99f..d4f96c5 100644 --- a/enervent-ctrl-go/static/html/css/tabledata.css +++ b/enervent-ctrl-go/static/html/css/tabledata.css @@ -14,4 +14,7 @@ thead { } td { padding: 2pt; +} +.highlightrow { + background-color: orangered; } \ No newline at end of file diff --git a/enervent-ctrl-go/static/html/js/tabledata.js b/enervent-ctrl-go/static/html/js/tabledata.js index f91302d..fa49573 100644 --- a/enervent-ctrl-go/static/html/js/tabledata.js +++ b/enervent-ctrl-go/static/html/js/tabledata.js @@ -41,7 +41,14 @@ function coils(data) { } else { for (n=0; n {coilval.className = ""}, 1000) + } else { + coilval.className = "" + } } } } @@ -78,11 +85,18 @@ function registers(data) { } else { for (n=0; n {regval.className = ""}, 1000) + } else { + regval.className = "" + } } } } @@ -128,7 +142,7 @@ function getData() { // Using setTimeout instead of setInterval to avoid possible connection issues // There's no need to update exactly every 5 seconds, the skew is fine - setTimeout(getData, 5*1000); + setTimeout(getData, 2*1000); } // Show or hide rows for "reserved" values when clicking the checkbox