From 8b8b412ab869a9dbb1c63355150d6ba8f26fff62 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 4 Nov 2023 12:55:51 +0100 Subject: [PATCH 1/3] Add dhcp.netmask field Signed-off-by: DL6ER --- settings-dhcp.lp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/settings-dhcp.lp b/settings-dhcp.lp index 3705bde0..d97200df 100644 --- a/settings-dhcp.lp +++ b/settings-dhcp.lp @@ -60,6 +60,17 @@ mg.include('scripts/pi-hole/lua/settings_header.lp','r') +
+ +
+
+
Netmask
+ +
+
+
 

Enable this option to enable IPv6 support for the Pi-hole DHCP server. This will allow the Pi-hole to hand out IPv6 addresses to clients and also provide IPv6 router advertisements (RA) to clients. This option is only useful if the Pi-hole is configured with an IPv6 address.

From 8e4e4754c424696c701b73b40ac59cedc0d935a8 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 4 Nov 2023 13:07:36 +0100 Subject: [PATCH 2/3] Show human-readable error message on settings save fail Signed-off-by: DL6ER --- scripts/pi-hole/js/settings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index b94f0074..bd10a45a 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -114,6 +114,7 @@ function setConfigValues(topic, key, value) { function saveSettings() { var settings = {}; + utils.disableAll(); $("[data-key]").each(function () { var key = $(this).data("key"); var value = $(this).val(); @@ -168,6 +169,7 @@ function saveSettings() { contentType: "application/json; charset=utf-8", }) .done(function () { + utils.enableAll(); // Success utils.showAlert( "success", @@ -178,7 +180,10 @@ function saveSettings() { // Reload page location.reload(); }) - .fail(function (data) { + .fail(function (data, exception) { + utils.enableAll(); + utils.showAlert("error", "", "Error while applying settings", data.responseText); + console.log(exception); // eslint-disable-line no-console apiFailure(data); }); } From 16ec7448c727accc8d7b074837f8af228a01b9c4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 7 Nov 2023 21:17:52 +0100 Subject: [PATCH 3/3] Rename DHCP from-to -> start-end to match the API/config keys Signed-off-by: DL6ER --- settings-dhcp.lp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings-dhcp.lp b/settings-dhcp.lp index d97200df..e5bc6b9e 100644 --- a/settings-dhcp.lp +++ b/settings-dhcp.lp @@ -32,7 +32,7 @@ mg.include('scripts/pi-hole/lua/settings_header.lp','r')
-
From
+
Start
@@ -42,7 +42,7 @@ mg.include('scripts/pi-hole/lua/settings_header.lp','r')
-
To
+
End