diff --git a/scripts/pi-hole/js/settings-dns-records.js b/scripts/pi-hole/js/settings-dns-records.js
index a438adb5..d664d8ee 100644
--- a/scripts/pi-hole/js/settings-dns-records.js
+++ b/scripts/pi-hole/js/settings-dns-records.js
@@ -49,7 +49,7 @@ function populateDataTable(endpoint) {
columns = [
{ data: null, render: CNAMEdomain },
{ data: null, render: CNAMEtarget },
- { data: null, render: CNAMEttl },
+ { data: null, width: "40px", render: CNAMEttl },
{ data: null, width: "22px", orderable: false },
];
}
@@ -73,6 +73,7 @@ function populateDataTable(endpoint) {
type: "GET",
dataSrc: `config.dns.${endpoint}`,
},
+ autoWidth: false,
columns: columns,
columnDefs: [
{
@@ -99,7 +100,7 @@ function populateDataTable(endpoint) {
$(`td:eq(${endpoint === "hosts" ? 2 : 3})`, row).html(button);
},
dom:
- "<'row'<'col-sm-6'l><'col-sm-6'f>>" +
+ "<'row'<'col-sm-5'l><'col-sm-7'f>>" +
"<'row'<'col-sm-12'p>>" +
"<'row'<'col-sm-12'<'table-responsive'tr>>>" +
"<'row'<'col-sm-12'p>>" +
@@ -264,4 +265,7 @@ $(document).ready(function () {
console.log(exception); // eslint-disable-line no-console
});
});
+
+ // Add a small legend below the CNAME table
+ $("#cnameRecords-Table").after("* TTL in seconds (optional)");
});
diff --git a/settings-dnsrecords.lp b/settings-dnsrecords.lp
index eecee140..7e726a85 100644
--- a/settings-dnsrecords.lp
+++ b/settings-dnsrecords.lp
@@ -14,125 +14,96 @@ PageTitle = "Local DNS Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
-
+
-
List of local DNS records
+
-
+
-
List of local CNAME records
+
diff --git a/style/pi-hole.css b/style/pi-hole.css
index e140ccb0..82b8bb77 100644
--- a/style/pi-hole.css
+++ b/style/pi-hole.css
@@ -373,12 +373,18 @@ td.lookatme {
font-family: inherit;
}
-.form-inline .dataTables .form-control {
+.form-inline .dataTable .form-control {
display: inline-block;
width: 100%;
vertical-align: middle;
}
+/* Table footer row used to add new items, using inline input fields */
+tfoot.add-new-item > tr > th {
+ font-weight: normal;
+ vertical-align: inherit;
+}
+
.select2-container--default .select2-results > .select2-results__options {
max-height: 400px;
}