mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed an issue when switching between connections in the Query Tool dropdown,
the background and foreground colors should be changed. Fixes #7374
This commit is contained in:
parent
aaab5c51a7
commit
b507eb8857
@ -25,6 +25,7 @@ Bug fixes
|
|||||||
| `Issue #7368 <https://redmine.postgresql.org/issues/7368>`_ - Ensure that unwanted APIs should not be getting called for BigAnimal.
|
| `Issue #7368 <https://redmine.postgresql.org/issues/7368>`_ - Ensure that unwanted APIs should not be getting called for BigAnimal.
|
||||||
| `Issue #7372 <https://redmine.postgresql.org/issues/7372>`_ - Tell Docker to always pull the latest base images when building containers.
|
| `Issue #7372 <https://redmine.postgresql.org/issues/7372>`_ - Tell Docker to always pull the latest base images when building containers.
|
||||||
| `Issue #7373 <https://redmine.postgresql.org/issues/7373>`_ - Fixed an issue with geometry window zoom mouse scroll not working.
|
| `Issue #7373 <https://redmine.postgresql.org/issues/7373>`_ - Fixed an issue with geometry window zoom mouse scroll not working.
|
||||||
|
| `Issue #7374 <https://redmine.postgresql.org/issues/7374>`_ - Fixed an issue when switching between connections in the Query Tool dropdown, the background and foreground colors should be changed.
|
||||||
| `Issue #7376 <https://redmine.postgresql.org/issues/7376>`_ - Fixed an issue where a popup for unsaved changes appears when clicking on the open file button for a blank query editor.
|
| `Issue #7376 <https://redmine.postgresql.org/issues/7376>`_ - Fixed an issue where a popup for unsaved changes appears when clicking on the open file button for a blank query editor.
|
||||||
| `Issue #7380 <https://redmine.postgresql.org/issues/7380>`_ - Added support for multi-cell selection in the query tool grid.
|
| `Issue #7380 <https://redmine.postgresql.org/issues/7380>`_ - Added support for multi-cell selection in the query tool grid.
|
||||||
| `Issue #7383 <https://redmine.postgresql.org/issues/7383>`_ - Fixed an issue where Preferences are not saved when the dialog is maximized.
|
| `Issue #7383 <https://redmine.postgresql.org/issues/7383>`_ - Fixed an issue where Preferences are not saved when the dialog is maximized.
|
||||||
|
@ -2061,6 +2061,8 @@ def get_new_connection_data(sgid=None, sid=None):
|
|||||||
"value": server.serialize['id'],
|
"value": server.serialize['id'],
|
||||||
'image': server_icon_and_background(connected, manager,
|
'image': server_icon_and_background(connected, manager,
|
||||||
server),
|
server),
|
||||||
|
'fgcolor': server.serialize['fgcolor'],
|
||||||
|
'bgcolor': server.serialize['bgcolor'],
|
||||||
'connected': connected})
|
'connected': connected})
|
||||||
|
|
||||||
msg = "Success"
|
msg = "Success"
|
||||||
|
@ -514,6 +514,8 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
|
|||||||
sid: connectionData.sid,
|
sid: connectionData.sid,
|
||||||
did: connectionData.did,
|
did: connectionData.did,
|
||||||
title: connectionData.title,
|
title: connectionData.title,
|
||||||
|
fgcolor: connectionData.fgcolor,
|
||||||
|
bgcolor: connectionData.bgcolor,
|
||||||
},
|
},
|
||||||
connected: respData.data.trans_id ? true : false,
|
connected: respData.data.trans_id ? true : false,
|
||||||
obtaining_conn: false,
|
obtaining_conn: false,
|
||||||
@ -561,6 +563,8 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
|
|||||||
conn_title: getTitle(pgAdmin, null, null, true, data.server_name, data.database_name, data.role || data.user, true),
|
conn_title: getTitle(pgAdmin, null, null, true, data.server_name, data.database_name, data.role || data.user, true),
|
||||||
server_name: data.server_name,
|
server_name: data.server_name,
|
||||||
database_name: data.database_name,
|
database_name: data.database_name,
|
||||||
|
bgcolor: data.bgcolor,
|
||||||
|
fgcolor: data.fgcolor,
|
||||||
is_selected: true,
|
is_selected: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,12 +124,15 @@ class NewConnectionSchema extends BaseUISchema {
|
|||||||
depChange: (state)=>{
|
depChange: (state)=>{
|
||||||
/* Once the option is selected get the name */
|
/* Once the option is selected get the name */
|
||||||
/* Force sid to null, and set only if connected */
|
/* Force sid to null, and set only if connected */
|
||||||
|
let selectedServer = _.find(this.flatServers, (s)=>s.value==state.sid);
|
||||||
return {
|
return {
|
||||||
server_name: _.find(this.flatServers, (s)=>s.value==state.sid)?.label,
|
server_name: selectedServer?.label,
|
||||||
did: null,
|
did: null,
|
||||||
user: null,
|
user: null,
|
||||||
role: null,
|
role: null,
|
||||||
sid: null,
|
sid: null,
|
||||||
|
fgcolor: selectedServer?.fgcolor,
|
||||||
|
bgcolor: selectedServer?.bgcolor,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
deferredDepChange: (state, source, topState, actionObj)=>{
|
deferredDepChange: (state, source, topState, actionObj)=>{
|
||||||
@ -181,6 +184,10 @@ class NewConnectionSchema extends BaseUISchema {
|
|||||||
id: 'server_name', label: '', type: 'text', visible: false,
|
id: 'server_name', label: '', type: 'text', visible: false,
|
||||||
},{
|
},{
|
||||||
id: 'database_name', label: '', type: 'text', visible: false,
|
id: 'database_name', label: '', type: 'text', visible: false,
|
||||||
|
},{
|
||||||
|
id: 'bgcolor', label: '', type: 'text', visible: false,
|
||||||
|
},{
|
||||||
|
id: 'fgcolor', label: '', type: 'text', visible: false,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user