Skip to content

Commit

Permalink
1) Disable PSQL Workspace in Server mode.
Browse files Browse the repository at this point in the history
2) Fixed an issue where empty binary path throwing an error instead of proper error message.
  • Loading branch information
akshay-joshi committed Jan 30, 2025
1 parent e7888c5 commit d5101b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/pgadmin/browser/server_groups/servers/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def get_utility_path(self, sverison):
bin_path['binaryPath'].strip() != '':
return bin_path['binaryPath']

if bin_path['isDefault']:
if bin_path['isDefault'] and bin_path['binaryPath'] != '':
default_path = bin_path['binaryPath']

return default_path
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export default function AdHocConnection({mode}) {
});
if (mode == WORKSPACES.QUERY_TOOL) {
openQueryTool(respData, formData);
} else if (mode == WORKSPACES.PSQL_TOOL) {
} else if (mode == WORKSPACES.PSQL_TOOL && pgAdmin['enable_psql']) {
openPSQLTool(respData, formData);
}
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/misc/workspaces/static/js/WorkspaceToolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function WorkspaceToolbar() {
<Root>
<WorkspaceButton icon={<AccountTreeRoundedIcon />} value={WORKSPACES.DEFAULT} title={gettext('Default Workspace')} tooltipPlacement="right" />
<WorkspaceButton icon={<QueryToolIcon />} value={WORKSPACES.QUERY_TOOL} title={gettext('Query Tool Workspace')} tooltipPlacement="right" />
<WorkspaceButton icon={<TerminalRoundedIcon style={{height: '1.4rem'}}/>} value={WORKSPACES.PSQL_TOOL} title={gettext('PSQL Tool Workspace')} tooltipPlacement="right" />
{pgAdmin['enable_psql'] && <WorkspaceButton icon={<TerminalRoundedIcon style={{height: '1.4rem'}}/>} value={WORKSPACES.PSQL_TOOL} title={gettext('PSQL Tool Workspace')} tooltipPlacement="right" />}
<WorkspaceButton icon={<SchemaDiffIcon />} value={WORKSPACES.SCHEMA_DIFF_TOOL} title={gettext('Schema Diff Workspace')} tooltipPlacement="right" />
<Box marginTop="auto">
<WorkspaceButton icon={<SettingsIcon />} menuItem={menus['settings']} title={gettext('Preferences')} tooltipPlacement="right" />
Expand Down

0 comments on commit d5101b7

Please sign in to comment.