Skip to content

Commit 584876f

Browse files
committed
fix(ui): fix timeline and stage detail
1 parent 5eaa476 commit 584876f

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

presto-ui/src/components/QueryDetail.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function TaskList({tasks}) {
109109
function calculateElapsedTime(row) {
110110
let elapsedTime = parseDuration(row.stats.elapsedTimeInNanos + "ns");
111111
if (elapsedTime === 0) {
112-
elapsedTime = Date.now() - Date.parse(row.stats.createTime);
112+
elapsedTime = Date.now() - Date.parse(row.stats.createTimeInMillis);
113113
}
114114
return elapsedTime;
115115
}

presto-ui/src/components/QueryOverview.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function TaskList({ tasks }: { tasks: Task[] }) : React.Node {
285285
function calculateElapsedTime(row: Task): number {
286286
let elapsedTime = parseDuration(row.stats.elapsedTimeInNanos + "ns") || 0;
287287
if (elapsedTime === 0) {
288-
elapsedTime = Date.now() - Date.parse(row.stats.createTime);
288+
elapsedTime = Date.now() - Date.parse(row.stats.createTimeInMillis);
289289
}
290290
return elapsedTime;
291291
}

presto-ui/src/components/QuerySplitsView.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export default function SplitView({ data, show }): void {
3232
return {
3333
taskId: task.taskId.substring(task.taskId.indexOf('.') + 1),
3434
time: {
35-
create: task.stats.createTime,
36-
firstStart: task.stats.firstStartTime,
37-
lastStart: task.stats.lastStartTime,
38-
lastEnd: task.stats.lastEndTime,
39-
end: task.stats.endTime,
35+
create: task.stats.createTimeInMillis,
36+
firstStart: task.stats.firstStartTimeInMillis,
37+
lastStart: task.stats.lastStartTimeInMillis,
38+
lastEnd: task.stats.lastEndTimeInMillis,
39+
end: task.stats.endTimeInMillis,
4040
},
4141
};
4242
});

presto-ui/src/components/QueryStageView.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ function OperatorDetail({ index, operator, tasks }) {
187187
tasksSorted.forEach(task => {
188188
task.stats.pipelines.forEach(pipeline => {
189189
if (pipeline.pipelineId === operator.pipelineId) {
190-
pipeline.operatorSummaries.forEach(operator => {
191-
if (operator.operatorId === operator.operatorId) {
192-
operatorTasks.push(operator);
190+
pipeline.operatorSummaries.forEach(op => {
191+
if (op.operatorId === operator.operatorId) {
192+
operatorTasks.push(op);
193193
}
194194
});
195195
}

presto-ui/src/components/Splits.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ export default function Split(): void {
3636
return {
3737
taskId: task.taskId.substring(task.taskId.indexOf('.') + 1),
3838
time: {
39-
create: task.stats.createTime,
40-
firstStart: task.stats.firstStartTime,
41-
lastStart: task.stats.lastStartTime,
42-
lastEnd: task.stats.lastEndTime,
43-
end: task.stats.endTime,
39+
create: task.stats.createTimeInMillis,
40+
firstStart: task.stats.firstStartTimeInMillis,
41+
lastStart: task.stats.lastStartTimeInMillis,
42+
lastEnd: task.stats.lastEndTimeInMillis,
43+
end: task.stats.endTimeInMillis,
4444
},
4545
};
4646
});

presto-ui/src/components/StageDetail.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ function OperatorDetail({ index, operator, tasks }) {
189189
tasksSorted.forEach(task => {
190190
task.stats.pipelines.forEach(pipeline => {
191191
if (pipeline.pipelineId === operator.pipelineId) {
192-
pipeline.operatorSummaries.forEach(operator => {
193-
if (operator.operatorId === operator.operatorId) {
194-
operatorTasks.push(operator);
192+
pipeline.operatorSummaries.forEach(op => {
193+
if (op.operatorId === operator.operatorId) {
194+
operatorTasks.push(op);
195195
}
196196
});
197197
}

0 commit comments

Comments
 (0)