diff --git a/docs/en_US/release_notes_8_9.rst b/docs/en_US/release_notes_8_9.rst index 0a12d372dbc..885583f169e 100644 --- a/docs/en_US/release_notes_8_9.rst +++ b/docs/en_US/release_notes_8_9.rst @@ -4,7 +4,7 @@ Version 8.9 Release date: 2024-06-27 -This release contains a number of bug fixes and new features since the release of pgAdmin 4 v8.7. +This release contains a number of bug fixes and new features since the release of pgAdmin 4 v8.8. Supported Database Servers ************************** @@ -19,8 +19,8 @@ Bundled PostgreSQL Utilities New features ************ - | `Issue #5932 `_ - Provide option to set theme based on OS theme preference. + | `Issue #5932 `_ - Provide option to set theme based on OS theme preference. Housekeeping ************ @@ -31,6 +31,11 @@ Bug fixes ********* | `Issue #6357 `_ - Disable the query tool editor input if any SQL is being loaded to prevent users from typing. + | `Issue #7241 `_ - Fixed an issue where resizable data editors in query tool should not be allowed to resize beyond the app window bounds. + | `Issue #7295 `_ - Fixed new line indentation in query editor and add a user preference to disable it. | `Issue #7306 `_ - Ensure that a user can connect to a server using SSL certificates and identity files from a shared storage. + | `Issue #7414 `_ - Add support for comments on RLS policy object. | `Issue #7481 `_ - Fixed an issue where dark theme shows white background when all tabs are closed. | `Issue #7516 `_ - Ensure preferences can be loaded using preferences.json. + | `Issue #7536 `_ - Search Objects dialog should focus on search input on open. + | `Issue #7555 `_ - Fixed an issue where query tool shortcuts for find/replace are not working. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/static/js/collation.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/static/js/collation.ui.js index be83e002f92..ab390192e02 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/static/js/collation.ui.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/static/js/collation.ui.js @@ -165,9 +165,8 @@ export default class CollationSchema extends BaseUISchema { else { if (actionObj.oldState.is_deterministic) { return { is_deterministic: false }; - } else { - return { is_deterministic: true }; } + return { is_deterministic: true }; } }, }, diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py index 96fd36ee505..03be58f9281 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py @@ -825,7 +825,7 @@ def get_inner(sql): if sql is None: return None start = 0 - start_position = re.search("\\s+[is|as]+\\s+", sql, flags=re.I) + start_position = re.search("\\s+(is|as)+\\s+", sql, flags=re.I) if start_position: start = start_position.start() + 4 diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py index 7c88a401c96..68d2d8513de 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py @@ -582,7 +582,7 @@ def get_inner(sql): if sql is None: return None start = 0 - start_position = re.search(r"\s+[is|as]+\s+", sql, flags=re.I) + start_position = re.search(r"\s+(is|as)+\s+", sql, flags=re.I) if start_position: start = start_position.start() + 4 diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/compound_triggers/static/js/compound_trigger.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/compound_triggers/static/js/compound_trigger.ui.js index 9de6db72827..4fb1c366084 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/compound_triggers/static/js/compound_trigger.ui.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/compound_triggers/static/js/compound_trigger.ui.js @@ -128,10 +128,7 @@ export default class CompoundTriggerSchema extends BaseUISchema { } // Enable column only if update event is set true let isUpdate = state.evnt_update; - if(!_.isUndefined(isUpdate) && isUpdate) { - return false; - } - return true; + return !(!_.isUndefined(isUpdate) && isUpdate); }, readonly: function(state) { return !obj.isNew(state); }, },{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js index 1a7dd3ca124..49bb6599c1b 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js @@ -402,7 +402,7 @@ define('pgadmin.node.table', [ handle_cache: function() { // Clear Table's cache as column's type is dependent on two node // 1) Type node 2) Domain node - this.clear_cache.apply(this, null); + this.clear_cache(...null); }, }); } diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py index 68338c086fb..068a7d47138 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py @@ -521,13 +521,13 @@ def parse_rule_definition(res): # Parse data for condition condition = '' condition_part_match = re.search( - r"((?:ON)\s+(?:[\s\S]+?)" - r"(?:TO)\s+(?:[\s\S]+?)(?:DO))", data_def) + r"(ON\s+[\s\S]+?" + r"TO\s+[\s\S]+?DO)", data_def) if condition_part_match is not None: condition_part = condition_part_match.group(1) condition_match = re.search( - r"(?:WHERE)\s+(\([\s\S]*\))\s+(?:DO)", condition_part) + r"WHERE\s+(\([\s\S]*\))\s+DO", condition_part) if condition_match is not None: condition = condition_match.group(1) @@ -537,7 +537,7 @@ def parse_rule_definition(res): # Parse data for statements statement_match = re.search( - r"(?:DO\s+)(?:INSTEAD\s+)?([\s\S]*)(?:;)", data_def) + r"DO\s+(?:INSTEAD\s+)?([\s\S]*);", data_def) statement = '' if statement_match is not None: diff --git a/web/pgadmin/browser/static/css/wizard.css b/web/pgadmin/browser/static/css/wizard.css index c999fab0173..10b831941ad 100644 --- a/web/pgadmin/browser/static/css/wizard.css +++ b/web/pgadmin/browser/static/css/wizard.css @@ -62,7 +62,6 @@ .wizard { width: 100%; - /*height: 550px;*/ } .step { diff --git a/web/pgadmin/misc/cloud/static/js/azure.js b/web/pgadmin/misc/cloud/static/js/azure.js index a5494b799fb..44150ff670a 100644 --- a/web/pgadmin/misc/cloud/static/js/azure.js +++ b/web/pgadmin/misc/cloud/static/js/azure.js @@ -25,7 +25,7 @@ export function AzureCredentials(props) { let _eventBus = React.useContext(CloudWizardEventsContext); React.useMemo(() => { - const azureCloudDBCredSchema = new AzureCredSchema({ + const azureCloudDBCredSchema = new AzureCredSchema(_eventBus, { authenticateAzure:(auth_type, azure_tenant_id) => { let loading_icon_url = url_for( 'static', { 'filename': 'img/loading.gif'} @@ -77,7 +77,7 @@ export function AzureCredentials(props) { }, 1000); }); } - }, {}, _eventBus); + }, {}); setCloudDBCredInstance(azureCloudDBCredSchema); }, [props.cloudProvider]); diff --git a/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js b/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js index e9797778436..8de4e49caca 100644 --- a/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js +++ b/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js @@ -13,7 +13,7 @@ import { isEmptyString } from 'sources/validators'; import pgAdmin from 'sources/pgadmin'; class AzureCredSchema extends BaseUISchema { - constructor(fieldOptions = {}, initValues = {}, eventBus) { + constructor(eventBus, fieldOptions = {}, initValues = {}) { super({ oid: null, auth_type: 'interactive_browser_credential', diff --git a/web/pgadmin/static/js/AppMenuBar.jsx b/web/pgadmin/static/js/AppMenuBar.jsx index 2f1745e4c76..687ad828514 100644 --- a/web/pgadmin/static/js/AppMenuBar.jsx +++ b/web/pgadmin/static/js/AppMenuBar.jsx @@ -8,12 +8,13 @@ ////////////////////////////////////////////////////////////// import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; -import React, { useState, useEffect } from 'react'; +import React, { useEffect } from 'react'; import { PrimaryButton } from './components/Buttons'; import { PgMenu, PgMenuDivider, PgMenuItem, PgSubMenu } from './components/Menu'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import AccountCircleRoundedIcon from '@mui/icons-material/AccountCircleRounded'; import { usePgAdmin } from '../../static/js/BrowserComponent'; +import { useForceUpdate } from './custom_hooks'; const StyledBox = styled(Box)(({theme}) => ({ @@ -39,7 +40,7 @@ const StyledBox = styled(Box)(({theme}) => ({ alignItems: 'center', gap: '2px', marginLeft: '16px', - + '& .MuiButton-containedPrimary': { padding: '1px 8px', } @@ -59,17 +60,15 @@ const StyledBox = styled(Box)(({theme}) => ({ export default function AppMenuBar() { - const [,setRefresh] = useState(false); + const forceUpdate = useForceUpdate(); const pgAdmin = usePgAdmin(); - const reRenderMenus = ()=>setRefresh((prev)=>!prev); - useEffect(()=>{ pgAdmin.Browser.Events.on('pgadmin:nw-enable-disable-menu-items', _.debounce(()=>{ - reRenderMenus(); + forceUpdate(); }, 100)); pgAdmin.Browser.Events.on('pgadmin:nw-refresh-menu-item', _.debounce(()=>{ - reRenderMenus(); + forceUpdate(); }, 100)); }, []); @@ -85,7 +84,7 @@ export default function AppMenuBar() { onClick={()=>{ menuItem.callback(); if(hasCheck) { - reRenderMenus(); + forceUpdate(); } }} hasCheck={hasCheck} diff --git a/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx b/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx index cded49ea646..04bfc6fba0c 100644 --- a/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx +++ b/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx @@ -23,7 +23,7 @@ export default function UrlDialogContent({ url, helpFile, onClose }) { return ( -