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

@@ -592,7 +592,7 @@ function updateTopClientsChart() {
url =
'<a href="queries.php?client=' +
clientip +
'" title="' +
'&type=blocked" title="' +
clientip +
'">' +
clientname +
@@ -1001,6 +1001,24 @@ $(function () {
return false;
});
$("#clientsChart").click(function (evt) {
var activePoints = clientsChart.getElementAtEvent(evt);
if (activePoints.length > 0) {
//get the internal index of slice in pie chart
var clickedElementindex = activePoints[0]._index;
//get specific label by index
var label = clientsChart.data.labels[clickedElementindex];
//get value by index
var from = label / 1000 - 300;
var until = label / 1000 + 300;
window.location.href = "queries.php?from=" + from + "&until=" + until;
}
return false;
});
if (document.getElementById("queryTypePieChart")) {
ctx = document.getElementById("queryTypePieChart").getContext("2d");
queryTypePieChart = new Chart(ctx, {

View File

@@ -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