From c9a7d5df8e1c05d5f8aa06f794f2d3ae487f58f7 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 10 Nov 2022 19:26:20 +0100 Subject: [PATCH] Addressing review comments. Signed-off-by: DL6ER --- api_db.php | 2 +- scripts/pi-hole/js/db_queries.js | 2 +- scripts/pi-hole/js/queries.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api_db.php b/api_db.php index fca897a2..f060d47b 100644 --- a/api_db.php +++ b/api_db.php @@ -192,7 +192,7 @@ if (isset($_GET['topDomains']) && $auth) { $limit = ' AND timestamp <= :until'; } // Select top permitted domains only - $stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE status IN (2,3,12,13,14)'.$limit.' GROUP by domain order by count(domain) desc limit 20'); + $stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE status IN (2,3,12,13,14,17)'.$limit.' GROUP by domain order by count(domain) desc limit 20'); $stmt->bindValue(':from', intval($_GET['from']), SQLITE3_INTEGER); $stmt->bindValue(':until', intval($_GET['until']), SQLITE3_INTEGER); $results = $stmt->execute(); diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index 3a5aac23..efa85074 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -180,7 +180,7 @@ var reloadCallback = function () { var data = tableApi.rows().data(); for (var i = 0; i < data.length; i++) { statistics[0]++; // TOTAL query - if (data[i][4] === 1 || (data[i][4] > 4 && ![10, 12, 13, 14].includes(data[i][4]))) { + if (data[i][4] === 1 || (data[i][4] > 4 && ![10, 12, 13, 14, 17].includes(data[i][4]))) { statistics[2]++; // EXACT blocked } else if (data[i][4] === 3) { statistics[1]++; // CACHE query diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 1bccf9ea..163d282b 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -471,7 +471,7 @@ $(function () { $("#all-queries tbody").on("click", "button", function () { var data = tableApi.row($(this).parents("tr")).data(); - if (data[4] === "2" || data[4] === "3" || data[4] === "14") { + if (data[4] === "2" || data[4] === "3" || data[4] === "14" || data[4] === "17") { utils.addFromQueryLog(data[2], "black"); } else { utils.addFromQueryLog(data[2], "white");