Merge pull request #1541 from pi-hole/fix/wording_query_log_links

Fix a few UI issues
This commit is contained in:
DL6ER
2020-08-15 13:07:37 +02:00
committed by GitHub
4 changed files with 50 additions and 1 deletions

View File

@@ -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
@@ -44,6 +48,24 @@ else if(isset($_GET["client"]))
{
$showing .= " queries for client ".htmlentities($_GET["client"]);
}
else if(isset($_GET["forwarddest"]))
{
if($_GET["forwarddest"] === "blocklist")
$showing .= " queries answered from blocklists";
elseif($_GET["forwarddest"] === "cache")
$showing .= " queries answered from cache";
else
$showing .= " queries for upstream destination ".htmlentities($_GET["forwarddest"]);
}
else if(isset($_GET["querytype"]))
{
$qtypes = ["A (IPv4)", "AAAA (IPv6)", "ANY", "SRV", "SOA", "PTR", "TXT", "NAPTR"];
$qtype = intval($_GET["querytype"]);
if($qtype > 0 && $qtype <= count($qtypes))
$showing .= " ".$qtypes[$qtype-1]." queries";
else
$showing .= " type ".$qtype." queries";
}
else if(isset($_GET["domain"]))
{
$showing .= " queries for domain ".htmlentities($_GET["domain"]);