mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support for Azure PostgreSQL deployment in server mode. Fixes #7522
This commit is contained in:
committed by
Akshay Joshi
parent
64e6700228
commit
59f5c0d955
@@ -224,10 +224,22 @@ export const MappedFormControl = (props) => {
|
||||
newProps.type = typeProps;
|
||||
}
|
||||
|
||||
let origOnClick = newProps.onClick;
|
||||
newProps.onClick = ()=>{
|
||||
origOnClick?.();
|
||||
/* Consider on click as change for button.
|
||||
Just increase state val by 1 to inform the deps and self depChange */
|
||||
newProps.onChange?.((newProps.state[props.id]||0)+1);
|
||||
};
|
||||
|
||||
/* Filter out garbage props if any using ALLOWED_PROPS_FIELD */
|
||||
return <MappedFormControlBase {..._.pick(newProps, _.union(ALLOWED_PROPS_FIELD_COMMON, ALLOWED_PROPS_FIELD_FORM))} />;
|
||||
};
|
||||
|
||||
MappedFormControl.propTypes = {
|
||||
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
||||
};
|
||||
|
||||
export const MappedCellControl = (props) => {
|
||||
let newProps = { ...props };
|
||||
let cellProps = evalFunc(null, newProps.cell, newProps.row);
|
||||
|
||||
@@ -494,20 +494,22 @@ function SchemaDialogView({
|
||||
|
||||
useEffect(()=>{
|
||||
if(sessData.__deferred__?.length > 0) {
|
||||
let items = sessData.__deferred__;
|
||||
sessDispatch({
|
||||
type: SCHEMA_STATE_ACTIONS.CLEAR_DEFERRED_QUEUE,
|
||||
});
|
||||
|
||||
let item = sessData.__deferred__[0];
|
||||
item.promise.then((resFunc)=>{
|
||||
sessDispatch({
|
||||
type: SCHEMA_STATE_ACTIONS.DEFERRED_DEPCHANGE,
|
||||
path: item.action.path,
|
||||
depChange: item.action.depChange,
|
||||
listener: {
|
||||
...item.listener,
|
||||
callback: resFunc,
|
||||
},
|
||||
items.forEach((item)=>{
|
||||
item.promise.then((resFunc)=>{
|
||||
sessDispatch({
|
||||
type: SCHEMA_STATE_ACTIONS.DEFERRED_DEPCHANGE,
|
||||
path: item.action.path,
|
||||
depChange: item.action.depChange,
|
||||
listener: {
|
||||
...item.listener,
|
||||
callback: resFunc,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1118,12 +1118,13 @@ PlainString.propTypes = {
|
||||
value: PropTypes.any,
|
||||
};
|
||||
|
||||
export function FormNote({ text, className }) {
|
||||
export function FormNote({ text, className, controlProps }) {
|
||||
const classes = useStyles();
|
||||
/* If raw, then remove the styles and icon */
|
||||
return (
|
||||
<Box className={className}>
|
||||
<Paper elevation={0} className={classes.noteRoot}>
|
||||
<Box paddingRight="0.25rem"><DescriptionIcon fontSize="small" /></Box>
|
||||
<Paper elevation={0} className={controlProps?.raw ? '' : classes.noteRoot}>
|
||||
{!controlProps?.raw && <Box paddingRight="0.25rem"><DescriptionIcon fontSize="small" /></Box>}
|
||||
<Box>{HTMLReactParse(text || '')}</Box>
|
||||
</Paper>
|
||||
</Box>
|
||||
@@ -1132,6 +1133,7 @@ export function FormNote({ text, className }) {
|
||||
FormNote.propTypes = {
|
||||
text: PropTypes.string,
|
||||
className: CustomPropTypes.className,
|
||||
controlProps: PropTypes.object,
|
||||
};
|
||||
|
||||
const useStylesFormFooter = makeStyles((theme) => ({
|
||||
|
||||
Reference in New Issue
Block a user