diff --git a/db_queries.php b/db_queries.php index e8962604..b248968a 100644 --- a/db_queries.php +++ b/db_queries.php @@ -45,11 +45,12 @@

-
+

+

diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index 6cc2de32..3e20638c 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -137,6 +137,12 @@ function getQueryTypes() { queryType.push([12, 13]); } + // 14 is defined above + + if ($("#type_dbbusy").prop("checked")) { + queryType.push(15); + } + return queryType.join(","); } @@ -172,7 +178,7 @@ function refreshTableData() { var APIstring = "api_db.php?getAllQueries&from=" + from + "&until=" + until; // Check if query type filtering is enabled var queryType = getQueryTypes(); - if (queryType !== "1,2,3,4,5,6") { + if (queryType !== "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15") { APIstring += "&types=" + queryType; } @@ -194,7 +200,9 @@ $(function () { tableApi = $("#all-queries").DataTable({ rowCallback: function (row, data) { - var fieldtext, buttontext, color; + var fieldtext, + buttontext = "", + color; switch (data[4]) { case 1: color = "red"; @@ -232,17 +240,14 @@ $(function () { case 6: color = "red"; fieldtext = "Blocked (external, IP)"; - buttontext = ""; break; case 7: color = "red"; fieldtext = "Blocked (external, NULL)"; - buttontext = ""; break; case 8: color = "red"; fieldtext = "Blocked (external, NXRA)"; - buttontext = ""; break; case 9: color = "red"; @@ -265,7 +270,6 @@ $(function () { case 12: color = "green"; fieldtext = "Retried"; - buttontext = ""; break; case 13: color = "green"; @@ -278,10 +282,13 @@ $(function () { buttontext = ''; break; + case 15: + color = "text-orange"; + fieldtext = "Blocked (database is busy)"; + break; default: color = "black"; fieldtext = "Unknown"; - buttontext = ""; } $(row).css("color", color); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 80344564..54405804 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -23,6 +23,7 @@ var replyTypes = [ "NOTIMP", "upstream error", "DNSSEC", + "NONE", ]; var colTypes = ["time", "query type", "domain", "client", "status", "reply type"]; @@ -78,7 +79,7 @@ $(function () { var replyid = parseInt(data[5], 10); // DNSSEC status var dnssecStatus; - var ede = data[11]; + var ede = data[11] ? data[11] : ""; switch (data[6]) { case "1": dnssecStatus = '
SECURE'; @@ -108,7 +109,7 @@ $(function () { // Query status var fieldtext, - buttontext, + buttontext = "", colorClass = false, isCNAME = false, regexLink = false; @@ -197,12 +198,10 @@ $(function () { case "12": colorClass = "text-green"; fieldtext = "Retried"; - buttontext = ""; break; case "13": colorClass = "text-green"; fieldtext = "Retried (ignored)"; - buttontext = ""; break; case "14": colorClass = "text-green"; @@ -210,10 +209,13 @@ $(function () { buttontext = ''; break; + case "15": + colorClass = "text-orange"; + fieldtext = "Blocked (database is busy)"; + break; default: colorClass = false; fieldtext = "Unknown (" + parseInt(data[4], 10) + ")"; - buttontext = ""; } // Add EDE here if available and not included in dnssecStatus