-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Exclude query_view_spa.html from build #24596
base: master
Are you sure you want to change the base?
Conversation
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.
the changes look good to me. However, still need to fix the flow errors.
Thanks for the fix.
Thanks @yhwang , I forget to run the check before commit will keep in mind next time. BTW, I removed the yarn run package from README.md, seems it is not working anymore. |
httpServerBinder(binder).bindResource("/tableau", "webapp/tableau") | ||
.withExtraHeader(HttpHeaders.X_CONTENT_TYPE_OPTIONS, "nosniff") | ||
.withExtraHeader(HttpHeaders.CONTENT_SECURITY_POLICY, "default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; frame-ancestors 'self'; img-src http: https: data:"); | ||
webUIBinder(binder, "/ui/dev", "webapp/dev").withWelcomeFile("index.html"); |
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.
Add this to let user can use URL like http://localhost/ui/dev/ or http://localhost/ui/dev to access the query viewer page.
Before this fix, user have to use URL like http://localhost/ui/dev/index.html to access the query viewer page, also http://localhost/ui/dev/ and http://localhost/ui/dev will show a blank page with no errors.
"build:spa": "webpack --config webpack.config.js --env production --env config=spa", | ||
"serve:spa": "webpack serve --config webpack.config.js --env config=spa", | ||
"watch:spa": "webpack --config webpack.config.js --env config=spa --watch", |
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.
New build/serve/watch command for page query_viewer_spa.html, will not generate this during presto build
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.
LGTM! (docs)
"View file" in GitHub, everything looks good. Thanks for the edit!
@jaystarshot Can you help to review? Thanks. |
Description
For issue #24593
Changes:
yarn build:spa
,yarn serve:spa
,yarn watch:spa
for development and build locallyMotivation and Context
The query_view_spa.html can not be open in the presto server by using URL like http://localhost:8080/ui/dev/query_view_spa.html
The cause is that from 0.291, the CSP is added in presto http server.
So the urls of external javascript/css files in query_view_spa.html will be blocked.
That is why we exlcude this page from build.
To open the query, user can open url like http://localhost:8080/ui/dev/ (which will open the index.html)
The query_view_spa.html page can be kept for offline use. User has to build it locally.
Impact
Presto UI, URL mapping for
/ui/dev/
,/ui/dev
Test Plan
Local test
Contributor checklist
Release Notes