mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed an issue where the New Connection Drop Down has lost default maintenance database, auto-select, and tab-through functionality. Fixes #6505
This commit is contained in:
parent
80ccd62d38
commit
2adb29ffc0
@ -22,4 +22,5 @@ Bug fixes
|
||||
| `Issue #6398 <https://redmine.postgresql.org/issues/6398>`_ - Fixed an issue where detaching the query editor panel gives a blank white panel.
|
||||
| `Issue #6448 <https://redmine.postgresql.org/issues/6448>`_ - Fixed an issue in the search object when searching in 'all types' or 'subscription' if the user doesn't have access to the subscription.
|
||||
| `Issue #6489 <https://redmine.postgresql.org/issues/6489>`_ - Fixed an issue where Execute/Refresh button should not be disabled when we run the empty query.
|
||||
| `Issue #6505 <https://redmine.postgresql.org/issues/6505>`_ - Fixed an issue where the New Connection Drop Down has lost default maintenance database, auto-select, and tab-through functionality.
|
||||
| `Issue #6541 <https://redmine.postgresql.org/issues/6541>`_ - Ensure that setting 'Open in new browser tab' should be visible, it should not be based on the value of 'ENABLE_PSQL'.
|
||||
|
@ -382,7 +382,11 @@ export default function newConnectionDialogModel(response, sgid, sid, handler, c
|
||||
&& m.get('server') !== '') {
|
||||
setTimeout(function() {
|
||||
if(self_local.options.length) {
|
||||
m.set('database', self_local.options[0].value);
|
||||
self_local.options.forEach(db => {
|
||||
if (db.selected) {
|
||||
m.set('database', db.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 10);
|
||||
return false;
|
||||
|
@ -1620,9 +1620,13 @@ def get_new_connection_database(sgid, sid=None):
|
||||
db_restrictions=db_disp_res
|
||||
)
|
||||
status, databases = conn.execute_dict(sql, params)
|
||||
_db = manager.db
|
||||
database_list = [
|
||||
{'label': database['name'], 'value': database['did']} for
|
||||
database in databases['rows']]
|
||||
{
|
||||
'label': database['name'],
|
||||
'value': database['did'],
|
||||
'selected': True if database['name'] == _db else False
|
||||
} for database in databases['rows']]
|
||||
else:
|
||||
status = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user