From 9b0c212a536b93a7cb0644eeee17bb9ec747a455 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 22 Feb 2025 15:45:33 +0200 Subject: [PATCH 01/37] Ran autoprefixer Move selector where appropriate Signed-off-by: XhmikosR --- style/pi-hole.css | 22 +++------- style/themes/default-dark.css | 1 + style/themes/default-darker.css | 15 ++++++- style/themes/default-light.css | 1 + style/themes/high-contrast-dark.css | 7 +++- style/themes/high-contrast.css | 4 ++ style/themes/lcars.css | 62 +++-------------------------- 7 files changed, 34 insertions(+), 78 deletions(-) diff --git a/style/pi-hole.css b/style/pi-hole.css index 70fbc282..d8e64a6e 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -37,20 +37,6 @@ background: url("../img/boxed-bg.png") repeat fixed; } -@-webkit-keyframes Pulse { - from { - opacity: 0; - } - - 50% { - opacity: 1; - } - - to { - opacity: 0; - } -} - @keyframes Pulse { from { opacity: 0; @@ -97,7 +83,6 @@ td.lookatme { inset: 0; z-index: 1; /* 20 steps / 2 seconds = 10fps */ - -webkit-animation: 2s infinite Pulse steps(20); animation: 2s infinite Pulse steps(20); } @@ -188,7 +173,6 @@ td.lookatme { border-radius: 50%; border: 4px solid #c0c0c0; border-right-color: transparent; - -webkit-animation: fa-spin 1s infinite linear; animation: fa-spin 1s infinite linear; } @@ -331,7 +315,6 @@ td.lookatme { .no-user-select { -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; } @@ -1141,6 +1124,10 @@ table.dataTable tbody > tr > .selected { letter-spacing: 0.5em; } +.totp_token::-moz-placeholder { + opacity: 0.1; +} + .totp_token::placeholder { opacity: 0.1; } @@ -1151,6 +1138,7 @@ table.dataTable tbody > tr > .selected { right: 0.6em; z-index: 10; background: var(--overlay-bgcolor); + width: -moz-fit-content; width: fit-content; border-radius: 0.5em; padding: 0; diff --git a/style/themes/default-dark.css b/style/themes/default-dark.css index 62475806..76e84636 100644 --- a/style/themes/default-dark.css +++ b/style/themes/default-dark.css @@ -518,6 +518,7 @@ textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: #bec5cb !important; -webkit-box-shadow: 0 0 0px 1000px #353c42 inset; + -webkit-transition: background-color 1s ease-in-out 0s; transition: background-color 1s ease-in-out 0s; } .form-control[disabled], diff --git a/style/themes/default-darker.css b/style/themes/default-darker.css index 709ccfac..4b674611 100644 --- a/style/themes/default-darker.css +++ b/style/themes/default-darker.css @@ -54,6 +54,10 @@ table { border-color: #545b5e; background-color: transparent; } +::-moz-placeholder { + color: #b2aba1; + opacity: 0.5 !important; +} ::placeholder { color: #b2aba1; opacity: 0.5 !important; @@ -66,6 +70,7 @@ textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: #b2aba1 !important; -webkit-box-shadow: 0 0 0px 1000px #181a1b inset; + -webkit-transition: background-color 1s ease-in-out 0s; transition: background-color 1s ease-in-out 0s; } ::-webkit-scrollbar { @@ -87,11 +92,11 @@ select:-webkit-autofill { * { scrollbar-color: #454a4d #202324; } -::selection { +::-moz-selection { background-color: #004daa !important; color: #e8e6e3 !important; } -::-moz-selection { +::selection { background-color: #004daa !important; color: #e8e6e3 !important; } @@ -552,6 +557,9 @@ output { border-color: rgb(44, 103, 137); box-shadow: none; } +.form-control::-moz-placeholder { + color: rgb(168, 160, 149); +} .form-control::placeholder { color: rgb(168, 160, 149); } @@ -2477,6 +2485,9 @@ a:focus { background-color: rgba(24, 26, 27, 0.9); background-image: none; } +.main-header #navbar-search-input.form-control::-moz-placeholder { + color: rgb(200, 195, 188); +} .main-header #navbar-search-input.form-control::placeholder { color: rgb(200, 195, 188); } diff --git a/style/themes/default-light.css b/style/themes/default-light.css index ae25d188..259ed466 100644 --- a/style/themes/default-light.css +++ b/style/themes/default-light.css @@ -294,6 +294,7 @@ textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: #666 !important; -webkit-box-shadow: 0 0 0px 1000px #fff inset; + -webkit-transition: background-color 1s ease-in-out 0s; transition: background-color 1s ease-in-out 0s; } diff --git a/style/themes/high-contrast-dark.css b/style/themes/high-contrast-dark.css index faede82a..1b75ff8e 100644 --- a/style/themes/high-contrast-dark.css +++ b/style/themes/high-contrast-dark.css @@ -675,6 +675,7 @@ textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: var(--main-text-color) !important; -webkit-box-shadow: 0 0 0px 1000px #3c4652 inset; + -webkit-transition: background-color 1s ease-in-out 0s; transition: background-color 1s ease-in-out 0s; } @@ -684,6 +685,7 @@ fieldset[disabled] .form-control { background-color: #3c4652; opacity: 1; -moz-appearance: textfield; + -webkit-appearance: textfield; appearance: textfield; } @@ -854,10 +856,11 @@ input[type="password"]::-webkit-caps-lock-indicator { background-color: transparent; } -.form-control::placeholder { +.form-control::-moz-placeholder { color: #9ab; } -.form-control::-webkit-input-placeholder { + +.form-control::placeholder { color: #9ab; } .form-control:focus::placeholder, diff --git a/style/themes/high-contrast.css b/style/themes/high-contrast.css index ab537b45..d51e6118 100644 --- a/style/themes/high-contrast.css +++ b/style/themes/high-contrast.css @@ -202,6 +202,9 @@ a:hover { .form-control { color: #000; } +.form-control::-moz-placeholder { + color: #6c747b; +} .form-control::placeholder { color: #6c747b; } @@ -331,6 +334,7 @@ textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: #666 !important; -webkit-box-shadow: 0 0 0px 1000px #fff inset; + -webkit-transition: background-color 1s ease-in-out 0s; transition: background-color 1s ease-in-out 0s; } diff --git a/style/themes/lcars.css b/style/themes/lcars.css index 87fc6a48..3a350ee2 100644 --- a/style/themes/lcars.css +++ b/style/themes/lcars.css @@ -306,6 +306,7 @@ textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: #fff !important; -webkit-box-shadow: 0 0 0 1000px #000 inset; + -webkit-transition: background-color 1s ease-in-out 0s; transition: background-color 1s ease-in-out 0s; } @@ -346,13 +347,16 @@ p.login-box-msg, z-index: 1; } +.form-control::-moz-placeholder { + color: #456; +} + .form-control::placeholder { color: #456; } .form-control:focus { border-color: #48f; - -webkit-box-shadow: none; box-shadow: none; } @@ -589,8 +593,6 @@ p.login-box-msg, } .nav.navbar-nav { - display: -webkit-box; - display: -ms-flexbox; display: flex; justify-content: space-between; align-items: center; @@ -1569,38 +1571,6 @@ table.dataTable { } /*** Animation keyframes ***/ -@-webkit-keyframes flash { - 0% { - filter: opacity(0.35) contrast(2); - } - 5% { - filter: opacity(0.7) contrast(2); - } - 10% { - filter: opacity(0.35) contrast(2); - } - 15% { - filter: opacity(0.7) contrast(2); - } - 20% { - filter: opacity(0.35) contrast(2); - } - 25% { - filter: opacity(0.7) contrast(2); - } - 30% { - filter: opacity(0.35) contrast(2); - } - 35% { - filter: opacity(0.7) contrast(1); - } - 70% { - filter: opacity(1) contrast(1) brightness(1.2); - } - 90% { - filter: none; - } -} @keyframes flash { 0% { @@ -1635,37 +1605,15 @@ table.dataTable { } } -@-webkit-keyframes fire { - 0% { - filter: drop-shadow(0 0 2px #f90); - } - 60% { - filter: none; - } -} - @keyframes fire { 0% { filter: drop-shadow(0 0 2px #f90); } 60% { - -webkit-filter: none; filter: none; } } -@-webkit-keyframes warningPulse { - 0% { - opacity: 0; - } - 50% { - opacity: 1; - } - 100% { - opacity: 0; - } -} - @keyframes warningPulse { 0% { opacity: 0; From 9fe93df5536f46183264cb0000abff46e27bae12 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 22 Feb 2025 17:58:11 +0200 Subject: [PATCH 02/37] package.json: properly configure xo and postcss xo doesn't understand CSS syntax so it was useless that it was checking CSS files. Also, configure autoprefixer so that its changes do not need a prettier fix after that. Signed-off-by: XhmikosR --- package.json | 6 ++++-- postcss.config.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 postcss.config.js diff --git a/package.json b/package.json index 188282eb..20830013 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "prettier:check": "prettier -l \"style/*.css\" \"style/themes/*.css\" \"scripts/**/*.js\"", "prettier:fix": "prettier --write \"style/*.css\" \"style/themes/*.css\" \"scripts/**/*.js\"", "xo": "xo", - "xo:check": "npm run xo -- \"style/*.css\" \"style/themes/*.css\" \"scripts/**\"", - "xo:fix": "npm run xo -- --fix \"style/*.css\" \"style/themes/*.css\" \"scripts/**\"", + "xo:check": "npm run xo", + "xo:fix": "npm run xo -- --fix", "test": "npm run prettier:check && npm run xo:check", "testpr": "npm run prettier:fix && git diff --ws-error-highlight=all --color=always --exit-code && npm run xo:check" }, @@ -91,11 +91,13 @@ } ], "unicorn/filename-case": "off", + "unicorn/no-anonymous-default-export": "off", "unicorn/no-array-for-each": "off", "unicorn/no-for-loop": "off", "unicorn/no-document-cookie": "off", "unicorn/numeric-separators-style": "off", "unicorn/prefer-includes": "off", + "unicorn/prefer-module": "off", "unicorn/prefer-node-append": "off", "unicorn/prefer-number-properties": "off", "unicorn/prefer-query-selector": "off", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 00000000..88658064 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,11 @@ +/* eslint-env node */ + +"use strict"; + +module.exports = (/* ctx */) => ({ + plugins: { + autoprefixer: { + cascade: false, + }, + }, +}); From dca9a00563fb3421ab47f02107c93bf93d6d9350 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Tue, 25 Feb 2025 17:58:40 -0300 Subject: [PATCH 03/37] Change kind from "exact" to "regex" only after the loop Signed-off-by: RD WebDesign --- scripts/js/groups-domains.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/js/groups-domains.js b/scripts/js/groups-domains.js index 8ffc2054..975d2d86 100644 --- a/scripts/js/groups-domains.js +++ b/scripts/js/groups-domains.js @@ -496,15 +496,17 @@ function addDomain() { return; } - for (var i = 0; i < domains.length; i++) { - if (kind === "exact" && wildcardChecked) { + // Check if the wildcard checkbox was marked and transform the domains into regex + if (kind === "exact" && wildcardChecked) { + for (var i = 0; i < domains.length; i++) { // Transform domain to wildcard if specified by user domains[i] = "(\\.|^)" + domains[i].replaceAll(".", "\\.") + "$"; - kind = "regex"; // strip leading "*." if specified by user in wildcard mode if (domains[i].startsWith("*.")) domains[i] = domains[i].substr(2); } + + kind = "regex"; } // determine list type From f3684533aa68af9532fe22eae7d07983ff3fe876 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Wed, 26 Feb 2025 14:24:25 -0300 Subject: [PATCH 04/37] Remove leading "*." before turning the domain into a regex Signed-off-by: RD WebDesign --- scripts/js/groups-domains.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/js/groups-domains.js b/scripts/js/groups-domains.js index 975d2d86..8c8f86e5 100644 --- a/scripts/js/groups-domains.js +++ b/scripts/js/groups-domains.js @@ -499,11 +499,11 @@ function addDomain() { // Check if the wildcard checkbox was marked and transform the domains into regex if (kind === "exact" && wildcardChecked) { for (var i = 0; i < domains.length; i++) { - // Transform domain to wildcard if specified by user - domains[i] = "(\\.|^)" + domains[i].replaceAll(".", "\\.") + "$"; - - // strip leading "*." if specified by user in wildcard mode + // Strip leading "*." if specified by user in wildcard mode if (domains[i].startsWith("*.")) domains[i] = domains[i].substr(2); + + // Transform domain into a wildcard regex + domains[i] = "(\\.|^)" + domains[i].replaceAll(".", "\\.") + "$"; } kind = "regex"; From 714b135afa45f9a69d21507c2e76649c93d88c4d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 26 Feb 2025 20:10:41 +0100 Subject: [PATCH 05/37] We should show load, not CPU% Signed-off-by: DL6ER --- scripts/js/footer.js | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 63197d35..c5c53643 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -360,37 +360,33 @@ function updateSystemInfo() { $("#sysinfo-memory-swap").text("No swap space available"); } - color = system.cpu.load.percent[0] > 100 ? "text-red" : "text-green-light"; + color = system.cpu.load.raw[0] > system.cpu.nprocs ? "text-red" : "text-green-light"; $("#cpu").html( '  CPU: ' + - system.cpu.load.percent[0].toFixed(1) + - " %" + '">  Load: ' + + system.cpu.load.raw[0].toFixed(2) + + " / " + + system.cpu.load.raw[1].toFixed(2) + + " / " + + system.cpu.load.raw[2].toFixed(2) ); $("#cpu").prop( "title", - "Load: " + - system.cpu.load.raw[0].toFixed(2) + - " " + - system.cpu.load.raw[1].toFixed(2) + - " " + - system.cpu.load.raw[2].toFixed(2) + - " on " + + "Shown load metrics are load averages for the past 1, 5, and 15 minutes on a system having " + system.cpu.nprocs + - " cores running " + + " cores and running " + system.procs + " processes" ); - $("#sysinfo-cpu").text( - system.cpu.load.percent[0].toFixed(1) + - "% (load: " + + $("#sysinfo-cpu").html( + "Load: " + system.cpu.load.raw[0].toFixed(2) + - " " + + " / " + system.cpu.load.raw[1].toFixed(2) + - " " + + " / " + system.cpu.load.raw[2].toFixed(2) + - ") on " + + " on " + system.cpu.nprocs + " cores running " + system.procs + From 98d162fa0168ca83084469ea807f727cca59b189 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 27 Feb 2025 05:58:44 +0100 Subject: [PATCH 06/37] Show total CPU % on the settings / system info page Signed-off-by: DL6ER --- scripts/js/footer.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index c5c53643..559d3f8c 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -377,16 +377,14 @@ function updateSystemInfo() { system.cpu.nprocs + " cores and running " + system.procs + - " processes" + " processes " + + (system.cpu.load.raw[0] > system.cpu.nprocs + ? " (load is higher than the number of cores)" + : "") ); $("#sysinfo-cpu").html( - "Load: " + - system.cpu.load.raw[0].toFixed(2) + - " / " + - system.cpu.load.raw[1].toFixed(2) + - " / " + - system.cpu.load.raw[2].toFixed(2) + - " on " + + system.cpu["%cpu"].toFixed(1) + + "% on " + system.cpu.nprocs + " cores running " + system.procs + From 362ffac148eb457cfe6c898b2e07382022e574c1 Mon Sep 17 00:00:00 2001 From: Dominik Date: Thu, 27 Feb 2025 19:37:35 +0100 Subject: [PATCH 07/37] Improve tooltip wording Co-authored-by: RD WebDesign Signed-off-by: Dominik --- scripts/js/footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 559d3f8c..adad050e 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -373,7 +373,7 @@ function updateSystemInfo() { ); $("#cpu").prop( "title", - "Shown load metrics are load averages for the past 1, 5, and 15 minutes on a system having " + + "Load averages for the past 1, 5, and 15 minutes\non a system with " + system.cpu.nprocs + " cores and running " + system.procs + From efa9d146bc5ef9a8edc76f4862118feb134412cb Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Thu, 27 Feb 2025 22:04:18 -0300 Subject: [PATCH 08/37] Add a hidden column to allow searching by hostnames Note: using "hide" CSS class to hide the column even if datatables decides to show it Signed-off-by: RD WebDesign --- scripts/js/network.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/js/network.js b/scripts/js/network.js index 10397bbd..a125a7b3 100644 --- a/scripts/js/network.js +++ b/scripts/js/network.js @@ -238,6 +238,7 @@ $(function () { { data: "numQueries", width: "9%", render: $.fn.dataTable.render.text() }, { data: "", width: "6%", orderable: false }, { data: "", width: "6%", orderable: false }, + { data: "ips[].name", visible: false, class: "hide" }, ], drawCallback: function () { From 6cad52b8d1538e84518c20767c65acf87266c6b7 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Thu, 27 Feb 2025 23:29:23 -0300 Subject: [PATCH 09/37] Set the interface name in Settings > DNS page Signed-off-by: RD WebDesign --- scripts/js/settings-dns.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/js/settings-dns.js b/scripts/js/settings-dns.js index 7059fc5e..6a2e4680 100644 --- a/scripts/js/settings-dns.js +++ b/scripts/js/settings-dns.js @@ -99,6 +99,11 @@ function fillDNSupstreams(value, servers) { applyCheckboxRadioStyle(); } +function setInterfaceName(interface) { + $("#interface-name-1").text(interface); + $("#interface-name-2").text(interface); +} + // Update the textfield with all (incl. custom) upstream servers function updateDNSserversTextfield(upstreams, customServers) { $("#DNSupstreamsTextfield").val(upstreams.join("\n")); @@ -114,6 +119,7 @@ function processDNSConfig() { .done(function (data) { // Initialize the DNS upstreams fillDNSupstreams(data.config.dns.upstreams, data.dns_servers); + setInterfaceName(data.config.dns.interface.value); setConfigValues("dns", "dns", data.config.dns); }) .fail(function (data) { From 566bf15cd9d0deec2affe570420593cbafc0bceb Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Thu, 27 Feb 2025 23:31:08 -0300 Subject: [PATCH 10/37] Use tag to show the interface name Signed-off-by: RD WebDesign --- settings-dns.lp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings-dns.lp b/settings-dns.lp index 9de56d8e..d2e4489e 100644 --- a/settings-dns.lp +++ b/settings-dns.lp @@ -127,11 +127,11 @@ mg.include('scripts/lua/settings_header.lp','r')

Potentially dangerous options

Make sure your Pi-hole is properly firewalled!
- +
- +
From abd7e81780491d9247db520e39e1a8a2cf7102f0 Mon Sep 17 00:00:00 2001 From: yubiuser Date: Fri, 28 Feb 2025 14:17:22 +0100 Subject: [PATCH 11/37] Fix total query tooltip on dahboard Signed-off-by: yubiuser --- index.lp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.lp b/index.lp index 3e5e580c..36998d83 100644 --- a/index.lp +++ b/index.lp @@ -14,7 +14,7 @@ mg.include('scripts/lua/header_authenticated.lp','r')
-
+

Total queries

---

From f6168a4d037d815b9381a1fa336f3eaf89d8fac7 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Sat, 1 Mar 2025 01:19:01 -0300 Subject: [PATCH 12/37] Use margin-right instead of spaces after dnssec icon in Query Log Signed-off-by: RD WebDesign --- scripts/js/queries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/js/queries.js b/scripts/js/queries.js index d4dd7b91..416594d0 100644 --- a/scripts/js/queries.js +++ b/scripts/js/queries.js @@ -609,13 +609,13 @@ $(function () { // Prefix colored DNSSEC icon to domain text var dnssecIcon = ""; dnssecIcon = - '  '; + '">'; // Escape HTML in domain domain = dnssecIcon + utils.escapeHtml(domain); From 54e5b29416093ac76cd83d8017fa9e794dfe94a4 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Sun, 2 Mar 2025 00:05:01 -0300 Subject: [PATCH 13/37] Setting default values for each property of `versions` object - set Docker versions (local/remote) to `null` if they are empty strings, undefined or null; - set other components versions to `"N/A"` if they are empty strings, undefined or null; - set branches and hashes to `null` if they are empty strings, undefined or null; Signed-off-by: RD WebDesign --- scripts/js/footer.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 63197d35..a48b09db 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -485,37 +485,37 @@ function updateVersionInfo() { var versions = [ { name: "Docker Tag", - local: version.docker.local, - remote: version.docker.remote, + local: version.docker.local || null, + remote: version.docker.remote || null, branch: null, hash: null, url: "https://github.com/pi-hole/docker-pi-hole/releases", }, { name: "Core", - local: version.core.local.version, - remote: version.core.remote.version, - branch: version.core.local.branch, - hash: version.core.local.hash, - hash_remote: version.core.remote.hash, + local: version.core.local.version || "N/A", + remote: version.core.remote.version || "N/A", + branch: version.core.local.branch || null, + hash: version.core.local.hash || null, + hash_remote: version.core.remote.hash || null, url: "https://github.com/pi-hole/pi-hole/releases", }, { name: "FTL", - local: version.ftl.local.version, - remote: version.ftl.remote.version, - branch: version.ftl.local.branch, - hash: version.ftl.local.hash, - hash_remote: version.ftl.remote.hash, + local: version.ftl.local.version || "N/A", + remote: version.ftl.remote.version || "N/A", + branch: version.ftl.local.branch || null, + hash: version.ftl.local.hash || null, + hash_remote: version.ftl.remote.hash || null, url: "https://github.com/pi-hole/FTL/releases", }, { name: "Web interface", - local: version.web.local.version, - remote: version.web.remote.version, - branch: version.web.local.branch, - hash: version.web.local.hash, - hash_remote: version.web.remote.hash, + local: version.web.local.version || "N/A", + remote: version.web.remote.version || "N/A", + branch: version.web.local.branch || null, + hash: version.web.local.hash || null, + hash_remote: version.web.remote.hash || null, url: "https://github.com/pi-hole/web/releases", }, ]; From 9a40f4a7e13ebbbe0b68999e1c39f9c83856378b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 3 Mar 2025 09:14:36 +0100 Subject: [PATCH 14/37] Improve memory unit selection for devices with less than 1 GB of RAM Signed-off-by: DL6ER --- scripts/js/footer.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 63197d35..1dcb2699 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -330,8 +330,20 @@ function updateSystemInfo() { var system = data.system; var percentRAM = system.memory.ram["%used"]; var percentSwap = system.memory.swap["%used"]; - var totalRAMGB = system.memory.ram.total / 1024 / 1024; - var totalSwapGB = system.memory.swap.total / 1024 / 1024; + let totalRAM = system.memory.ram.total / 1024; + let totalRAMUnit = "MB"; + if (totalRAM > 1024) { + totalRAM /= 1024; + totalRAMUnit = "GB"; + } + + let totalSwap = system.memory.swap.total / 1024; + let totalSwapUnit = "MB"; + if (totalSwap > 1024) { + totalSwap /= 1024; + totalSwapUnit = "GB"; + } + var swap = system.memory.swap.total > 0 ? ((1e2 * system.memory.swap.used) / system.memory.swap.total).toFixed(1) + " %" @@ -347,14 +359,14 @@ function updateSystemInfo() { ); $("#memory").prop( "title", - "Total memory: " + totalRAMGB.toFixed(1) + " GB, Swap usage: " + swap + "Total memory: " + totalRAM.toFixed(1) + " " + totalRAMUnit + ", Swap usage: " + swap ); $("#sysinfo-memory-ram").text( - percentRAM.toFixed(1) + "% of " + totalRAMGB.toFixed(1) + " GB is used" + percentRAM.toFixed(1) + "% of " + totalRAM.toFixed(1) + " " + totalRAMUnit + " is used" ); if (system.memory.swap.total > 0) { $("#sysinfo-memory-swap").text( - percentSwap.toFixed(1) + "% of " + totalSwapGB.toFixed(1) + " GB is used" + percentSwap.toFixed(1) + "% of " + totalSwap.toFixed(1) + " " + totalSwapUnit + " is used" ); } else { $("#sysinfo-memory-swap").text("No swap space available"); From 96be2b73634e74032dbe728a704f73433f9c6874 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 4 Mar 2025 12:41:31 +0200 Subject: [PATCH 15/37] Use singular if we have one core Signed-off-by: XhmikosR --- scripts/js/footer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 1dcb2699..22b7f2e9 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -390,7 +390,9 @@ function updateSystemInfo() { system.cpu.load.raw[2].toFixed(2) + " on " + system.cpu.nprocs + - " cores running " + + " core" + + (system.cpu.nprocs > 1 ? "s" : "") + + " running " + system.procs + " processes" ); @@ -404,7 +406,9 @@ function updateSystemInfo() { system.cpu.load.raw[2].toFixed(2) + ") on " + system.cpu.nprocs + - " cores running " + + " core" + + (system.cpu.nprocs > 1 ? "s" : "") + + " running " + system.procs + " processes" ); From dc0dc62151380b9d1a5e845e104ec908808b02e6 Mon Sep 17 00:00:00 2001 From: Alex Whitman Date: Thu, 27 Feb 2025 18:12:23 +0000 Subject: [PATCH 16/37] Fix typo in DHCP settings page Signed-off-by: Alex Whitman --- settings-dhcp.lp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings-dhcp.lp b/settings-dhcp.lp index 196c039f..0e918e26 100644 --- a/settings-dhcp.lp +++ b/settings-dhcp.lp @@ -202,7 +202,7 @@ mg.include('scripts/lua/settings_header.lp','r')
  • Addresses allocated like this are not constrained to be in the DHCP range specified above but they must be in the same subnet. For subnets which don't need a pool of dynamically allocated addresses, you can set a one-address range above and specify only static leases here.
  • It is allowed to use client identifiers (called client DUID in IPv6-land) rather than hardware addresses to identify hosts by prefixing with id:. Thus lines like id:01:02:03:04,..... refer to the host with client identifier 01:02:03:04. It is also allowed to specify the client ID as text, like this: id:clientidastext,.....
  • -
  • A single line may contain an IPv4 address or one or more IPv6 addresses, or both. IPv6 addresses must be bracketed by square brackets thus: laptop,[1234::56] IPv6 addresses may contain only the host-identifier part: laptop,[::56] in which case they act as wildcards in constructed DHCP ranges, with the appropriate network part inserted. For IPv6, an address may include a prefix length: laptop,[1234:50/126] which (in this case) specifies four addresses, 1234::50 to 1234::53. This (an the ability to specify multiple addresses) is useful when a host presents either a consistent name or hardware-ID, but varying DUIDs, since it allows dnsmasq to honour the static address allocation but assign a different address for each DUID. This typically occurs when chain netbooting, as each stage of the chain gets in turn allocates an address.
  • +
  • A single line may contain an IPv4 address or one or more IPv6 addresses, or both. IPv6 addresses must be bracketed by square brackets thus: laptop,[1234::56] IPv6 addresses may contain only the host-identifier part: laptop,[::56] in which case they act as wildcards in constructed DHCP ranges, with the appropriate network part inserted. For IPv6, an address may include a prefix length: laptop,[1234:50/126] which (in this case) specifies four addresses, 1234::50 to 1234::53. This (and the ability to specify multiple addresses) is useful when a host presents either a consistent name or hardware-ID, but varying DUIDs, since it allows dnsmasq to honour the static address allocation but assign a different address for each DUID. This typically occurs when chain netbooting, as each stage of the chain gets in turn allocates an address.
  • For DHCPv4, the special option id:* means "ignore any client-id and use MAC addresses only." This is useful when a client presents a client-id sometimes but not others.
  • If a name appears in /etc/hosts, the associated address can be allocated to a DHCP lease, but only if a separate line specifying the name also exists. Only one hostname can be given per line, but aliases are possible by using CNAMEs. Note that /etc/hosts is NOT used when the DNS server side of dnsmasq is disabled by setting the DNS server port to zero.
  • From b31b5008a8f0671ced07edcd73d9fa9102ac5683 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Tue, 4 Mar 2025 23:08:55 +0000 Subject: [PATCH 17/37] Live long and prosper. Signed-off-by: Adam Warner --- style/themes/lcars.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/style/themes/lcars.css b/style/themes/lcars.css index 87fc6a48..d2a02d2b 100644 --- a/style/themes/lcars.css +++ b/style/themes/lcars.css @@ -2188,3 +2188,10 @@ td.highlight { padding-top: 0.2em; padding-bottom: 0.55em; } + +/*** 🖖 ***/ +svg.fa-hand path { + d: path( + "M246.9 23.7C242.3 6.6 224.8-3.5 207.7 1.1s-27.2 22.1-22.6 39.2L238 237.8c2.5 9.2-4.5 18.2-14 18.2c-6.4 0-12-4.2-13.9-10.3L166.6 102.7c-5.1-16.9-23-26.4-39.9-21.3s-26.4 23-21.3 39.9l62.8 206.4c2.4 7.9-7.2 13.8-13.2 8.1L99.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L156.8 448c43.1 41.1 100.4 64 160 64l10.9 0 8.2 0c.1 0 .1-.1 .1-.1s.1-.1 .1-.1c58.3-3.5 108.6-43.2 125.3-99.7l81.2-275c5-16.9-4.7-34.7-21.6-39.8s-34.7 4.7-39.8 21.6L443.5 247.1c-1.6 5.3-6.4 8.9-12 8.9c-7.9 0-13.8-7.3-12.2-15.1l36-170.3c3.7-17.3-7.4-34.3-24.7-37.9s-34.3 7.4-37.9 24.7L355.1 235.1c-2.6 12.2-13.3 20.9-25.8 20.9c-11.9 0-22.4-8-25.4-19.5l-57-212.8z" + ) !important; +} From 83c11eb68f6d031953d02196b28a4bfe64bad1fd Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 5 Mar 2025 09:16:19 +0000 Subject: [PATCH 18/37] Update style/themes/lcars.css Co-authored-by: RD WebDesign Signed-off-by: Adam Warner --- style/themes/lcars.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style/themes/lcars.css b/style/themes/lcars.css index d2a02d2b..e126ca80 100644 --- a/style/themes/lcars.css +++ b/style/themes/lcars.css @@ -2192,6 +2192,6 @@ td.highlight { /*** 🖖 ***/ svg.fa-hand path { d: path( - "M246.9 23.7C242.3 6.6 224.8-3.5 207.7 1.1s-27.2 22.1-22.6 39.2L238 237.8c2.5 9.2-4.5 18.2-14 18.2c-6.4 0-12-4.2-13.9-10.3L166.6 102.7c-5.1-16.9-23-26.4-39.9-21.3s-26.4 23-21.3 39.9l62.8 206.4c2.4 7.9-7.2 13.8-13.2 8.1L99.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L156.8 448c43.1 41.1 100.4 64 160 64l10.9 0 8.2 0c.1 0 .1-.1 .1-.1s.1-.1 .1-.1c58.3-3.5 108.6-43.2 125.3-99.7l81.2-275c5-16.9-4.7-34.7-21.6-39.8s-34.7 4.7-39.8 21.6L443.5 247.1c-1.6 5.3-6.4 8.9-12 8.9c-7.9 0-13.8-7.3-12.2-15.1l36-170.3c3.7-17.3-7.4-34.3-24.7-37.9s-34.3 7.4-37.9 24.7L355.1 235.1c-2.6 12.2-13.3 20.9-25.8 20.9c-11.9 0-22.4-8-25.4-19.5l-57-212.8z" + "M247 24a32 32 0 1 0-62 16l53 198c3 9-4 18-14 18-6 0-12-4-14-10l-43-143a32 32 0 0 0-62 18l63 207c3 8-7 13-13 8l-55-53a40 40 0 0 0-56 58l113 107c43 41 100 64 160 64h19c58-4 109-43 125-100l82-275c5-17-5-35-22-40s-35 5-40 22l-37 128c-2 5-7 9-12 9-8 0-14-7-13-15l36-170c4-18-7-35-24-38s-35 7-38 24l-38 178a26 26 0 0 1-51 1z" ) !important; } From 0af76428f5e23b2f94d0d09952f21a77e3431f0b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 6 Mar 2025 09:13:52 +0100 Subject: [PATCH 19/37] Show state, not carrier behind interface in the Pi-hole interface overview Signed-off-by: DL6ER --- scripts/js/interfaces.js | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/scripts/js/interfaces.js b/scripts/js/interfaces.js index 7091a967..86f3be43 100644 --- a/scripts/js/interfaces.js +++ b/scripts/js/interfaces.js @@ -32,9 +32,19 @@ $(function () { // For each interface in data.interface, create a new object and push it to json data.interfaces.forEach(function (interface) { - const status = interface.carrier - ? 'UP' - : 'DOWN'; + const carrierColor = interface.carrier ? "text-green" : "text-red"; + let stateText = interface.state.toUpperCase(); + if (stateText === "UNKNOWN" && interface.flags !== undefined && interface.flags.length > 0) { + if (interface.flags.includes("pointopoint")) { + // WireGuards, etc. -> the typo is intentional + stateText = "P2P"; + } else if (interface.flags.includes("loopback")) { + // Loopback interfaces + stateText = "LOOPBACK"; + } + } + + const status = `${stateText}`; var obj = { text: interface.name + " - " + status, @@ -306,6 +316,21 @@ $(function () { nodes: [], }; + furtherDetails.nodes.push( + { + text: + "Carrier: " + + (interface.carrier + ? "Connected" + : "Disconnected"), + icon: "fa fa-link fa-fw", + }, + { + text: "State: " + utils.escapeHtml(interface.state.toUpperCase()), + icon: "fa fa-server fa-fw", + } + ); + if (interface.parent_dev_name !== undefined) { let extra = ""; if (interface.parent_dev_bus_name !== undefined) { From 611a454b2b21de24725c5e7a4e7a33a086ed2f25 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 6 Mar 2025 08:51:59 +0200 Subject: [PATCH 20/37] .gitattributes: enforce LF Signed-off-by: XhmikosR --- .gitattributes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 176a458f..205021e4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ -* text=auto +# Enforce Unix newlines +* text=auto eol=lf From 556aa6510304d63ba5c5aa3d0988d4752bdc7e77 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 6 Mar 2025 12:04:05 +0100 Subject: [PATCH 21/37] Add total/permitted/blocked filtering for domains and clients on the dashboard's top lists Signed-off-by: DL6ER --- scripts/js/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/js/index.js b/scripts/js/index.js index 749bdb31..f209c0af 100644 --- a/scripts/js/index.js +++ b/scripts/js/index.js @@ -307,6 +307,7 @@ function updateTopClientsTable(blocked) { url = '' + utils.escapeHtml(clientname) + ""; @@ -364,7 +365,13 @@ function updateTopDomainsTable(blocked) { domain = encodeURIComponent(item.domain); // Substitute "." for empty domain lookups urlText = domain === "" ? "." : domain; - url = '' + urlText + ""; + url = + '' + + urlText + + ""; percentage = (item.count / sum) * 100; domaintable.append( " " + From 68933f7a2c4bbc56544d1cb8eb0782c357cbb2e4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 6 Mar 2025 18:33:33 +0100 Subject: [PATCH 22/37] Add total/permitted/blocked filtering for domains and clients on the dashboard's top lists Signed-off-by: DL6ER --- scripts/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/js/index.js b/scripts/js/index.js index f209c0af..4fd871f7 100644 --- a/scripts/js/index.js +++ b/scripts/js/index.js @@ -307,7 +307,7 @@ function updateTopClientsTable(blocked) { url = '' + utils.escapeHtml(clientname) + ""; From 4ee9c83d9c43850eb0caecd4279b379aeedea9f7 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 6 Mar 2025 04:32:19 +0100 Subject: [PATCH 23/37] Sort interfaces: - interfaces that do not depend on others (and have no children) are placed at the top of the treeview - interfaces that do have children get them directly assigned below them Signed-off-by: DL6ER --- scripts/js/interfaces.js | 62 +++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/scripts/js/interfaces.js b/scripts/js/interfaces.js index 86f3be43..18e0ae32 100644 --- a/scripts/js/interfaces.js +++ b/scripts/js/interfaces.js @@ -28,7 +28,8 @@ $(function () { gateways.add(inet6.gateway); } - var json = []; + var interfaces = {}; + var masterInterfaces = {}; // For each interface in data.interface, create a new object and push it to json data.interfaces.forEach(function (interface) { @@ -46,21 +47,32 @@ $(function () { const status = `${stateText}`; + let master = null; + if (interface.master !== undefined) { + // Find interface.master in data.interfaces + master = data.interfaces.find(obj => obj.index === interface.master).name; + } + + // Show an icon for indenting slave interfaces + const indentIcon = master === null ? "" : " "; + var obj = { - text: interface.name + " - " + status, + text: indentIcon + interface.name + " - " + status, class: gateways.has(interface.name) ? "text-bold" : null, icon: "fa fa-network-wired fa-fw", nodes: [], }; - if (interface.master !== undefined) { - // Find interface.master in data.interfaces - const master = data.interfaces.find(obj => obj.index === interface.master); - if (master !== undefined) { - obj.nodes.push({ - text: "Master interface: " + utils.escapeHtml(master.name) + "", - icon: "fa fa-network-wired fa-fw", - }); + if (master !== null) { + obj.nodes.push({ + text: "Master interface: " + utils.escapeHtml(master) + "", + icon: "fa fa-network-wired fa-fw", + }); + + if (master in masterInterfaces) { + masterInterfaces[master].push(interface.name); + } else { + masterInterfaces[master] = [interface.name]; } } @@ -403,9 +415,37 @@ $(function () { obj.nodes.push(furtherDetails); } - json.push(obj); + interfaces[interface.name] = obj; }); + // Sort interfaces based on masterInterfaces. If an item is found in + // masterInterfaces, it should be placed after the master interface + const ifaces = Object.keys(interfaces); + const interfaceList = Object.keys(masterInterfaces); + + // Add slave interfaces next to master interfaces + for (const master of interfaceList) { + if (master in masterInterfaces) { + for (const slave of masterInterfaces[master]) { + ifaces.splice(ifaces.indexOf(slave), 1); + interfaceList.splice(interfaceList.indexOf(master) + 1, 0, slave); + } + } + } + + // Add interfaces that are not slaves at the top of the list (in reverse order) + for (const iface of ifaces.reverse()) { + if (!interfaceList.includes(iface)) { + interfaceList.unshift(iface); + } + } + + // Build the tree view + const json = []; + for (const iface of interfaceList) { + json.push(interfaces[iface]); + } + $("#tree").bstreeview({ data: json, expandIcon: "fa fa-angle-down fa-fw", From a5e2c627a4bf2c37425cf7acf26eb8fff6ce4d1b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 6 Mar 2025 17:49:29 +0100 Subject: [PATCH 24/37] Move the decision whether we are showing the no-HTTPS warning from server-side (where no https may be used when a reverse proxy is used) to user-side where this is more definite Signed-off-by: DL6ER --- scripts/js/settings-teleporter.js | 7 +++++++ scripts/lua/footer.lp | 2 +- scripts/lua/header.lp | 3 --- settings-teleporter.lp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/js/settings-teleporter.js b/scripts/js/settings-teleporter.js index b337fa90..bae997b0 100644 --- a/scripts/js/settings-teleporter.js +++ b/scripts/js/settings-teleporter.js @@ -105,3 +105,10 @@ $("#GETTeleporter").on("click", function () { }, }); }); + +$(function () { + // Show warning if not accessed over HTTPS + if (location.protocol !== "https:") { + $("#encryption-warning").show(); + } +}); diff --git a/scripts/lua/footer.lp b/scripts/lua/footer.lp index 6dcb5640..34885011 100644 --- a/scripts/lua/footer.lp +++ b/scripts/lua/footer.lp @@ -68,6 +68,6 @@ end - + diff --git a/scripts/lua/header.lp b/scripts/lua/header.lp index 3b5379c8..08c69c3c 100644 --- a/scripts/lua/header.lp +++ b/scripts/lua/header.lp @@ -39,9 +39,6 @@ function in_array (val, tab) return false end --- Connection is considered secure if running natively on HTTPS -is_secure = mg.request_info.https - -- Variable to check if user is already authenticated is_authenticated = mg.request_info.is_authenticated diff --git a/settings-teleporter.lp b/settings-teleporter.lp index 359ac2e1..fbcc8484 100644 --- a/settings-teleporter.lp +++ b/settings-teleporter.lp @@ -21,7 +21,7 @@ mg.include('scripts/lua/settings_header.lp','r')

Warning:
This archive contains sensitive information about your Pi-hole installation, e.g. your 2FA-TOTP secret (if enabled). Please be careful with this file and do not share it with anyone even if they claim to help you.

-

Warning:
You are currently not using an end-to-end encryption. This means that secrets like your 2FA-TOTP secret will be transmitted in plain text. We recommend to use HTTPS when exporting your configuration.

+

Export From 592104b839e1afdfd624a5a19f1ed9935303e198 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 6 Mar 2025 21:40:32 +0100 Subject: [PATCH 25/37] Sort IPv4 before IPv6 addresses on the network overview Signed-off-by: DL6ER --- scripts/js/network.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/js/network.js b/scripts/js/network.js index a125a7b3..acda2c37 100644 --- a/scripts/js/network.js +++ b/scripts/js/network.js @@ -138,6 +138,19 @@ $(function () { var ips = [], iptitles = []; + // Sort IPs, IPv4 before IPv6, then alphabetically + data.ips.sort(function (a, b) { + if (a.ip.includes(":") && !b.ip.includes(":")) { + return 1; + } + + if (!a.ip.includes(":") && b.ip.includes(":")) { + return -1; + } + + return a.ip.localeCompare(b.ip); + }); + for (index = 0; index < data.ips.length; index++) { var ip = data.ips[index], iptext = ip.ip; From 516febe461b04ba5cee934b9b2e9db3006ff57d8 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Fri, 7 Mar 2025 00:56:45 -0300 Subject: [PATCH 26/37] Use `location.protocol` top identify if the page uses `https` protocol Signed-off-by: RD WebDesign --- scripts/js/footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 115271c6..087b4741 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -736,7 +736,7 @@ function applyExpertSettings() { function addAdvancedInfo() { const advancedInfoSource = $("#advanced-info-data"); const advancedInfoTarget = $("#advanced-info"); - const isTLS = advancedInfoSource.data("tls"); + const isTLS = location.protocol === "https:"; const clientIP = advancedInfoSource.data("client-ip"); const XForwardedFor = globalThis.atob(advancedInfoSource.data("xff") ?? ""); const starttime = parseFloat(advancedInfoSource.data("starttime")); From b4bf45d2fd7127db111340233683ccff371c6836 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Fri, 7 Mar 2025 01:03:54 -0300 Subject: [PATCH 27/37] Set icon color to green when SSL/TSL is used Signed-off-by: RD WebDesign --- scripts/js/footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 087b4741..de0c81a4 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -749,7 +749,7 @@ function addAdvancedInfo() { // Add TLS and client IP info advancedInfoTarget.append( 'Client:  
' From c3d09c92e986d2452ce41ac15e43817e49deca8c Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Fri, 7 Mar 2025 01:45:59 -0300 Subject: [PATCH 28/37] Use "N/A" if `local.version` is null to avoid empty version Signed-off-by: RD WebDesign --- scripts/js/footer.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index a48b09db..eea65666 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -485,8 +485,8 @@ function updateVersionInfo() { var versions = [ { name: "Docker Tag", - local: version.docker.local || null, - remote: version.docker.remote || null, + local: version.docker.local, + remote: version.docker.remote, branch: null, hash: null, url: "https://github.com/pi-hole/docker-pi-hole/releases", @@ -494,28 +494,28 @@ function updateVersionInfo() { { name: "Core", local: version.core.local.version || "N/A", - remote: version.core.remote.version || "N/A", - branch: version.core.local.branch || null, - hash: version.core.local.hash || null, - hash_remote: version.core.remote.hash || null, + remote: version.core.remote.version, + branch: version.core.local.branch, + hash: version.core.local.hash, + hash_remote: version.core.remote.hash, url: "https://github.com/pi-hole/pi-hole/releases", }, { name: "FTL", local: version.ftl.local.version || "N/A", - remote: version.ftl.remote.version || "N/A", - branch: version.ftl.local.branch || null, - hash: version.ftl.local.hash || null, - hash_remote: version.ftl.remote.hash || null, + remote: version.ftl.remote.version, + branch: version.ftl.local.branch, + hash: version.ftl.local.hash, + hash_remote: version.ftl.remote.hash, url: "https://github.com/pi-hole/FTL/releases", }, { name: "Web interface", local: version.web.local.version || "N/A", - remote: version.web.remote.version || "N/A", - branch: version.web.local.branch || null, - hash: version.web.local.hash || null, - hash_remote: version.web.remote.hash || null, + remote: version.web.remote.version, + branch: version.web.local.branch, + hash: version.web.local.hash, + hash_remote: version.web.remote.hash, url: "https://github.com/pi-hole/web/releases", }, ]; From 16dff4fdd143ed6168b7e2e0d51ab777d875daf3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 7 Mar 2025 08:39:05 +0200 Subject: [PATCH 29/37] Improve CodeQL action * no need to run CodeQL on Dependabit PRs; no related files are changed there * specify permissions * enable `security-and-quality` rules instead of the default rules * ignore `vendor` folders Signed-off-by: XhmikosR --- .github/codeql/codeql-config.yml | 3 +++ .github/workflows/codeql.yml | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 .github/codeql/codeql-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 00000000..d2d76ddb --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,3 @@ +name: "CodeQL config" +paths-ignore: + - "**/vendor/**" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index cbed6a2e..bf200962 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,29 +7,40 @@ on: - development - "!dependabot/**" pull_request: - # The branches below must be a subset of the branches above branches: - master - development + - "!dependabot/**" schedule: - cron: "0 0 * * 0" + workflow_dispatch: jobs: analyze: name: Analyze runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write steps: - - name: Checkout repository + - name: Clone repository uses: actions/checkout@v4.2.2 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 with: + persist-credentials: false + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3.28.10 + with: + config-file: ./.github/codeql/codeql-config.yml languages: "javascript" + queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v3.28.10 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v3.28.10 + with: + category: "/language:javascript" From 3256dca8406c2037c2c16c4ea16de32803271d1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Mar 2025 10:44:58 +0000 Subject: [PATCH 30/37] Bump github/codeql-action from 3.28.10 to 3.28.11 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.10 to 3.28.11. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v3.28.10...v3.28.11) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bf200962..7fc79500 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -31,16 +31,16 @@ jobs: persist-credentials: false - name: Initialize CodeQL - uses: github/codeql-action/init@v3.28.10 + uses: github/codeql-action/init@v3.28.11 with: config-file: ./.github/codeql/codeql-config.yml languages: "javascript" queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@v3.28.10 + uses: github/codeql-action/autobuild@v3.28.11 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3.28.10 + uses: github/codeql-action/analyze@v3.28.11 with: category: "/language:javascript" From eb62fc891cbc1b75425c019c895a82e312bee5e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Mar 2025 10:58:05 +0000 Subject: [PATCH 31/37] Bump prettier from 3.5.2 to 3.5.3 Bumps [prettier](https://github.com/prettier/prettier) from 3.5.2 to 3.5.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.5.2...3.5.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 52e9e4dd..0cd45e3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "eslint-plugin-compat": "^6.0.2", "postcss": "^8.5.3", "postcss-cli": "^11.0.0", - "prettier": "^3.5.2", + "prettier": "^3.5.3", "xo": "^0.60.0" } }, @@ -7060,9 +7060,9 @@ } }, "node_modules/prettier": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz", - "integrity": "sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, "license": "MIT", "bin": { diff --git a/package.json b/package.json index bc52fd70..240d6bf5 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "eslint-plugin-compat": "^6.0.2", "postcss": "^8.5.3", "postcss-cli": "^11.0.0", - "prettier": "^3.5.2", + "prettier": "^3.5.3", "xo": "^0.60.0" }, "browserslist": [ From 3602a43842177fe2381570ce2ce744482df26039 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 8 Mar 2025 15:24:23 +0200 Subject: [PATCH 32/37] Add missing img dimensions Signed-off-by: XhmikosR --- login.lp | 2 +- scripts/lua/header_authenticated.lp | 2 +- scripts/lua/sidebar.lp | 2 +- style/pi-hole.css | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/login.lp b/login.lp index f97b837f..34c2faf2 100644 --- a/login.lp +++ b/login.lp @@ -14,7 +14,7 @@ mg.include('scripts/lua/header.lp','r')
diff --git a/scripts/lua/header_authenticated.lp b/scripts/lua/header_authenticated.lp index e14377b0..63d5d403 100644 --- a/scripts/lua/header_authenticated.lp +++ b/scripts/lua/header_authenticated.lp @@ -68,7 +68,7 @@ mg.include('header.lp','r')