-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Webapp Preview: Cluster Overview with sparklines #23600
Conversation
2510d59
to
970f58c
Compare
970f58c
to
4197fa4
Compare
* limitations under the License. | ||
*/ | ||
export interface ApiResponse { | ||
ok: boolean; |
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.
do we need this field if we have a status?
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.
dropped
core/trino-web-ui/src/main/resources/webapp-preview/src/api/base.ts
Outdated
Show resolved
Hide resolved
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
async get(url: string, params: Record<string, any> = {}): Promise<ApiResponse> |
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.
can we instead use some high level library that does all of these things?
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 will make it to use axios very soon.
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.
it's now using axios with generic get/post wrappers. Dealing with HTTP errors and JSON serialisation are done by axios automatically.
core/trino-web-ui/src/main/resources/webapp-preview/src/api/base.ts
Outdated
Show resolved
Hide resolved
core/trino-web-ui/src/main/resources/webapp-preview/src/api/webapp/api.ts
Outdated
Show resolved
Hide resolved
core/trino-web-ui/src/main/resources/webapp-preview/src/components/Dashboard.tsx
Outdated
Show resolved
Hide resolved
b4f7c70
to
a879d97
Compare
a879d97
to
5437bc7
Compare
This pull request has gone a while without any activity. Tagging for triage help: @mosabua |
I'm looking into it right now |
I think that we can merge it and improve as follow up since this is a preview UI. |
@mosabua wdyt? |
Agreed .. lets merge and continue in further PRs. |
I cant merge myself at the moment since I am busy with summit and cant fix things if anything goes wrong. Go ahead @wendigo if you are available.. otherwise I will do later today. |
Added to release notes... |
Also @koszti please note https://trino.io/development/process#pull-request-and-commit-guidelines- for next time .. In this case it could have been
|
Description
This PR adds the cluster statistics page into the preview UI dashboard, maintaining identical functionality to the existing UI while incorporating the latest Material UI components. Partially addressing #22697
Technical details
The dashboard fetches cluster metrics every second from the
/ui/api/stats
endpoint and visualizes them using the mui-x/charts SparkLineChart component.Note that there is some overlap with PR #23230, which implements authentication. Currently, this feature supports only
fixed
authentication types; however, it will be compatible with all authentication methods once the aforementioned PR is merged.UPDATE: The PR also updates all dependencies to latest. Including to upgrade eslint to 9.x that requires to replace
.eslintrc.cjs
toeslint.config.js
.Screenshots
The displayed metrics are generated values and do not accurately represent real-world scenarios.