mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Query Log: Show link to groups/lists page if applicable (#2916)
This commit is contained in:
@@ -283,17 +283,16 @@ function formatInfo(data) {
|
||||
"</span></strong></div>";
|
||||
}
|
||||
|
||||
var regexInfo = "",
|
||||
var listInfo = "",
|
||||
cnameInfo = "";
|
||||
if (data.regex_id !== null && data.regex_id > -1) {
|
||||
var regexLink =
|
||||
'<a href="groups/domains?domainid=' +
|
||||
data.regex_id +
|
||||
'" target="_blank">entry with ID ' +
|
||||
data.regex_id +
|
||||
"</a>";
|
||||
regexInfo =
|
||||
divStart + "Query was " + queryStatus.matchText + " by </td><td>" + regexLink + "</div>";
|
||||
if (data.list_id !== null && data.list_id !== -1) {
|
||||
// Some list matched - add link to search page
|
||||
|
||||
var listLink =
|
||||
'<a href="search?domain=' +
|
||||
encodeURIComponent(data.domain) +
|
||||
'" target="_blank">search lists</a>';
|
||||
listInfo = divStart + "Query was " + queryStatus.matchText + ", " + listLink + "</div>";
|
||||
}
|
||||
|
||||
if (queryStatus.isCNAME) {
|
||||
@@ -356,7 +355,7 @@ function formatInfo(data) {
|
||||
dnssecInfo +
|
||||
statusInfo +
|
||||
cnameInfo +
|
||||
regexInfo +
|
||||
listInfo +
|
||||
ttlInfo +
|
||||
replyInfo +
|
||||
dbInfo +
|
||||
|
||||
@@ -6,6 +6,18 @@
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
|
||||
/* global utils:false, apiFailure:false */
|
||||
var GETDict = {};
|
||||
|
||||
$(function () {
|
||||
GETDict = utils.parseQueryString();
|
||||
if (GETDict.domain !== undefined) {
|
||||
$("input[id^='domain']").val(GETDict.domain);
|
||||
}
|
||||
|
||||
if (GETDict.N !== undefined) {
|
||||
$("#number").val(GETDict.number);
|
||||
}
|
||||
});
|
||||
|
||||
function eventsource(partial) {
|
||||
const ta = $("#output");
|
||||
|
||||
+4
-1
@@ -1075,12 +1075,15 @@ table.dataTable tbody > tr > .selected {
|
||||
|
||||
#output {
|
||||
position: relative;
|
||||
display: grid;
|
||||
margin: 5px 0;
|
||||
min-height: 36px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
#output.pre-taillog {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.loading::before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<pre id="output" class="pre pre-scrollable"></pre>
|
||||
<pre id="output" class="pre pre-scrollable pre-taillog"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user