Skip to content

Commit acaebec

Browse files
committed
Add query live plan flow to Preview Web UI
1 parent d1501ee commit acaebec

File tree

13 files changed

+1050
-17
lines changed

13 files changed

+1050
-17
lines changed

core/trino-web-ui/src/main/resources/webapp-preview/package-lock.json

Lines changed: 213 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/trino-web-ui/src/main/resources/webapp-preview/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
"check:clean": "npm clean-install && npm run lint && npm run prettier:check"
1717
},
1818
"dependencies": {
19+
"@dagrejs/dagre": "^1.1.5",
1920
"@emotion/react": "^11.14.0",
2021
"@emotion/styled": "^11.14.0",
2122
"@fontsource/roboto": "^5.2.5",
2223
"@mui/icons-material": "^6.4.7",
2324
"@mui/material": "^6.4.7",
2425
"@mui/x-charts": "^7.27.1",
26+
"@xyflow/react": "^12.8.2",
2527
"axios": "^1.8.2",
2628
"lodash": "^4.17.21",
2729
"react": "^18.3.1",

core/trino-web-ui/src/main/resources/webapp-preview/src/api/webapp/api.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,42 @@ export interface Session {
206206
catalogProperties: { [key: string]: string | number | boolean }
207207
}
208208

209+
export interface QueryStagePlan {
210+
id: string
211+
jsonRepresentation: string
212+
root: {
213+
id: string
214+
}
215+
}
216+
217+
export interface QueryStageStats {
218+
completedDrivers: number
219+
fullyBlocked: boolean
220+
totalCpuTime: string
221+
userMemoryReservation: string
222+
queuedDrivers: number
223+
runningDrivers: number
224+
rawInputDataSize: string
225+
rawInputPositions: number
226+
bufferedDataSize: string
227+
totalBlockedTime: string
228+
outputDataSize: string
229+
outputPositions: number
230+
}
231+
232+
export interface QueryStage {
233+
coordinatorOnly: boolean
234+
plan: QueryStagePlan
235+
stageId: string
236+
state: string
237+
stageStats: QueryStageStats
238+
}
239+
240+
export interface QueryStages {
241+
outputStageId: string
242+
stages: QueryStage[]
243+
}
244+
209245
export interface QueryStatusInfo extends QueryInfoBase {
210246
session: Session
211247
query: string
@@ -214,6 +250,7 @@ export interface QueryStatusInfo extends QueryInfoBase {
214250
retryPolicy: string
215251
pruned: boolean
216252
finalQueryInfo: boolean
253+
stages: QueryStages
217254
}
218255

219256
export async function statsApi(): Promise<ApiResponse<Stats>> {

0 commit comments

Comments
 (0)