Disable the PSQL tool for Windows, the 'fcntl' module is not working on Windows.

This commit is contained in:
Nikhil Mohite
2021-06-01 20:04:43 +05:30
committed by Akshay Joshi
parent 9ac08c263b
commit e0eac875b6
18 changed files with 175 additions and 101 deletions

View File

@@ -66,12 +66,14 @@ define([
}]);
// show psql tool same as query tool.
pgAdmin.Browser.add_menus([{
name: 'show_psql_tool', node: this.type, module: this,
applies: ['context'], callback: 'show_psql_tool',
priority: 998, label: gettext('PSQL Tool (Beta)'),
icon: 'fas fa-terminal',
}]);
if(pgAdmin['enable_psql'] && pgAdmin['platform'] != 'win32') {
pgAdmin.Browser.add_menus([{
name: 'show_psql_tool', node: this.type, module: this,
applies: ['context'], callback: 'show_psql_tool',
priority: 998, label: gettext('PSQL Tool (Beta)'),
icon: 'fas fa-terminal',
}]);
}
}
}
},

View File

@@ -210,7 +210,7 @@ define('pgadmin.browser.node', [
icon: 'fa fa-search', enable: enable,
}]);
if(pgAdmin['enable_psql']) {
if(pgAdmin['enable_psql'] && pgAdmin['platform'] != 'win32') {
// show psql tool same as query tool.
pgAdmin.Browser.add_menus([{
name: 'show_psql_tool', node: this.type, module: this,

View File

@@ -59,7 +59,7 @@ let _defaultToolBarButtons = [
}
];
if(pgAdmin['enable_psql']) {
if(pgAdmin['enable_psql'] && pgAdmin['platform'] != 'win32') {
_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')){
else if ('name' in data && data.name === gettext('PSQL Tool') && pgAdmin['platform'] != 'win32'){
var input = {},
t = pgAdmin.Browser.tree,
i = input.item || t.selected(),