pdns
pdns copied to clipboard
Recursor: replace/remove jQuery
Short description
Everything we used from jQuery is now available without hacks/quirks in plain JS. Yay 2020+.
Saves updating jQuery, too.
Checklist
I have:
- [x] read the CONTRIBUTING.md document
- [x] compiled this code
- [x] tested this code
- [ ] included documentation (including possible behaviour changes)
- [ ] documented the code
- [ ] added or modified regression test(s)
- [ ] added or modified unit test(s)
I have some time this week. If you can stomach the review, I could also:
- do some more tidying up in the recursor html/js stuff
- then copy/sync to dnsdist
I'm not the right person to review the diff, I do not speak javascript. But I can test and will do that.
Tested with Chrome and Safari and things look ok, but Firefox does not work: JS console shows:
Uncaught ReferenceError: $ is not defined
<anonymous> http://127.0.0.1:8083/local.js:6
Uncaught ReferenceError: $ is not defined
<anonymous> http://127.0.0.1:8083/local.js:6
I did most of my dev/tests with Firefox. local.js no longer has a $ on line 6. Can you clear your cache and see if that helps?
I did most of my dev/tests with Firefox.
local.jsno longer has a$on line 6. Can you clear your cache and see if that helps?
if that helps, I'm inclined to rename local.js to a new filename to avoid the cache problem...
It's ok now, no idea why FF does not see that local.js was updated or why a reload (even with various modifier keys) did not actually reloaded it...
if that helps, I'm inclined to rename local.js to a new filename to avoid the cache problem...
Let's just do this, please :)
Sorry for the drive-by comment, but I believe those script tags can include a hash of the linked-to content, and that helps the browser know when it should throw away cached copies.
Sorry for the drive-by comment, but I believe those
scripttags can include a hash of the linked-to content, and that helps the browser know when it should throw away cached copies.
Yeah, I think we don't have the appropriate tooling for that right now.
if that helps, I'm inclined to rename local.js to a new filename to avoid the cache problem...
Let's just do this, please :)
Pushed a commit for this.
I get these errors now, showing a page with only the PowerDNS logo.
Aug 16 10:07:05 msg="Incomplete request" subsystem="webserver" level="0" prio="Debug" tid="0" ts="1660637225.019"
Aug 16 10:07:05 msg="Error result" error="Unknown error: 400" subsystem="webserver" level="0" prio="Debug" tid="0" ts="1660637225.019" urlpath=""
Aug 16 10:07:05 msg="Request" subsystem="webserver" level="0" prio="Info" tid="0" ts="1660637225.019" HTTPVersion="1.1" method="" remote="127.0.0.1:58980" respsize="183" status="400" uniqueid="95825e26-df0c-44f4-8b0d-190553af1dfe" urlpath=""
Aug 16 10:07:05 msg="Handling request" subsystem="webserver" level="0" prio="Debug" tid="0" ts="1660637225.021" uniqueid="bb2f3bbf-56ba-4119-bb76-46f5df0e5373" urlpath="/"
Aug 16 10:07:05 msg="Result" subsystem="webserver" level="0" prio="Debug" tid="0" ts="1660637225.021" bodyLength="5410" status="200" uniqueid="bb2f3bbf-56ba-4119-bb76-46f5df0e5373" urlpath="/"
Aug 16 10:07:05 msg="Request" subsystem="webserver" level="0" prio="Info" tid="0" ts="1660637225.021" HTTPVersion="1.1" method="GET" remote="127.0.0.1:58981" respsize="5734" status="200" uniqueid="bb2f3bbf-56ba-4119-bb76-46f5df0e5373" urlpath="/index.html"
Aug 16 10:07:05 msg="Handling request" subsystem="webserver" level="0" prio="Debug" tid="0" ts="1660637225.034" uniqueid="00017b49-394e-4d28-846d-06d391986df2" urlpath="/js/d3.v3.js"
Aug 16 10:07:05 msg="Result" subsystem="webserver" level="0" prio="Debug" tid="0" ts="1660637225.034" bodyLength="144718" status="200" uniqueid="00017b49-394e-4d28-846d-06d391986df2" urlpath="/js/d3.v3.js"
Aug 16 10:07:05 msg="Request" subsystem="webserver" level="0" prio="Info" tid="0" ts="1660637225.035" HTTPVersion="1.1" method="GET" remote="127.0.0.1:58982" respsize="145057" status="200" uniqueid="00017b49-394e-4d28-846d-06d391986df2" urlpath="/js/d3.v3.js"
Looks like the last commit (5e543b164ce9b90adbf55ea6b6ec72bb94e77604) broke things.
fixed now. sorry!