mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 18:59:48 +01:00
Merge pull request #1541 from pi-hole/fix/wording_query_log_links
Fix a few UI issues
This commit is contained in:
@@ -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, {
|
||||
|
||||
@@ -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