Fixes an issue where the connect server/database menu was not updated correctly. Fixes #7186

This commit is contained in:
Nikhil Mohite 2022-03-07 15:28:28 +05:30 committed by Akshay Joshi
parent 24c0816042
commit 1b7dce124b
3 changed files with 9 additions and 0 deletions

View File

@ -29,4 +29,5 @@ Bug fixes
| `Issue #7172 <https://redmine.postgresql.org/issues/7172>`_ - Allow users to scroll and enter input when there is a validation error.
| `Issue #7173 <https://redmine.postgresql.org/issues/7173>`_ - Fixed an issue where the User Management dialog is not opening.
| `Issue #7181 <https://redmine.postgresql.org/issues/7181>`_ - Ensure that the user should be able to add new server with unix socket connection.
| `Issue #7186 <https://redmine.postgresql.org/issues/7186>`_ - Fixes an issue where the connect server/database menu was not updated correctly.
| `Issue #7202 <https://redmine.postgresql.org/issues/7202>`_ - Ensure that Flask-Security-Too is using the latest version.

View File

@ -477,6 +477,9 @@ define('pgadmin.node.database', [
pgBrowser.Events.trigger(
'pgadmin:database:connected', _item, _data
);
/* Call enable/disable menu function after database is connected.
To make sure all the menus for database is in the right state */
pgBrowser.enable_disable_menus.apply(pgBrowser, [_item]);
if (!_connected) {
setTimeout(function() {

View File

@ -930,6 +930,11 @@ define('pgadmin.node.server', [
// Load dashboard
pgBrowser.Events.trigger('pgadmin-browser:tree:selected', _item, _data, node);
/* Call enable/disable menu function after database is connected.
To make sure all the menus for database is in the right state */
pgBrowser.enable_disable_menus.apply(pgBrowser, [_item]);
// We're not reconnecting
if (!_wasConnected) {
_tree.setInode(_item);