-
-
Notifications
You must be signed in to change notification settings - Fork 627
settings-dhcp: Implement copyButton to copy active DHCP leases in dnsmasq format #3554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
13d96f9 to
8159a57
Compare
…masq format This will allow users to easily add a current lease into the static leases configuration, closer to v5 behavior. Signed-off-by: DroidFreak32 <rushabshah32@gmail.com>
8159a57 to
4bf4f3a
Compare
|
I like this idea in theory - though I currently have no way to test it due to not using my Pi-hole as a DHCP server. Just thinking out loud here... @pi-hole/ftl-maintainers @pi-hole/web-maintainers If the idea of this PR work, i.e the string that is generated is good enough to paste into the dhcp reservations textbox... Could the idea be further adapted to do this more directly? Maybe a "Make static" (maybe even "make unstatic") button instead of a copy that literally just adds the string directly to the setting? It might save the ballache of coming up with a table design that works for the reservation field. Just spitballing |
For table-to-textbox we already have such an implementation: Settings > DNS, tick/untick one of the items in the DNS server table and see the text added/removed from the collapsed "Custom DNS servers" textbox |
That would require to parse the existing list of Static DHCP configurations, find if a similar entry already exists, and only if it doesn't exist add it to the list, correct? But it might break existing power users setup who used a more advanced dnsmasq entry rather than just The intention of adding the copy option is because the current 6.x release already moved to a more flexible advanced method for power users to add dnsmasq entries, which might break if pihole directly adds entries (like the behavior in 5.x). Copying will just make it much easier to add entries while allowing power users to modify the syntax to their needs. |
So my thought here is that if a valid line always starts with Maybe, I don't know... I haven't used DHCP on Pi-hole/dnsmasq in such a long time that I'm probably very out of touch with how things work |
|
Please see my alternative suggestion here: #3565 |
Thank you for your contribution to the Pi-hole Community!
Please read the comments below to help us consider your Pull Request.
We are all volunteers and completing the process outlined will help us review your commits quicker.
Please make sure you
What does this PR aim to accomplish?:
This will allow users to easily add a current lease into the static leases configuration, closer to v5 behavior.
How does this PR accomplish the above?:
copyicon button in theDHCPLeasesTablerowscopyLeasefunction that is triggerred when above button is clickedThis might help solve complaints like https://www.reddit.com/r/pihole/comments/1lac7fk
Example screenshot:
Disclosure: I am not experienced with JS so I took help from gemini, but I have verified it is working in my end.
Link documentation PRs if any are needed to support this PR:
N/A
By submitting this pull request, I confirm the following:
git rebase)