Add dns.hostsLocal to the Local DNS settings page - #3858
Open
DL6ER wants to merge 2 commits into
Open
Conversation
The new FTL setting decides whether the names in `dns.hosts` are kept local, so it belongs next to the records it applies to rather than on the general DNS page. The checkbox sits below the record table and is saved with the usual "Save & Apply" button, which the page did not have so far because both tables apply their changes immediately. Signed-off-by: DL6ER <dl6er@dl6er.de>
There was a problem hiding this comment.
Pull request overview
Adds a dns.hostsLocal checkbox to the Local DNS settings page.
Changes:
- Adds explanatory UI and Save & Apply support.
- Loads and saves the setting through the FTL API.
- Updates restart messaging.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Summary |
|---|---|
settings-dnsrecords.lp |
Adds the setting UI and save control. Preserve the disabled state for environment-controlled settings when controls are re-enabled. |
scripts/js/settings-dns-records.js |
Loads the dns.hostsLocal configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <div class="row"> | ||
| <div class="col-md-12"> | ||
| <div class="form-check"> | ||
| <input class="form-check-input" type="checkbox" id="dns.hostsLocal" data-key="dns.hostsLocal"> |
The `local=` lines that `dns.hostsLocal` generates are part of the dnsmasq configuration, which is read at startup only. The note claimed the opposite. Signed-off-by: DL6ER <dl6er@dl6er.de>
codeXe098
previously approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR aim to accomplish?:
pi-hole/FTL#3037 adds
dns.hostsLocal, which decides whether the names indns.hostsare kept local. It has no representation in the web interface yet, and the page that manages those records is where it belongs.How does this PR accomplish the above?:
A checkbox below the local DNS record table, stored with the usual "Save & Apply" button - the page had none so far, because both tables apply their changes immediately.
Needs FTL #3037 to be merged first, otherwise the page asks for a config key that does not exist.
Link documentation PRs if any are needed to support this PR:
N/A
By submitting this pull request, I confirm the following:
git rebase)