From a604037d339a03db8f83ff78ecc20e0524a2b23b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 20 Jun 2017 13:01:30 +0200 Subject: [PATCH] Add unique clients to summary --- index.php | 40 ++++++++++++++++++------------------- scripts/pi-hole/js/index.js | 10 +++++----- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/index.php b/index.php index 6c161299..bf901652 100644 --- a/index.php +++ b/index.php @@ -10,25 +10,12 @@ ?>
-
- -
-
-

---

-

Queries Blocked Last 24 Hours

-
-
- -
-
-
-
-

---

-

Queries Last 24 Hours

+

Total queries

+

---

@@ -38,13 +25,26 @@
-
+
-

---

-

Queries Blocked Last 24 Hours

+

Queries Blocked

+

--- (---)

- + +
+
+
+ +
+ +
+
+

Unique Clients

+

---

+
+
+
@@ -53,8 +53,8 @@
-

---

Domains on Blocklists

+

---

diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index ecb005af..6b0530f6 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -406,17 +406,17 @@ function updateSummaryData(runOnce) { } } - ["ads_blocked_today", "dns_queries_today", "ads_percentage_today"].forEach(function(today) { - var todayElement = $("h3#" + today); + ["ads_blocked_today", "dns_queries_today", "ads_percentage_today", "unique_clients"].forEach(function(today) { + var todayElement = $("span#" + today); todayElement.text() !== data[today] && todayElement.text() !== data[today] + "%" && - todayElement.addClass("glow"); + $("h3#" + today).addClass("glow"); }); window.setTimeout(function() { - ["ads_blocked_today", "dns_queries_today", "domains_being_blocked", "ads_percentage_today"].forEach(function(header, idx) { + ["ads_blocked_today", "dns_queries_today", "domains_being_blocked", "ads_percentage_today", "unique_clients"].forEach(function(header, idx) { var textData = (idx === 3 && data[header] !== "to") ? data[header] + "%" : data[header]; - $("h3#" + header).text(textData); + $("span#" + header).text(textData); }); $("h3.statistic.glow").removeClass("glow"); }, 500);