mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Add ability to filter for blocked queries in conjunction the client filter in the Query Log. Request such filtered data when clicking on a client in the Top Clients (blocked only) table on the dashboard.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -587,7 +587,7 @@ function updateTopClientsChart() {
|
||||
url =
|
||||
'<a href="queries.php?client=' +
|
||||
clientip +
|
||||
'" title="' +
|
||||
'&type=blocked" title="' +
|
||||
clientip +
|
||||
'">' +
|
||||
clientname +
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user