({row, show, activeExId, setActiveExId, collapsedExId, toggleCollapseExId})
| 67 | }; |
| 68 | |
| 69 | function ExplainRow({row, show, activeExId, setActiveExId, collapsedExId, toggleCollapseExId}) { |
| 70 | let data = row['data']; |
| 71 | |
| 72 | const exId = `pga_ex_${data['level'].join('_')}`; |
| 73 | const parentExId = `pga_ex_${data['parent_node']}`; |
| 74 | const collapsed = collapsedExId.findIndex((v)=>parentExId.startsWith(v)) > -1; |
| 75 | const className = getRowClassname(data, collapsedExId.indexOf(exId) > -1); |
| 76 | let onRowClick = (e)=>{ |
| 77 | toggleCollapseExId(e.currentTarget.getAttribute('data-ex-id'), data['Plans']?.length); |
| 78 | }; |
| 79 | |
| 80 | return ( |
| 81 | <tr onMouseEnter={(e)=>{setActiveExId(e.currentTarget.getAttribute('data-ex-id'));}} |
| 82 | onMouseLeave={()=>{setActiveExId(null);}} |
| 83 | className={className} data-parent={parentExId} |
| 84 | data-ex-id={`pga_ex_${data['level'].join('_')}`} |
| 85 | style={collapsed ? {display: 'none'} : {}} |
| 86 | onClick={onRowClick}> |
| 87 | <td> |
| 88 | <FiberManualRecordIcon fontSize="small" style={{visibility: activeExId==parentExId ? 'visible' : 'hidden'}} /> |
| 89 | </td> |
| 90 | <td className='Analysis-textRight'>{data['_serial']}.</td> |
| 91 | <td style={{paddingLeft: data['level'].length*30+'px'}} title={row['tooltip_text']}> |
| 92 | <NodeText displayText={row['display_text']} extraInfo={row['node_extra_info']} /> |
| 93 | </td> |
| 94 | <td className={'Analysis-textRight ' + 'Analysis-' +['level'+data['exclusive_flag']]} style={show.show_timings ? {} : {display: 'none'}}> |
| 95 | {data['exclusive'] && (data['exclusive']+' ms')} |
| 96 | </td> |
| 97 | <td className={'Analysis-textRight ' + 'Analysis-' +['level'+data['inclusive_flag']]} style={show.show_timings ? {} : {display: 'none'}}> |
| 98 | {data['inclusive'] && (data['inclusive']+' ms')} |
| 99 | </td> |
| 100 | <td className={'Analysis-textRight ' + 'Analysis-' +['level'+data['rowsx_flag']]} style={show.show_rowsx ? {} : {display: 'none'}}> |
| 101 | {!_.isUndefined(data['rowsx_flag']) |
| 102 | && (data['rowsx_direction'] == 'positive' ? <>↑</> : <>↓</>) |
| 103 | } {data['rowsx']} |
| 104 | </td> |
| 105 | <td className='Analysis-textRight' style={(show.show_rowsx || show.show_rows) ? {} : {display: 'none'}}> |
| 106 | {data['Actual Rows']} |
| 107 | </td> |
| 108 | <td className='Analysis-textRight' style={(show.show_rowsx || show.show_plan_rows) ? {} : {display: 'none'}}> |
| 109 | {data['Plan Rows']} |
| 110 | </td> |
| 111 | <td className='Analysis-textRight' style={(show.show_rowsx || show.show_rows) ? {} : {display: 'none'}}> |
| 112 | {data['Actual Loops']} |
| 113 | </td> |
| 114 | </tr> |
| 115 | ); |
| 116 | } |
| 117 | ExplainRow.propTypes = { |
| 118 | row: PropTypes.shape({ |
| 119 | data: PropTypes.shape({ |
nothing calls this directly
no test coverage detected