-
-
Notifications
You must be signed in to change notification settings - Fork 562
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
Added support for CNAME records add/remove #1278
Conversation
Signed-off-by: Matthias rank <[email protected]>
Hi there, thanks for the submission, I will try and find some time to review later on today |
Signed-off-by: Matthias Rank <[email protected]>
That's what I get for accidentally testing my changes on another branch... Should work now, sorry for that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking for a moment we should maybe fuse the DNS records and the CNAME records pages into one, however, it's likely clearer structured (esp. for the inexperienced) like you proposed it.
Some more thoughts:
- I merged the core PR into
development
already. - There is a small merge conflict on this branch.
Yes, please move the routines over to func.php
as you suggested. Just like I did in #1276 and add support for importing CNAMEs through teleporter. There should be anything you need in #1276 where I did this for the local DNS records page.
Also, please add authentication checking for the CNAME page to avoid anyone being able to submit configuration even without logging into the web interface. See 7b2d396 for reference.
I'll update this PR tomorrow. Thanks for your review! |
Moved CNAME functions to func.php Added teleporter support Fixed CNAME and DNS file declaration (filename was declarated in seperate file, therefore trying to read those files from func.php failed) Fixed error and success response functions in func.php (calling addCustomDNSEntry and addCustomCNAMEEntry repeatedly from teleporter failed because of error function defined inside of those functions) Signed-off-by: Matthias Rank <[email protected]>
Okay, there were some hurdles while implementing the requested changes:
I haven't used teleporter in the past, but all the tests I did were successfull. |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/add-cname-record-support-to-pi-hole-5s-local-dns-records/31346/7 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/support-for-cname-next-to-host-record/25707/6 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
@marank Sorry for the delay on this. You can use the internal conflict resolution mechanism of Github. You should see it above the tests in this PR: It will open a page showing what was added to the modified pages meanwhile so you can review the changes and decide what is the best when fusing your new changes with the ones made meanwhile, for instance: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/alias-cname-einrichten/34689/2 |
Ok, I'll need some time to update this PR. There were some changes in the devel branch in the meantime which I want to add. |
Signed-off-by: Matthias Rank <[email protected]>
I think I'm done, looks good to me. The only issue remaining is the one with FTL restarting too often when restoring a backup via teleporter. Maybe we should add a flag to the pihole command which prevents restarting FTL after every relevant add/remove DNS/CNAME command? |
@DL6ER shall we change this to point at 5.1, or leave it til vNext? |
Merge now for the next version after v5.1 gives us more time to test things properly. |
var table; | ||
var token = $("#token").text(); | ||
|
||
function showAlert(type, message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why duplicate stuff here?
|
||
/* global utils:false */ | ||
|
||
var table; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid global variables
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/update-5-1-bar-checkbox-und-cname-fehlen/35637/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/upgrade-from-5-0-5-1-doesnt-include-cname-admin/35868/1 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/upgrade-from-5-0-5-1-doesnt-include-cname-admin/35868/4 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
I'm really waiting for that change to land.. any idea for when it is? |
When it's ready. Which is the same as "soon". Addressing the issues that were brought up in #1278 (comment) would help. |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-core-web-v5-2-and-ftl-v5-3-released/40909/1 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/which-local-dns-list/41819/2 |
Signed-off-by: Matthias rank [email protected]
By submitting this pull request, I confirm the following:
{please fill any appropriate checkboxes, e.g: [X]}
{Please ensure that your pull request is for the 'devel' branch!}
git rebase
)git commit --signoff
)What does this PR aim to accomplish?:
{A detailed description, screenshots (if necessary), as well as links to any relevant GitHub issues}
This PR enables adding/removing CNAME records via the admin interface.
To do so, the following PR needs to be accepted as well, because it allows editing the neccessary file using the pihole CLI: pi-hole/pi-hole#3351
How does this PR accomplish the above?:
{A detailed description (such as a changelog) and screenshots (if necessary) of the implemented fix}
I changed the menu accordingly to have both Local DNS records and CNAME records in one submenu.
What documentation changes (if any) are needed to support this PR?:
{A detailed list of any necessary changes}