-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Migrate jQuery (pt. 1) #9239
Migrate jQuery (pt. 1) #9239
Conversation
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Ah YAY great work (and great write-up)! 🎉 Is this ready for review? If so, I can look first thing tomorrow. |
@doeg Yes! Gotta get the tests to past though 😅 |
@notfelineit I can re-run the tests for you this morning. :') The failures are definitely unrelated to your PR. The only test that needs attention is the one that checks for the release note PR labels here. (This seems like a good one to mention in the release notes, fwiw!) |
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.
YAYyy the best jQuery upgrade is one that removes jQuery entirely! 😈
Such great work! Updating these dusty UIs is no easy feat. :) I pulled your branch + ran it locally and everything looks good to me! Thanks again for such a thorough write-up with screenshots.
@@ -73,6 +73,8 @@ releases | |||
/web/vtctld2/bower.json~ | |||
/web/vtctld2/public/bower_components/ | |||
|
|||
# Local examples | |||
/examples/local/vtdataroot |
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.
Thanks for adding this! (I've always wondered why it's not been in the .gitignore all along.) :)
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.
No problemo! :-)
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.
@doeg's review is the one that matters, but 👍
We can discuss which release(s) this actually needs to be backported to.
Description
This PR addresses a request to upgrade jQuery to the latest version.
It completely removes jQuery dependencies from the vtgate and vttablet web UIs, as well as updates the plotly.js snippet in vtctld.
Surface Area
Orchestrator still needs to be looked at, but these UIs have been identified via this list.
Main Changes
vtgate
It looks like jQuery in the vtgate UI was primarily used to mount Google's chart library. The chart library has been updated to use modern import and jQuery was swapped out here for a simple
document.getElementById
and the browser nativefetch
api. Confirmed that the charts still render and there is no jQuery anymore:vttablet
vttablet uses jQuery for the same reasons as vtgate, but in two places. Both have been updated to use
document.getElementById
and thefetch
api. Confirmed that the charts still render and there is no jQuery:vtctld
vtctld does not actually import jQuery and it is not loaded on the vtctld dashboard. The only place that references jQuery is the old plotly.js snippet. I updated this snippet and confirmed the graph still looks the same:
Related Issue(s)
N/A
Checklist
Deployment Notes
No extra deployment steps necessary for these changes. They do not add any new libraries.