mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following issues for Schema Diff:
1) When some option from filter is selected, that particular type should be completely removed from top level result instead of showing identical:0 2) Copy button is missing for Difference SQL 3) Throw error when source & target server versions selected are different 4) In High contrast - Font color for identical turns same as background. 5) In High contrast - Checkbox box column turns same color of row resulting unable to distingiush about selection of item. refs #6133
This commit is contained in:
committed by
Akshay Joshi
parent
eb60b3892d
commit
ab5d53f3b1
@@ -107,7 +107,6 @@ const useStyles = makeStyles((theme) => ({
|
||||
width: '1.3rem'
|
||||
},
|
||||
cellExpand: {
|
||||
float: 'inline-end',
|
||||
display: 'table',
|
||||
blockSize: '100%',
|
||||
|
||||
@@ -137,7 +136,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
identical: {
|
||||
paddingLeft: '0.5rem',
|
||||
color: theme.otherVars.schemaDiff.diffSelectFG,
|
||||
color: theme.otherVars.schemaDiff.diffColorFg,
|
||||
},
|
||||
selectCell: {
|
||||
padding: '0 0.3rem'
|
||||
@@ -162,7 +161,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
selectedRowCheckBox: {
|
||||
paddingLeft: '0.5rem',
|
||||
backgroundColor: theme.palette.primary.light,
|
||||
backgroundColor: theme.otherVars.schemaDiff.diffSelCheckbox,
|
||||
},
|
||||
selChBox: {
|
||||
paddingLeft: 0,
|
||||
@@ -237,10 +236,18 @@ function CellExpanderFormatter({
|
||||
{
|
||||
'identicalCount' in row ?
|
||||
<span className={clsx(classes.count)}>
|
||||
<span className={classes.countLabel}>{FILTER_NAME.IDENTICAL}:</span> <span className={classes.countStyle}>{row.identicalCount} </span>
|
||||
<span className={classes.countLabel}>{FILTER_NAME.DIFFERENT}:</span> <span className={classes.countStyle}>{row.differentCount} </span>
|
||||
<span className={classes.countLabel}>{FILTER_NAME.SOURCE_ONLY}:</span> <span className={classes.countStyle}>{row.sourceOnlyCount} </span>
|
||||
<span className={classes.countLabel}>{FILTER_NAME.TARGET_ONLY}: </span><span className={classes.countStyle}>{row.targetOnlyCount}</span>
|
||||
{
|
||||
filterParams.includes(FILTER_NAME.IDENTICAL) && <><span className={classes.countLabel}>{FILTER_NAME.IDENTICAL}:</span> <span className={classes.countStyle}>{row.identicalCount} </span></>
|
||||
}
|
||||
{
|
||||
filterParams.includes(FILTER_NAME.DIFFERENT) && <><span className={classes.countLabel}>{FILTER_NAME.DIFFERENT}:</span> <span className={classes.countStyle}>{row.differentCount} </span></>
|
||||
}
|
||||
{
|
||||
filterParams.includes(FILTER_NAME.SOURCE_ONLY) && <><span className={classes.countLabel}>{FILTER_NAME.SOURCE_ONLY}:</span> <span className={classes.countStyle}>{row.sourceOnlyCount} </span></>
|
||||
}
|
||||
{
|
||||
filterParams.includes(FILTER_NAME.TARGET_ONLY) && <><span className={classes.countLabel}>{FILTER_NAME.TARGET_ONLY}: </span><span className={classes.countStyle}>{row.targetOnlyCount}</span></>
|
||||
}
|
||||
</span>
|
||||
: null
|
||||
|
||||
|
@@ -120,6 +120,11 @@ export function Results() {
|
||||
}}
|
||||
readonly={true}
|
||||
width='100%'
|
||||
controlProps={
|
||||
{
|
||||
showCopyBtn: true
|
||||
}
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
@@ -303,9 +303,10 @@ export function SchemaDiffCompare({ params }) {
|
||||
setFilterOptions(filterParams);
|
||||
getResultGridData(res.data.data, filterParams);
|
||||
}).catch((err) => {
|
||||
clearInterval(schemaDiffPollInterval);
|
||||
setLoaderText(null);
|
||||
setShowResultGrid(false);
|
||||
Notifier.error(gettext(err.message));
|
||||
Notifier.alert(gettext('Schema compare error'), gettext(err.response.data.errormsg));
|
||||
});
|
||||
|
||||
}
|
||||
@@ -405,7 +406,7 @@ export function SchemaDiffCompare({ params }) {
|
||||
});
|
||||
|
||||
} else if (record.group_name in tempData) {
|
||||
let chidId = Math.floor(Math.random() * 1000000);
|
||||
let chidId = crypto.getRandomValues(new Uint16Array(1));
|
||||
allRowIds.push(`${chidId}`);
|
||||
|
||||
let subChildId = record.id;
|
||||
@@ -448,8 +449,8 @@ export function SchemaDiffCompare({ params }) {
|
||||
};
|
||||
} else {
|
||||
let label = record.label;
|
||||
let _id = Math.floor(Math.random() * 100000);
|
||||
let _subChildId = Math.floor(Math.random() * 100000);
|
||||
let _id = crypto.getRandomValues(new Uint16Array(1));
|
||||
let _subChildId = crypto.getRandomValues(new Uint16Array(1));
|
||||
allRowIds.push(`${_id}`);
|
||||
allRowIds.push(`${_subChildId}`);
|
||||
tempData[record.group_name] = {
|
||||
|
Reference in New Issue
Block a user