Skip to content

Commit bc90e93

Browse files
sh-shamsanSarah Alqahtani
authored andcommitted
Check if event ID exists before processing and prevent child events
Check if event ID exists before processing and prevent child events Co-authored-by: Sarah Alqahtani <Sarah.Alqahtani@ibm.com>
1 parent 0c3cdd4 commit bc90e93

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

presto-ui/src/components/StageDetail.jsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class OperatorSummary extends React.Component {
4747
const byteInputRate = totalWallTime === 0 ? 0 : (1.0 * parseDataSize(operator.inputDataSize)) / (totalWallTime / 1000.0);
4848

4949
return (
50-
<div>
50+
<div className="header-data">
5151
<div className="highlight-row">
5252
<div className="header-row">
5353
{operator.operatorType}
@@ -355,11 +355,12 @@ class StageOperatorGraph extends React.Component {
355355
}
356356

357357
handleOperatorClick(operatorCssId) {
358+
if(operatorCssId.target.hasOwnProperty("__data__") && operatorCssId.target.__data__ !== undefined){
358359
$('#operator-detail-modal').modal("show")
359360

360-
const pipelineId = (operatorCssId?.target?.__data__ || "").split('-').length > 0 ? parseInt(operatorCssId?.target?.__data__|| "").split('-')[1] : 0 ;
361-
const operatorId =(operatorCssId?.target?.__data__ || "").split('-').length > 0 ? parseInt(operatorCssId?.target?.__data__|| "").split('-')[2] : 0 ;
362-
361+
const pipelineId = (operatorCssId?.target?.__data__ || "").split('-').length > 0 ? parseInt((operatorCssId?.target?.__data__ || '').split('-')[1] || '0') : 0;
362+
const operatorId =(operatorCssId?.target?.__data__ || "").split('-').length > 0 ? parseInt((operatorCssId?.target?.__data__ || '').split('-')[2] || '0') : 0;
363+
363364
const stage = this.props.stage;
364365

365366
let operatorStageSummary = null;
@@ -372,7 +373,9 @@ class StageOperatorGraph extends React.Component {
372373
const container = document.getElementById('operator-detail');
373374
const root = createRoot(container);
374375
root.render(<OperatorDetail key={operatorCssId} operator={operatorStageSummary} tasks={stage.latestAttemptExecutionInfo.tasks}/>);
375-
376+
}else {
377+
return;
378+
}
376379
}
377380

378381
computeOperatorGraphs() {

presto-ui/src/static/assets/presto.css

+3
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ g .operator-stats:hover {
905905
margin-top: 20px;
906906
text-align: right;
907907
}
908+
.header-data{
909+
pointer-events: none;
910+
}
908911

909912
/** ============== **/
910913
/** Worker Page **/

0 commit comments

Comments
 (0)