mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Disable the PSQL tool for Windows, the 'fcntl' module is not working on Windows.
This commit is contained in:
committed by
Akshay Joshi
parent
9ac08c263b
commit
e0eac875b6
@@ -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',
|
||||
}]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user