mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge pull request #1627 from pi-hole/new/query_log_upstream_details
Show detailed upstream destination in Query Log(s)
This commit is contained in:
+3
-3
@@ -94,7 +94,7 @@ if (isset($_GET['getAllQueries']) && $auth)
|
||||
{
|
||||
$from = intval($_GET["from"]);
|
||||
$until = intval($_GET["until"]);
|
||||
$dbquery = "SELECT timestamp, type, domain, client, status FROM queries WHERE timestamp >= :from AND timestamp <= :until ";
|
||||
$dbquery = "SELECT timestamp, type, domain, client, status, forward FROM queries WHERE timestamp >= :from AND timestamp <= :until ";
|
||||
if(isset($_GET["types"]))
|
||||
{
|
||||
$types = $_GET["types"];
|
||||
@@ -153,8 +153,8 @@ if (isset($_GET['getAllQueries']) && $auth)
|
||||
$query_type = "UNKN";
|
||||
break;
|
||||
}
|
||||
// array: time type domain client status
|
||||
$allQueries[] = [$row[0], $query_type, utf8_encode($row[2]), utf8_encode($c), $row[4]];
|
||||
// array: time type domain client status upstream destination
|
||||
$allQueries[] = [$row[0], $query_type, utf8_encode($row[2]), utf8_encode($c), $row[4], utf8_encode($row[5])];
|
||||
}
|
||||
}
|
||||
$result = array('data' => $allQueries);
|
||||
|
||||
@@ -268,7 +268,10 @@ $(function () {
|
||||
break;
|
||||
case 2:
|
||||
color = "green";
|
||||
fieldtext = "OK <br class='hidden-lg'>(forwarded)";
|
||||
fieldtext =
|
||||
"OK <br class='hidden-lg'>(forwarded to " +
|
||||
(data.length > 5 && data[5] !== "N/A" ? data[5] : "") +
|
||||
")";
|
||||
buttontext =
|
||||
'<button type="button" class="btn btn-default btn-sm text-red"><i class="fa fa-ban"></i> Blacklist</button>';
|
||||
break;
|
||||
|
||||
@@ -188,7 +188,11 @@ $(function () {
|
||||
break;
|
||||
case "2":
|
||||
colorClass = "text-green";
|
||||
fieldtext = "OK <br class='hidden-lg'>(forwarded)" + dnssecStatus;
|
||||
fieldtext =
|
||||
"OK <br class='hidden-lg'>(forwarded to " +
|
||||
(data.length > 10 && data[10] !== "N/A" ? data[10] : "") +
|
||||
")" +
|
||||
dnssecStatus;
|
||||
buttontext =
|
||||
'<button type="button" class="btn btn-default btn-sm text-red"><i class="fa fa-ban"></i> Blacklist</button>';
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user