diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py index 350dbadf6..cacbbef03 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py @@ -580,7 +580,7 @@ class RuleView(PGChildNodeView, SchemaDiffObjectCompare): return sql - @ staticmethod + @staticmethod def _check_schema_diff(target_schema, res_data): """ Check for schema diff, if yes then replace source schema with target diff --git a/web/pgadmin/misc/cloud/static/js/aws.js b/web/pgadmin/misc/cloud/static/js/aws.js index 1907d7b7e..509f2d708 100644 --- a/web/pgadmin/misc/cloud/static/js/aws.js +++ b/web/pgadmin/misc/cloud/static/js/aws.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// import React from 'react'; -import { styled } from '@mui/material/styles'; import pgAdmin from 'sources/pgadmin'; import { getNodeAjaxOptions, getNodeListById } from 'pgbrowser/node_ajax'; import {CloudInstanceDetailsSchema, CloudDBCredSchema, DatabaseSchema} from './aws_schema.ui'; @@ -19,13 +18,6 @@ import { isEmptyString } from 'sources/validators'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; -const StyledSchemaView= styled(SchemaView)(() => - ({ - '& .aws-formClass': { - overflow: 'auto', - } - })); - // AWS credentials export function AwsCredentials(props) { const [cloudDBCredInstance, setCloudDBCredInstance] = React.useState(); @@ -113,7 +105,7 @@ export function AwsInstanceDetails(props) { }, [props.cloudProvider]); - return { /*This is intentional (SonarQube)*/ }} viewHelperProps={{ mode: 'create' }} @@ -123,7 +115,6 @@ export function AwsInstanceDetails(props) { onDataChange={(isChanged, changedData) => { props.setCloudInstanceDetails(changedData); }} - formClassName='aws-formClass' />; } AwsInstanceDetails.propTypes = { diff --git a/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx b/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx index 42789ffa3..440395e4b 100644 --- a/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx +++ b/web/pgadmin/preferences/static/js/components/PreferencesComponent.jsx @@ -65,6 +65,9 @@ const StyledBox = styled(Box)(({theme}) => ({ height: '100%', paddingTop: '5px', overflow: 'auto', + '& .PreferencesComponent-preferencesContainerBackground': { + backgroundColor: theme.palette.background.default, + } }, }, '& .PreferencesComponent-footer': { @@ -123,6 +126,7 @@ function RightPanel({ schema, ...props }) { schema={schema} showFooter={false} isTabView={false} + formClassName='PreferencesComponent-preferencesContainerBackground' onDataChange={(isChanged, changedData) => { props.onDataChange(changedData); }} diff --git a/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx b/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx index 91a2438c0..22c7ea93c 100644 --- a/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx +++ b/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx @@ -1,4 +1,3 @@ -import { styled } from '@mui/material/styles'; import React from 'react'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; @@ -6,13 +5,6 @@ import BaseUISchema from '../SchemaView/base_schema.ui'; import SchemaView from '../SchemaView'; import { isEmptyString } from 'sources/validators'; - -const StyledSchemaView = styled(SchemaView)(({theme}) => ({ - '& .ChangeOwnershipContent-root': { - ...theme.mixins.tabPanel, - } -})); - class ChangeOwnershipSchema extends BaseUISchema { constructor(deletedUser, adminUserList, noOfSharedServers) { super({ @@ -52,7 +44,7 @@ export default function ChangeOwnershipContent({onSave, onClose, deletedUser, us const objChangeOwnership = new ChangeOwnershipSchema(deletedUser, userList, noOfSharedServers); - return { /*This is intentional (SonarQube)*/ }} schema={objChangeOwnership} @@ -66,7 +58,6 @@ export default function ChangeOwnershipContent({onSave, onClose, deletedUser, us disableSqlHelp={true} disableDialogHelp={true} isTabView={false} - formClassName='ChangeOwnershipContent-root' />; } ChangeOwnershipContent.propTypes = { diff --git a/web/pgadmin/static/js/Dialogs/ChangePasswordContent.jsx b/web/pgadmin/static/js/Dialogs/ChangePasswordContent.jsx index d7979449a..149bc309f 100644 --- a/web/pgadmin/static/js/Dialogs/ChangePasswordContent.jsx +++ b/web/pgadmin/static/js/Dialogs/ChangePasswordContent.jsx @@ -1,16 +1,9 @@ -import { styled } from '@mui/material/styles'; import React from 'react'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; import BaseUISchema from '../SchemaView/base_schema.ui'; import SchemaView from '../SchemaView'; -const StyledSchemaView = styled(SchemaView )(({theme}) => ({ - '& .ChangePasswordContent-root': { - ...theme.mixins.tabPanel, - } -})); - class ChangePasswordSchema extends BaseUISchema { constructor(user, isPgpassFileUsed, hasCsrfToken=false, showUser=true) { super({ @@ -72,7 +65,7 @@ class ChangePasswordSchema extends BaseUISchema { export default function ChangePasswordContent({getInitData=() => { /*This is intentional (SonarQube)*/ }, onSave, onClose, hasCsrfToken=false, showUser=true}) { - return { /*This is int disableSqlHelp={true} disableDialogHelp={true} isTabView={false} - formClassName='ChangePasswordContent-root' />; } ChangePasswordContent.propTypes = { diff --git a/web/pgadmin/static/js/Explain/Analysis.jsx b/web/pgadmin/static/js/Explain/Analysis.jsx index ff4c4952f..b5028d746 100644 --- a/web/pgadmin/static/js/Explain/Analysis.jsx +++ b/web/pgadmin/static/js/Explain/Analysis.jsx @@ -31,6 +31,10 @@ const StyledTable = styled(Table)(({theme}) => ({ backgroundColor: theme.otherVars.explain.sev4.bg, color: theme.otherVars.explain.sev4.color, }, + '& .Analysis-header': { + border: 'none', + background: 'none' + } })); function getRowClassname(data, collapseParent) { @@ -161,29 +165,29 @@ export default function Analysis({explainTable}) { - - + + - + - + - + - + - + - - - + + + diff --git a/web/pgadmin/static/js/SchemaView/FormView.jsx b/web/pgadmin/static/js/SchemaView/FormView.jsx index ea3bcb967..bf49f2b21 100644 --- a/web/pgadmin/static/js/SchemaView/FormView.jsx +++ b/web/pgadmin/static/js/SchemaView/FormView.jsx @@ -52,7 +52,7 @@ const StyledBox = styled(Box)(({theme}) => ({ } }, '& .FormView-nonTabPanel': { - backgroundColor: 'inherit', + ...theme.mixins.tabPanel, '& .FormView-nonTabPanelContent': { height: 'unset', '& .FormView-controlRow': { @@ -466,7 +466,7 @@ export default function FormView({ let contentClassName = ['FormView-nonTabPanelContent', (stateUtils.formErr.message ? 'FormView-errorMargin' : null)]; return ( - {Object.keys(finalTabs).map((tabName)=>{ return ( diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx index b4936c49b..fa0cd2c33 100644 --- a/web/pgadmin/static/js/components/FormComponents.jsx +++ b/web/pgadmin/static/js/components/FormComponents.jsx @@ -1068,12 +1068,14 @@ const ColorButton = withColorPicker(PgIconButton); export function InputColor({ value, controlProps, disabled, onChange, currObj }) { let btnStyles = { backgroundColor: value }; return ( - } options={{ - ...controlProps, - disabled: disabled - }} onChange={onChange} value={value} currObj={currObj} - /> + + } options={{ + ...controlProps, + disabled: disabled + }} onChange={onChange} value={value} currObj={currObj} + /> + ); } InputColor.propTypes = { diff --git a/web/pgadmin/static/js/components/Menu.jsx b/web/pgadmin/static/js/components/Menu.jsx index e29634a95..495362896 100644 --- a/web/pgadmin/static/js/components/Menu.jsx +++ b/web/pgadmin/static/js/components/Menu.jsx @@ -69,7 +69,7 @@ export const PgMenuItem = applyStatics(MenuItem)(({hasCheck=false, checked=false return {hasCheck && } {children} -
+
{keyVal ? `(${keyVal})` : ''}
; diff --git a/web/pgadmin/static/js/components/PgReactDataGrid.jsx b/web/pgadmin/static/js/components/PgReactDataGrid.jsx index 0923e2c35..c464e5a19 100644 --- a/web/pgadmin/static/js/components/PgReactDataGrid.jsx +++ b/web/pgadmin/static/js/components/PgReactDataGrid.jsx @@ -24,7 +24,7 @@ const StyledReactDataGrid = styled(ReactDataGrid)(({theme})=>({ fontSize: '12px', border: 'none', '--rdg-selection-color': theme.palette.primary.main, - '&.rdg-cell': { + '& .rdg-cell': { ...theme.mixins.panelBorder.right, ...theme.mixins.panelBorder.bottom, fontWeight: 'abc', @@ -43,7 +43,7 @@ const StyledReactDataGrid = styled(ReactDataGrid)(({theme})=>({ '& .rdg-header-row': { backgroundColor: theme.palette.background.default, }, - '&.rdg-row': { + '& .rdg-row': { backgroundColor: theme.palette.background.default, '&[aria-selected=true]': { backgroundColor: theme.palette.primary.light, diff --git a/web/pgadmin/static/js/helpers/wizard/Wizard.jsx b/web/pgadmin/static/js/helpers/wizard/Wizard.jsx index c91214726..b34da1bb3 100644 --- a/web/pgadmin/static/js/helpers/wizard/Wizard.jsx +++ b/web/pgadmin/static/js/helpers/wizard/Wizard.jsx @@ -174,24 +174,24 @@ function Wizard({ stepList, onStepChange, onSave, className, ...props }) { return ( -
-
+
+
{steps.map((label, index) => ( - - {index + 1} + + {index + 1} {label} {index === activeStep ? : null} {index < activeStep ? : null} ))} -
+
{ React.Children.map(props.children, (child) => { return ( -
+
{child}
); diff --git a/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx b/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx index 7090be80b..936fceb20 100644 --- a/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx +++ b/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx @@ -25,7 +25,7 @@ import PropTypes from 'prop-types'; import pgAdmin from 'sources/pgadmin'; import Table from '../../../../static/js/components/Table'; -const StyledBox = styled(Box)(() => +const StyledBox = styled(Box)(({theme}) => ({ height: '100%', '& .ImportExportServers-noOverflow': { @@ -45,6 +45,9 @@ const StyledBox = styled(Box)(() => '& .ImportExportServers-noteContainer': { marginTop: '5px', } + }, + '& .ImportExportServers-Background':{ + backgroundColor: theme.palette.background.default + ' !important', } })); @@ -215,6 +218,7 @@ export default function ImportExportServers({onClose}) { schema={new ImportExportSelectionSchema()} showFooter={false} isTabView={false} + formClassName='ImportExportServers-Background' onDataChange={(isChanged, changedData) => { setSelectionFormData(changedData); }} diff --git a/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx b/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx index 32c716f59..d42bd7aed 100644 --- a/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx +++ b/web/pgadmin/tools/search_objects/static/js/SearchObjects.jsx @@ -18,11 +18,16 @@ import url_for from 'sources/url_for'; import Loader from 'sources/components/Loader'; import getApiInstance, { parseApiError } from '../../../../static/js/api_instance'; import { PrimaryButton, PgIconButton } from '../../../../static/js/components/Buttons'; -import { ModalContent } from '../../../../static/js/components/ModalContent'; import { FormFooterMessage, InputSelect, InputText, MESSAGE_TYPE } from '../../../../static/js/components/FormComponents'; import PgReactDataGrid from '../../../../static/js/components/PgReactDataGrid'; const StyledBox = styled(Box)(({theme}) => ({ + display:'flex', + flexGrow: '1', + flexDirection:'column', + position:'relative', + overflow:'hidden', + height: '100%', '& .SearchObjects-toolbar': { padding: '4px', display: 'flex', @@ -41,7 +46,7 @@ const StyledBox = styled(Box)(({theme}) => ({ alignItems: 'center', borderTop: `1px solid ${theme.otherVars.inputBorderColor}`, }, - '&.SearchObjects-footer': { + '& .SearchObjects-footer': { borderTop: `1px solid ${theme.otherVars.inputBorderColor} !important`, padding: '0.5rem', display: 'flex', @@ -393,46 +398,44 @@ export default function SearchObjects({nodeData}) { }; return ( - - - - - - - setType(v)}/> - - } - onClick={onSearch} disabled={search.length < 3}>{gettext('Search')} + + + + + + setType(v)}/> - - - - - {footerText} - - setErrorMsg('')} /> - - + } + onClick={onSearch} disabled={search.length < 3}>{gettext('Search')} + + + + + + {footerText} + + setErrorMsg('')} /> + } title={gettext('Help for this dialog.')} /> - - + + ); } diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx index 59d5d599f..94951f71e 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx @@ -42,7 +42,7 @@ const StyledEditorDiv = styled(Box)(({ theme }) => ({ }, }, }, - '&.Editors-input': { + '& .Editors-input': { appearance: 'none', width: '100%', height: '100%', @@ -312,7 +312,7 @@ export function NumberEditor({row, column, onRowChange, onClose}) { } }; return ( - + ({ +const StyledBox = styled(Box)(() => ({ + height: '100%', '& .MacrosDialog-root': { - ...theme.mixins.tabPanel, - padding: 0, + padding: 0 + ' !important', } })); @@ -185,26 +186,28 @@ export default function MacrosDialog({onClose, onSave}) { } return ( - { - if(macrosErr) { - return Promise.reject(new Error(macrosErr)); - } - return Promise.resolve({macro: userMacrosData.filter((m)=>Boolean(m.name))}); - }} - schema={new MacrosSchema(keyOptions)} - viewHelperProps={{ - mode: 'edit', - }} - onSave={onSaveClick} - onClose={onClose} - hasSQL={false} - disableSqlHelp={true} - disableDialogHelp={true} - isTabView={false} - formClassName='MacrosDialog-root' - /> + + { + if(macrosErr) { + return Promise.reject(new Error(macrosErr)); + } + return Promise.resolve({macro: userMacrosData.filter((m)=>Boolean(m.name))}); + }} + schema={new MacrosSchema(keyOptions)} + viewHelperProps={{ + mode: 'edit', + }} + onSave={onSaveClick} + onClose={onClose} + hasSQL={false} + disableSqlHelp={true} + disableDialogHelp={true} + isTabView={false} + formClassName='MacrosDialog-root' + /> + ); } diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx index a5189ef54..9120dcbf5 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx @@ -27,6 +27,8 @@ const Root = styled('div')(({ theme }) => ({ display: 'flex', height: '100%', '.QuerySources-leftRoot': { + flexBasis: '50%', + maxWidth: '50%', display: 'flex', flexDirection: 'column', backgroundColor: theme.otherVars.editorToolbarBg, @@ -34,7 +36,10 @@ const Root = styled('div')(({ theme }) => ({ '& .QuerySources-header': { padding: '0.25rem', display: 'flex', - flexWrap: 'wrap' + flexWrap: 'wrap', + '& .QuerySources-removeBtnMargin': { + marginLeft: '0.25rem', + }, }, '& .QuerySources-listRoot': { ...theme.mixins.panelBorder.top, @@ -79,9 +84,6 @@ const Root = styled('div')(({ theme }) => ({ '& .QuerySources-queryMargin': { marginTop: '12px', }, - '& .QuerySources-removeBtnMargin': { - marginLeft: '0.25rem', - }, }, '& .QuerySources-infoHeader': { fontSize: '13px', @@ -266,7 +268,7 @@ QuerySourceIcon.propTypes = { }; function HistoryEntry({entry, formatEntryDate, itemKey, selectedItemKey, onClick}) { - return { + return { selectedItemKey==itemKey && ele?.scrollIntoView({ block: 'center', behavior: 'smooth', @@ -279,8 +281,7 @@ function HistoryEntry({entry, formatEntryDate, itemKey, selectedItemKey, onClick {formatEntryDate(entry.start_time)} - - ; + ; } const EntryPropType = PropTypes.shape({ @@ -321,15 +322,13 @@ function QueryHistoryDetails({entry}) { }, [entry]); if(!entry) { - return - - - - ; + return + + ; } return ( - + <> {entry.info && {entry.info}} @@ -361,7 +360,7 @@ function QueryHistoryDetails({entry}) { {_.isObject(entry.message) ? JSON.stringify(entry.message) : entry.message} - + ); } @@ -491,11 +490,11 @@ export function QueryHistory() { {React.useMemo(()=>( - + <> {qhu.current.size() == 0 ? : <> - + {gettext('Show queries generated internally by pgAdmin?')} @@ -531,7 +530,7 @@ export function QueryHistory() { } - + ), [selectedItemKey, showInternal, qhu.current.size()])} ); diff --git a/web/pgadmin/tools/user_management/static/js/UserManagementDialog.jsx b/web/pgadmin/tools/user_management/static/js/UserManagementDialog.jsx index 5494bd004..6ea2f6ea8 100644 --- a/web/pgadmin/tools/user_management/static/js/UserManagementDialog.jsx +++ b/web/pgadmin/tools/user_management/static/js/UserManagementDialog.jsx @@ -7,6 +7,7 @@ // ////////////////////////////////////////////////////////////// import React from 'react'; +import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; import SchemaView from '../../../../static/js/SchemaView'; import BaseUISchema from '../../../../static/js/SchemaView/base_schema.ui'; @@ -22,10 +23,10 @@ import { showChangeOwnership } from '../../../../static/js/Dialogs/index'; import { BROWSER_PANELS } from '../../../../browser/static/js/constants'; import _ from 'lodash'; -const StyledSchemaView = styled(SchemaView)(({theme}) => ({ +const StyledBox = styled(Box)(() => ({ + height: '100%', '& .UserManagementDialog-root': { - ...theme.mixins.tabPanel, - padding: 0, + padding: 0 + ' !important', } })); @@ -393,7 +394,7 @@ function UserManagementDialog({onClose}) { window.open(url_for('help.static', { 'filename': 'user_management.html' }), 'pgadmin_help'); }; - return { return new Promise((resolve, reject)=>{ api.get(url_for('user_management.users')) @@ -415,7 +416,7 @@ function UserManagementDialog({onClose}) { disableSqlHelp={true} isTabView={false} formClassName='UserManagementDialog-root' - />; + />; } UserManagementDialog.propTypes = { diff --git a/web/regression/feature_tests/query_tool_journey_test.py b/web/regression/feature_tests/query_tool_journey_test.py index 4b7f29d25..442d1e22a 100644 --- a/web/regression/feature_tests/query_tool_journey_test.py +++ b/web/regression/feature_tests/query_tool_journey_test.py @@ -362,7 +362,7 @@ class QueryToolJourneyTest(BaseFeatureTest): def _check_history_queries_and_icons(self, history_queries, history_icons): # Select first query history entry self.page.find_by_css_selector( - QueryToolLocators.query_history_specific_entry.format(1)).click() + QueryToolLocators.query_history_specific_entry.format(2)).click() for icon, query in zip(history_icons, history_queries): # Check query query_history_selected_item = self.page.find_by_css_selector(