Added PSQL tool support for the Windows platform.

Fixed following issues:
1. If the database name contains escape characters then PSQL unable to connect.
2. If the user terminates the connection by typing the 'exit' command, PSQL
   will show the connection termination msg.

Fixes #2341
This commit is contained in:
Nikhil Mohite authored and Akshay Joshi committed 2021-06-08 14:58:43 +05:30
1 parent 5a086a9173
commit 9f12747d9b
10 files changed
+220 -163

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ define([
}]);
// show psql tool same as query tool.
if(pgAdmin['enable_psql'] && pgAdmin['platform'] != 'win32') {
if(pgAdmin['enable_psql']) {
pgAdmin.Browser.add_menus([{
name: 'show_psql_tool', node: this.type, module: this,
applies: ['context'], callback: 'show_psql_tool',
+1 -1
View File
@@ -210,7 +210,7 @@ define('pgadmin.browser.node', [
icon: 'fa fa-search', enable: enable,
}]);
if(pgAdmin['enable_psql'] && pgAdmin['platform'] != 'win32') {
if(pgAdmin['enable_psql']) {
// show psql tool same as query tool.
pgAdmin.Browser.add_menus([{
name: 'show_psql_tool', node: this.type, module: this,
+2 -2
View File
@@ -59,7 +59,7 @@ let _defaultToolBarButtons = [
}
];
if(pgAdmin['enable_psql'] && pgAdmin['platform'] != 'win32') {
if(pgAdmin['enable_psql']) {
_defaultToolBarButtons.unshift({
label: gettext('PSQL Tool'),
ariaLabel: gettext('PSQL Tool'),
@@ -119,7 +119,7 @@ export function initializeToolbar(panel, wcDocker) {
pgAdmin.DataGrid.show_filtered_row({mnuid: 4}, pgAdmin.Browser.tree.selected());
else if ('name' in data && data.name === gettext('Search objects'))
pgAdmin.SearchObjects.show_search_objects('', pgAdmin.Browser.tree.selected());
else if ('name' in data && data.name === gettext('PSQL Tool') && pgAdmin['platform'] != 'win32'){
else if ('name' in data && data.name === gettext('PSQL Tool')){
var input = {},
t = pgAdmin.Browser.tree,
i = input.item || t.selected(),