Skip to content

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Oct 24, 2023

Why are the changes needed?

Close #5484

Kyuubi provides a basic new Web UI which is built on top of Vue3, we can remove the legacy dummy Web UI in 1.8.

The new UI hosts at http://<host>:<port>/ui/ and the legacy UI hosts at http://<host>:<port>/, we should

  1. Remove the legacy UI routing from Jetty
  2. Remove all files related to legacy UI
  3. Redirect http://<host>:<port>/ to http://<host>:<port>/ui/

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

building with the command build/dist --web-ui, then cd dist and perform bin/kyuubi run

access http://0.0.0.0:10099 could correctly redirect to http://0.0.0.0:10099/ui/

image

swagger is render correctly too.
image

  • Run test locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added kind:infra license, community building, project builds, asf infra related, etc. module:server kind:build labels Oct 24, 2023
@pan3793 pan3793 requested review from cfmcgrady, link3280 and turboFei and removed request for cfmcgrady October 24, 2023 14:26
@pan3793 pan3793 self-assigned this Oct 24, 2023
@pan3793 pan3793 added this to the v1.8.0 milestone Oct 24, 2023
@link3280
Copy link
Contributor

LGTM.

server.addStaticHandler("org/apache/kyuubi/ui/static", "/static/")
server.addRedirectHandler("/", "/static/")
server.addRedirectHandler("/static", "/static/")
server.addStaticHandler("META-INF/resources/webjars/swagger-ui/4.9.1/", "/swagger-static/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's safety to remove dep swagger-ui

kyuubi/pom.xml

Lines 836 to 846 in 5cff4fb

<!--
1. This library only contains swagger-ui static resource (.html/.css/.js/.png), for more detail, see
https://github.com/swagger-api/swagger-ui/blob/master/dist/
2. Note that when trying to upgrade swagger-ui, we should also update the version in the file(
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala).
-->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>swagger-ui</artifactId>
<version>${swagger-ui.version}</version>
</dependency>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching, removed

@yaooqinn yaooqinn closed this in 75428bb Oct 25, 2023
yaooqinn pushed a commit that referenced this pull request Oct 25, 2023
### _Why are the changes needed?_

Close #5484

Kyuubi provides a basic new Web UI which is built on top of Vue3, we can remove the legacy dummy Web UI in 1.8.

The new UI hosts at `http://<host>:<port>/ui/` and the legacy UI hosts at `http://<host>:<port>/`, we should

1. Remove the legacy UI routing from Jetty
2. Remove all files related to legacy UI
3. Redirect `http://<host>:<port>/` to `http://<host>:<port>/ui/`

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [x] Add screenshots for manual tests if appropriate

building with the command `build/dist --web-ui`, then `cd dist` and perform `bin/kyuubi run`

access http://0.0.0.0:10099 could correctly redirect to http://0.0.0.0:10099/ui/

<img width="1428" alt="image" src="https://github.com/apache/kyuubi/assets/26535726/1e8a67f6-e4db-415e-8a47-dd7c41b487cf">

swagger is render correctly too.
<img width="1428" alt="image" src="https://github.com/apache/kyuubi/assets/26535726/1cb4ba31-9965-4468-b7c3-b0319ba959e6">

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

No.

Closes #5516 from pan3793/5484.

Closes #5484

9d58ef7 [Cheng Pan] address comment and fix test
6d4c098 [Cheng Pan] [KYUUBI #5484] Remove legacy Web UI

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
(cherry picked from commit 75428bb)
Signed-off-by: Kent Yao <yao@apache.org>
@yaooqinn
Copy link
Member

Thank you all, merged to master and 1.8

@pan3793 pan3793 deleted the 5484 branch October 25, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:build kind:infra license, community building, project builds, asf infra related, etc. module:server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove legacy Web UI

5 participants