diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 70f91b6b..9929f6db 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -931,83 +931,6 @@ $(document).ready(function() { updateClientsOverTime(); } - // Create / load "Query Types over Time" only if authorized - if(document.getElementById("queryTypeChart")) - { - ctx = document.getElementById("queryTypeChart").getContext("2d"); - queryTypeChart = new Chart(ctx, { - type: "line", - data: { - labels: [], - datasets: [ - { - label: "A: IPv4 queries", - pointRadius: 0, - pointHitRadius: 5, - pointHoverRadius: 5, - data: [], - cubicInterpolationMode: "monotone" - }, - { - label: "AAAA: IPv6 queries", - pointRadius: 0, - pointHitRadius: 5, - pointHoverRadius: 5, - data: [], - cubicInterpolationMode: "monotone" - } - ] - }, - options: { - tooltips: { - enabled: true, - mode: "x-axis", - callbacks: { - title: function(tooltipItem, data) { - var label = tooltipItem[0].xLabel; - var time = label.match(/(\d?\d):?(\d?\d?)/); - var h = parseInt(time[1], 10); - var m = parseInt(time[2], 10) || 0; - var from = padNumber(h)+":"+padNumber(m-5)+":00"; - var to = padNumber(h)+":"+padNumber(m+4)+":59"; - return "Query types from "+from+" to "+to; - }, - label: function(tooltipItems, data) { - return data.datasets[tooltipItems.datasetIndex].label + ": " + (100.0*tooltipItems.yLabel).toFixed(1) + "%"; - } - } - }, - legend: { - display: false - }, - scales: { - xAxes: [{ - type: "time", - time: { - unit: "hour", - displayFormats: { - hour: "HH:mm" - }, - tooltipFormat: "HH:mm" - } - }], - yAxes: [{ - ticks: { - mix: 0.0, - max: 1.0, - beginAtZero: true, - callback: function(value, index, values) { - return Math.round(value*100) + " %"; - } - }, - stacked: true - }] - }, - maintainAspectRatio: true - } - }); - } - // Create / load "Top Domains" and "Top Advertisers" only if authorized if(document.getElementById("domain-frequency") && document.getElementById("ad-frequency"))