diff --git a/api_FTL.php b/api_FTL.php index 85ee3f8a..daf72307 100644 --- a/api_FTL.php +++ b/api_FTL.php @@ -288,6 +288,11 @@ else // Get specific domain only sendRequestFTL("getallqueries-domain ".$_GET['domain']); } + else if(isset($_GET['client']) && (isset($_GET['type']) && $_GET['type'] === "blocked")) + { + // Get specific client only + sendRequestFTL("getallqueries-client-blocked ".$_GET['client']); + } else if(isset($_GET['client'])) { // Get specific client only diff --git a/queries.php b/queries.php index 16ad97a4..2342fd76 100644 --- a/queries.php +++ b/queries.php @@ -28,6 +28,10 @@ if(isset($setupVars["API_QUERY_LOG_SHOW"])) $showing = "showing no queries (due to setting)"; } } +else if(isset($_GET["type"]) && $_GET["type"] === "blocked") +{ + $showing = "showing blocked"; +} else { // If filter variable is not set, we diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 7f587f2e..4492f1da 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -587,7 +587,7 @@ function updateTopClientsChart() { url = '' + clientname + diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index d7008d93..e58da7a3 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -148,6 +148,10 @@ $(function () { APIstring += "=100"; } + if ("type" in GETDict) { + APIstring += "&type=" + GETDict.type; + } + tableApi = $("#all-queries").DataTable({ rowCallback: function (row, data) { // DNSSEC status