Skip to content

Commit d5101b7

Browse files
committed
1) Disable PSQL Workspace in Server mode.
2) Fixed an issue where empty binary path throwing an error instead of proper error message.
1 parent e7888c5 commit d5101b7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

web/pgadmin/browser/server_groups/servers/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def get_utility_path(self, sverison):
203203
bin_path['binaryPath'].strip() != '':
204204
return bin_path['binaryPath']
205205

206-
if bin_path['isDefault']:
206+
if bin_path['isDefault'] and bin_path['binaryPath'] != '':
207207
default_path = bin_path['binaryPath']
208208

209209
return default_path

web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ export default function AdHocConnection({mode}) {
465465
});
466466
if (mode == WORKSPACES.QUERY_TOOL) {
467467
openQueryTool(respData, formData);
468-
} else if (mode == WORKSPACES.PSQL_TOOL) {
468+
} else if (mode == WORKSPACES.PSQL_TOOL && pgAdmin['enable_psql']) {
469469
openPSQLTool(respData, formData);
470470
}
471471
} catch (error) {

web/pgadmin/misc/workspaces/static/js/WorkspaceToolbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function WorkspaceToolbar() {
125125
<Root>
126126
<WorkspaceButton icon={<AccountTreeRoundedIcon />} value={WORKSPACES.DEFAULT} title={gettext('Default Workspace')} tooltipPlacement="right" />
127127
<WorkspaceButton icon={<QueryToolIcon />} value={WORKSPACES.QUERY_TOOL} title={gettext('Query Tool Workspace')} tooltipPlacement="right" />
128-
<WorkspaceButton icon={<TerminalRoundedIcon style={{height: '1.4rem'}}/>} value={WORKSPACES.PSQL_TOOL} title={gettext('PSQL Tool Workspace')} tooltipPlacement="right" />
128+
{pgAdmin['enable_psql'] && <WorkspaceButton icon={<TerminalRoundedIcon style={{height: '1.4rem'}}/>} value={WORKSPACES.PSQL_TOOL} title={gettext('PSQL Tool Workspace')} tooltipPlacement="right" />}
129129
<WorkspaceButton icon={<SchemaDiffIcon />} value={WORKSPACES.SCHEMA_DIFF_TOOL} title={gettext('Schema Diff Workspace')} tooltipPlacement="right" />
130130
<Box marginTop="auto">
131131
<WorkspaceButton icon={<SettingsIcon />} menuItem={menus['settings']} title={gettext('Preferences')} tooltipPlacement="right" />

0 commit comments

Comments
 (0)