From cee3d536bc57192e5f992c8dd7e38e2bfafb164a Mon Sep 17 00:00:00 2001
From: XhmikosR
Date: Thu, 26 Dec 2019 17:59:17 +0200
Subject: [PATCH 1/9] Move fonts to the header.php
`@import` is discouraged because it's blocking.
Signed-off-by: XhmikosR
---
scripts/pi-hole/php/header.php | 1 +
style/vendor/AdminLTE.min.css | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php
index 8e594b47..5736a91d 100644
--- a/scripts/pi-hole/php/header.php
+++ b/scripts/pi-hole/php/header.php
@@ -200,6 +200,7 @@
+
diff --git a/style/vendor/AdminLTE.min.css b/style/vendor/AdminLTE.min.css
index d5efbc5a..03dd011c 100644
--- a/style/vendor/AdminLTE.min.css
+++ b/style/vendor/AdminLTE.min.css
@@ -1,4 +1,4 @@
-@import url(SourceSansPro/SourceSansPro.css);/*!
+/*!
* AdminLTE v2.1.2
* Author: Almsaeed Studio
* Website: Almsaeed Studio
From b9dcf3d4aaeeb26575ccbe2703243114b06a41a9 Mon Sep 17 00:00:00 2001
From: Ante Lucic
Date: Sat, 28 Dec 2019 22:36:42 -0500
Subject: [PATCH 2/9] Fix AdminLTE link
https://almsaeedstudio.com redirects to https://adminlte.io/ and has expired SSL cert
Signed-off-by: Ante Lucic
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 1caf7ef6..6e6698e9 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@

-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
From 793a6ec49fb6950ddf5df35b2091cb01f8eb7617 Mon Sep 17 00:00:00 2001
From: XhmikosR
Date: Thu, 2 Jan 2020 19:49:00 +0200
Subject: [PATCH 3/9] Remove unused function isMobile()
Signed-off-by: XhmikosR
---
scripts/pi-hole/js/index.js | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js
index 026b7394..8348a96e 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 ctx = document.getElementById("queryOverTimeChart").getContext("2d");
From 81d7d249109b222c7a412b28f86436a9ebcf7193 Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Wed, 1 Jan 2020 18:32:06 +0000
Subject: [PATCH 4/9] Use correct interval for the database query when clicking
on one of the long-term graph bars.
Signed-off-by: DL6ER
---
scripts/pi-hole/js/db_graph.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js
index aab3eb77..ab859122 100644
--- a/scripts/pi-hole/js/db_graph.js
+++ b/scripts/pi-hole/js/db_graph.js
@@ -330,7 +330,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;
}
From 0ed702197a75d621dd796d9f4ce5253c31891ee2 Mon Sep 17 00:00:00 2001
From: XhmikosR
Date: Wed, 8 Jan 2020 18:36:11 +0200
Subject: [PATCH 5/9] Change logo link to point to the dashboard.
Signed-off-by: XhmikosR
---
scripts/pi-hole/php/header.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php
index 668527e8..49b50361 100644
--- a/scripts/pi-hole/php/header.php
+++ b/scripts/pi-hole/php/header.php
@@ -257,7 +257,7 @@ if($auth) {
-
+
Ph
From dfe89b43114f54145221c8c3b67fe199dcc88e3a Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Sun, 19 Jan 2020 21:00:40 +0100
Subject: [PATCH 6/9] Remove null coalescing operator from list.php. This
feature is only availabe in PHP 7.
Signed-off-by: DL6ER
---
list.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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")
{
From f92812d4cd849b35a6dd60487bc0853ad18c0f63 Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Sun, 19 Jan 2020 22:32:28 +0100
Subject: [PATCH 7/9] Substitute null client names by empty strings.
Signed-off-by: DL6ER
---
scripts/pi-hole/php/groups.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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();
From 5abbeb2eff9267d3062eeb1f35bd0dca3b50e18c Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Tue, 21 Jan 2020 23:34:08 +0100
Subject: [PATCH 8/9] Add extra label when blocking happend during deep CNAME
inspection.
Signed-off-by: DL6ER
---
scripts/pi-hole/js/queries.js | 5 +++++
1 file changed, 5 insertions(+)
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);
From 88da85f5534bc8d2338bf64bf98ad3c3a8558e06 Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Sun, 26 Jan 2020 02:46:38 +0100
Subject: [PATCH 9/9] Add responsive design to new group tables to ensure they
render properly on very narrow screens. (#1137)
Signed-off-by: DL6ER
Co-authored-by: Dan Schaper
---
scripts/pi-hole/js/groups-adlists.js | 4 ++++
scripts/pi-hole/js/groups-clients.js | 4 ++++
scripts/pi-hole/js/groups-domains.js | 4 ++++
scripts/pi-hole/js/groups.js | 4 ++++
4 files changed, 16 insertions(+)
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"]