mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following issues for query tool after react porting:
1) Add New Server Connection > Server options keep loading(For empty Server group). 2) After clicking indent/Unindent(for all operations) for large query option left as it is till operation completes 3) Check sign beside options in Execute Option/Copy Header is little bit big 4) In explain > Analysis tab does not show ROWS column 5) In explain > Explain > analysis previous explain output is NOT cleared. New rows are appended. Same applies to the statistics tab. 6) Update new query tool connection tool tip. Fixes #7289 7) Explain-Analyze > Loops column is empty. 8) Explain-Analyze with Verbose & Costs > in ROW X columns upward arrows are missing. 9) Explain-Analyze with all option checked > background colors are missing for timing. 10) Explain-Analyze > Additional bullet is added before Hash Cond. 11) Browser Tree > Filtered rows icon is not working. 12) Create table with timestamp and default value as function now() > Add new row > Enter mandatory columns except column where default value is function(now()) > Click Save > New row added but column with default value has value [default]. not updated to actual value. / Default values are not considered for any column while adding a new entry. 13) Disable execute options in View/Edit data. 14) The Boolean column always shows null. 15) In Query history Remove & Remove all buttons are stuck to each other. 16) On Remove all, the right panel is empty. 17) Create a column with boolean[]/ text[], Try to add a new entry from data grid, enter “” quotes > Click Ok > Now try edit cell > You can not change value. 18) In query history - Select queries are suffixed by ’Save Data’ icon 19) Edit any table with PK > Try to insert duplicate PK > Error thrown > Correct pK value > Still old error shown > Not able to add new entry (This works when focus is moved from edited cell) 20) Clicking arrows after opening dropdown options, does not collapse dropdown. refs #6131
This commit is contained in:
committed by
Akshay Joshi
parent
74e3f976c1
commit
9c30d983bd
@@ -24,16 +24,19 @@ const useStyles = makeStyles((theme)=>({
|
||||
borderBottom: '2px dashed '+theme.palette.primary.main,
|
||||
},
|
||||
level2: {
|
||||
backgroundColor: '#fff',
|
||||
color: '#000',
|
||||
backgroundColor: theme.otherVars.explain.sev2.bg,
|
||||
color: theme.otherVars.explain.sev2.color,
|
||||
},
|
||||
level3: {
|
||||
backgroundColor: '#fff',
|
||||
color: '#000',
|
||||
backgroundColor: theme.otherVars.explain.sev3.bg,
|
||||
color: theme.otherVars.explain.sev3.color,
|
||||
},
|
||||
level4: {
|
||||
backgroundColor: '#fff',
|
||||
color: '#000',
|
||||
backgroundColor: theme.otherVars.explain.sev4.bg,
|
||||
color: theme.otherVars.explain.sev4.color,
|
||||
},
|
||||
textRight: {
|
||||
textAlign: 'right',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -43,15 +46,6 @@ function getRowClassname(data, collapseParent) {
|
||||
if(data['Plans']?.length > 0) {
|
||||
className.push(classes.collapsible);
|
||||
}
|
||||
if(!_.isEmpty(data['exclusive_flag'])) {
|
||||
className.push(classes['level'+data['exclusive_flag']]);
|
||||
}
|
||||
if(!_.isEmpty(data['inclusive_flag'])) {
|
||||
className.push(classes['level'+data['inclusive_flag']]);
|
||||
}
|
||||
if(!_.isEmpty(data['rowsx_flag'])) {
|
||||
className.push(classes['level'+data['rowsx_flag']]);
|
||||
}
|
||||
if(collapseParent) {
|
||||
className.push(classes.collapseParent);
|
||||
}
|
||||
@@ -61,10 +55,10 @@ function getRowClassname(data, collapseParent) {
|
||||
function NodeText({displayText, extraInfo}) {
|
||||
return (
|
||||
<>
|
||||
<ArrowRightAltIcon fontSize="small" /> {displayText}
|
||||
{extraInfo?.length > 0 && <ul>
|
||||
<ArrowRightAltIcon fontSize="small" style={{marginLeft: '-24px'}} /> {displayText}
|
||||
{extraInfo?.length > 0 && <ul style={{fontSize: '13px'}}>
|
||||
{extraInfo.map((item, i)=>{
|
||||
return <li key={i}>{HTMLReactParse(item)}</li>;
|
||||
return <li key={i} style={{opacity: '0.8'}}>{HTMLReactParse(item)}</li>;
|
||||
})}
|
||||
</ul>}
|
||||
</>);
|
||||
@@ -76,6 +70,7 @@ NodeText.propTypes = {
|
||||
|
||||
function ExplainRow({row, show, activeExId, setActiveExId, collapsedExId, toggleCollapseExId}) {
|
||||
let data = row['data'];
|
||||
const classes = useStyles();
|
||||
const exId = `pga_ex_${data['level'].join('_')}`;
|
||||
const parentExId = `pga_ex_${data['parent_node']}`;
|
||||
const collapsed = collapsedExId.findIndex((v)=>parentExId.startsWith(v)) > -1;
|
||||
@@ -94,29 +89,28 @@ function ExplainRow({row, show, activeExId, setActiveExId, collapsedExId, toggle
|
||||
<td>
|
||||
<FiberManualRecordIcon fontSize="small" style={{visibility: activeExId==parentExId ? 'visible' : 'hidden'}} />
|
||||
</td>
|
||||
<td>{data['_serial']}.</td>
|
||||
<td className={classes.textRight}>{data['_serial']}.</td>
|
||||
<td style={{paddingLeft: data['level'].length*30+'px'}} title={row['tooltip_text']}>
|
||||
<NodeText displayText={row['display_text']} extraInfo={row['node_extra_info']} />
|
||||
</td>
|
||||
<td style={show.show_timings ? {} : {display: 'none'}}>
|
||||
<td className={clsx(classes.textRight, classes['level'+data['exclusive_flag']])} style={show.show_timings ? {} : {display: 'none'}}>
|
||||
{data['exclusive'] && (data['exclusive']+' ms')}
|
||||
</td>
|
||||
<td style={show.show_timings ? {} : {display: 'none'}}>
|
||||
<td className={clsx(classes.textRight, classes['level'+data['inclusive_flag']])} style={show.show_timings ? {} : {display: 'none'}}>
|
||||
{data['inclusive'] && (data['inclusive']+' ms')}
|
||||
</td>
|
||||
<td style={{display: 'none'}}>{!_.isUndefined(data['rowsx_flag'])
|
||||
&& (data['rowsx_direction'] == 'positive' ? '↑' : '↓')
|
||||
}</td>
|
||||
<td style={show.show_rowsx ? {} : {display: 'none'}}>
|
||||
{data['rowsx']}
|
||||
<td className={clsx(classes.textRight, classes['level'+data['rowsx_flag']])} style={show.show_rowsx ? {} : {display: 'none'}}>
|
||||
{!_.isUndefined(data['rowsx_flag'])
|
||||
&& (data['rowsx_direction'] == 'positive' ? <>↑</> : <>↓</>)
|
||||
} {data['rowsx']}
|
||||
</td>
|
||||
<td style={(show.show_rowsx || show.show_rows) ? {} : {display: 'none'}}>
|
||||
<td className={classes.textRight} style={(show.show_rowsx || show.show_rows) ? {} : {display: 'none'}}>
|
||||
{data['Actual Rows']}
|
||||
</td>
|
||||
<td style={(show.show_rowsx || show.show_plan_rows) ? {} : {display: 'none'}}>
|
||||
<td className={classes.textRight} style={(show.show_rowsx || show.show_plan_rows) ? {} : {display: 'none'}}>
|
||||
{data['Plan Rows']}
|
||||
</td>
|
||||
<td style={(show.show_rowsx || show.show_rows) ? {} : {display: 'none'}}>
|
||||
<td className={classes.textRight} style={(show.show_rowsx || show.show_rows) ? {} : {display: 'none'}}>
|
||||
{data['Actual Loops']}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -130,7 +124,9 @@ ExplainRow.propTypes = {
|
||||
_serial: PropTypes.number,
|
||||
parent_node: PropTypes.number,
|
||||
exclusive: PropTypes.number,
|
||||
exclusive_flag: PropTypes.string,
|
||||
inclusive: PropTypes.number,
|
||||
inclusive_flag: PropTypes.string,
|
||||
rowsx_direction: PropTypes.string,
|
||||
rowsx: PropTypes.number,
|
||||
rowsx_flag: PropTypes.number,
|
||||
@@ -178,7 +174,8 @@ export default function Analysis({explainTable}) {
|
||||
<th colSpan="2" style={explainTable.show_timings ? {} : {display: 'none'}}>
|
||||
<button disabled="">Timings</button>
|
||||
</th>
|
||||
<th style={(explainTable.show_rowsx || explainTable.show_rows) ? {} : {display: 'none'}} colSpan="3">
|
||||
<th style={(explainTable.show_rowsx || explainTable.show_rows) ? {} : {display: 'none'}}
|
||||
colSpan={(explainTable.show_rowsx) ? '3' : '1'}>
|
||||
<button disabled="">Rows</button>
|
||||
</th>
|
||||
<th style={(explainTable.show_rowsx || explainTable.show_rows) ? {} : {display: 'none'}} rowSpan="2">
|
||||
|
||||
Reference in New Issue
Block a user