diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index c1542362..2bd41f9f 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -1,8 +1,16 @@ $(function () { - $("[data-mask]").inputmask(); -}); + $("[data-mask]").inputmask(); + + $("[data-static]").on("click", function(){ + var row = $(this).closest("tr"); + var mac = row.find("#MAC").text(); + var ip = row.find("#IP").text(); + var host = row.find("#HOST").text(); + $("input[name=\"AddHostname\"]").val(host); + $("input[name=\"AddIP\"]").val(ip); + $("input[name=\"AddMAC\"]").val(mac); + }); -$(function(){ $("#custom1val").ipAddress({s:4}); $("#custom2val").ipAddress({s:4}); $("#custom3val").ipAddress({v:6}); @@ -75,6 +83,7 @@ $(document).ready(function() { { leasetable = $("#DHCPLeasesTable").DataTable({ dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'f>>", + "columnDefs": [ { "bSortable": false, "orderable": false, targets: -1} ], "paging": false, "scrollCollapse": true, "scrollY": "200px", diff --git a/settings.php b/settings.php index 7da7eb25..e40aeb42 100644 --- a/settings.php +++ b/settings.php @@ -346,10 +346,11 @@ MAC address IP address Hostname + -
Remaining lease time:
DHCP UID: "> +
Remaining lease time:
DHCP UID: ">
@@ -368,7 +369,7 @@ 0){ ?> - +

Specifying the MAC address is mandatory and only one entry per MAC address is allowed. If the IP address is omitted and a host name is given, the IP address will still be generated dynamically and the specified host name will be used. If the host name is omitted, only a static release will be added.