diff --git a/README.md b/README.md index 1bf12f2d..4c3684e3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Pi-hole Web interface

-Pi-hole[®](https://pi-hole.net/trademark-rules-and-brand-guidelines/)'s Web interface (based off of [AdminLTE](https://almsaeedstudio.com)) provides a central location to manage your Pi-hole and review the statistics generated by FTLDNS[™](https://pi-hole.net/trademark-rules-and-brand-guidelines/). +Pi-hole[®](https://pi-hole.net/trademark-rules-and-brand-guidelines/)'s Web interface (based off of [AdminLTE](https://github.com/ColorlibHQ/AdminLTE)) provides a central location to manage your Pi-hole and review the statistics generated by FTLDNS[™](https://pi-hole.net/trademark-rules-and-brand-guidelines/). - **Easy-to-interpret**: simple graphs and beautiful colors make Pi-hole's stats easy to understand - **Responsive**: looks great on desktop, tablets, and mobile devices diff --git a/list.php b/list.php index 3f24c07c..95fbcd1a 100644 --- a/list.php +++ b/list.php @@ -8,7 +8,7 @@ require "scripts/pi-hole/php/header.php"; -$list = $_GET['l'] ?? ''; +$list = isset($_GET['l']) ? $_GET['l'] : ''; if ($list == "white") { diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index e39f39b3..590788d0 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -363,7 +363,7 @@ $("#queryOverTimeChart").click(function(evt) { //get value by index var from = label / 1000; - var until = label / 1000 + 600; + var until = label / 1000 + interval; window.location.href = "db_queries.php?from=" + from + "&until=" + until; } diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 53a137ba..625a3f83 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -183,6 +183,10 @@ function initTable() { ""; $("td:eq(4)", row).html(button); }, + dom: + "<'row'<'col-sm-4'l><'col-sm-8'f>>" + + "<'row'<'col-sm-12'<'table-responsive'tr>>>" + + "<'row'<'col-sm-5'i><'col-sm-7'p>>", lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index 68fbed9e..bb07ea7b 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -189,6 +189,10 @@ function initTable() { ""; $("td:eq(2)", row).html(button); }, + dom: + "<'row'<'col-sm-4'l><'col-sm-8'f>>" + + "<'row'<'col-sm-12'<'table-responsive'tr>>>" + + "<'row'<'col-sm-5'i><'col-sm-7'p>>", lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index b83c5296..6646a957 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -200,6 +200,10 @@ function initTable() { ""; $("td:eq(5)", row).html(button); }, + dom: + "<'row'<'col-sm-4'l><'col-sm-8'f>>" + + "<'row'<'col-sm-12'<'table-responsive'tr>>>" + + "<'row'<'col-sm-5'i><'col-sm-7'p>>", lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index b7ec372c..2ea23c5b 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -144,6 +144,10 @@ $(document).ready(function() { $("td:eq(3)", row).html(button); } }, + dom: + "<'row'<'col-sm-4'l><'col-sm-8'f>>" + + "<'row'<'col-sm-12'<'table-responsive'tr>>>" + + "<'row'<'col-sm-5'i><'col-sm-7'p>>", lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 4f61e62b..fcffe59a 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -742,26 +742,7 @@ function updateSummaryData(runOnce) { } $(document).ready(function() { - var isMobile = { - Windows: function() { - return /IEMobile/i.test(navigator.userAgent); - }, - Android: function() { - return /Android/i.test(navigator.userAgent); - }, - BlackBerry: function() { - return /BlackBerry/i.test(navigator.userAgent); - }, - iOS: function() { - return /iPhone|iPad|iPod/i.test(navigator.userAgent); - }, - any: function() { - return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Windows(); - } - }; - // Pull in data via AJAX - updateSummaryData(); var blockedColor = "#999"; diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 1422e1b4..e6c41507 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -228,6 +228,11 @@ $(document).ready(function() { buttontext = ""; } + // Add extra label when blocking happend during deep CNAME inspection + if (blocked && data.length > 6 && data[6] === "3") { + fieldtext += "
CNAME"; + } + $(row).addClass(colorClass); $("td:eq(4)", row).html(fieldtext); $("td:eq(6)", row).html(buttontext); diff --git a/scripts/pi-hole/php/groups.php b/scripts/pi-hole/php/groups.php index ff6f7aa5..252e52cd 100644 --- a/scripts/pi-hole/php/groups.php +++ b/scripts/pi-hole/php/groups.php @@ -209,7 +209,7 @@ if ($_POST['action'] == 'get_groups') { // Loop over results $ips = array(); while ($res = $query->fetchArray(SQLITE3_ASSOC)) { - $ips[$res['ip']] = $res['name']; + $ips[$res['ip']] = $res['name'] !== null ? $res['name'] : ''; } $FTLdb->close(); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 6491aa28..49b50361 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -201,6 +201,7 @@ + @@ -256,7 +257,7 @@ if($auth) {
-