1. Fixed an issue where copy and pasting a row in the results grid doesn't set the default for boolean. Fixes #7579

2. Fixed an issue where the History tab is getting blank and showing an error after some queries are executed. Fixes #7468
3. Fixed query tool view data crash.
This commit is contained in:
Aditya Toshniwal 2022-08-22 14:33:38 +05:30 committed by Akshay Joshi
parent 56e2c9db97
commit f2cc897f2f
4 changed files with 15 additions and 7 deletions

View File

@ -29,6 +29,7 @@ Bug fixes
*********
| `Issue #7452 <https://redmine.postgresql.org/issues/7452>`_ - Ensure that an error is thrown if clipboard access is not provided and change the copy rows shortcut.
| `Issue #7468 <https://redmine.postgresql.org/issues/7468>`_ - Fixed an issue where the History tab is getting blank and showing an error after some queries are executed.
| `Issue #7497 <https://redmine.postgresql.org/issues/7497>`_ - Fixed an issue with the error message being displayed at the right place for Azure deployments.
| `Issue #7521 <https://redmine.postgresql.org/issues/7521>`_ - Fixed an issue where the Query Editor loses focus when saving a query (Alt+s).
| `Issue #7527 <https://redmine.postgresql.org/issues/7527>`_ - Fixed API test cases for Postgres 14.4.
@ -36,6 +37,7 @@ Bug fixes
| `Issue #7563 <https://redmine.postgresql.org/issues/7563>`_ - Fixed an issue where autocomplete is not working after clearing the query editor.
| `Issue #7573 <https://redmine.postgresql.org/issues/7573>`_ - Ensure that autocomplete does not appear when navigating code using arrow keys.
| `Issue #7575 <https://redmine.postgresql.org/issues/7575>`_ - Fixed an issue where Alt-Shift-Q didn't work after creating a new query.
| `Issue #7579 <https://redmine.postgresql.org/issues/7579>`_ - Fixed an issue where copy and pasting a row in the results grid doesn't set the default for boolean.
| `Issue #7586 <https://redmine.postgresql.org/issues/7586>`_ - Fixed an issue with rendering geometry when selecting a complete column.
| `Issue #7587 <https://redmine.postgresql.org/issues/7587>`_ - Ensure that the children of information_schema and pg_catalog node should be displayed.
| `Issue #7591 <https://redmine.postgresql.org/issues/7591>`_ - Fixed column "none" does not exist issue, while comparing schema objects.

View File

@ -322,7 +322,8 @@ def panel(trans_id):
params['layout'] = get_setting('SQLEditor/Layout')
params['macros'] = get_user_macros()
params['is_desktop_mode'] = current_app.PGADMIN_RUNTIME
params['database_name'] = underscore_escape(params['database_name'])
if 'database_name' in params:
params['database_name'] = underscore_escape(params['database_name'])
return render_template(
"sqleditor/index.html",

View File

@ -351,7 +351,7 @@ function QueryHistoryDetails({entry}) {
</Box>
<Box marginTop="0.5rem">
<Box>{gettext('Messages')}</Box>
<Box className={classes.fontSourceCode} fontSize="13px" whiteSpace="pre-wrap">{entry.message}</Box>
<Box className={classes.fontSourceCode} fontSize="13px" whiteSpace="pre-wrap">{_.isObject(entry.message) ? JSON.stringify(entry.message) : entry.message}</Box>
</Box>
</Box>
</>

View File

@ -303,6 +303,7 @@ export class ResultSetUtils {
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.PUSH_NOTICE, httpMessage.data.data.notifies);
}
if (ResultSetUtils.isQueryFinished(httpMessage)) {
this.setEndTime(new Date());
msg = this.queryFinished(httpMessage, onResultsAvailable, onExplain);
} else if (ResultSetUtils.isQueryStillRunning(httpMessage)) {
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_CONNECTION_STATUS, httpMessage.data.data.transaction_status);
@ -311,13 +312,17 @@ export class ResultSetUtils {
}
return Promise.resolve(this.pollForResult(onResultsAvailable, onExplain, onPollError));
} else if (ResultSetUtils.isConnectionToServerLostWhilePolling(httpMessage)) {
this.setEndTime(new Date());
msg = httpMessage.data.data.result;
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_MESSAGE, msg, true);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.TASK_END, gettext('Connection Error'), this.endTime);
} else if (ResultSetUtils.isQueryCancelled(httpMessage)) {
msg = httpMessage.data.data.result || 'Execution Cancelled!';
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_MESSAGE, httpMessage.data.data.result || 'Execution Cancelled!', true);
this.setEndTime(new Date());
msg = httpMessage.data.data.result || gettext('Execution Cancelled!');
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_MESSAGE, httpMessage.data.data.result || gettext('Execution Cancelled!'), true);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.TASK_END, gettext('Execution Cancelled'), this.endTime);
}
if(this.qtPref?.query_success_notification) {
Notifier.success(msg);
@ -567,6 +572,8 @@ export class ResultSetUtils {
columnVal = true;
} else if(columnVal == 'false') {
columnVal = false;
} else if(col.has_default_val) {
columnVal = undefined;
} else {
columnVal = null;
}
@ -619,11 +626,9 @@ export class ResultSetUtils {
}
queryFinished(httpMessage, onResultsAvailable, onExplain) {
let endTime = new Date();
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END, true);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_CONNECTION_STATUS, httpMessage.data.data.transaction_status);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.TASK_END, gettext('Query complete'), endTime);
this.setEndTime(endTime);
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.TASK_END, gettext('Query complete'), this.endTime);
let retMsg, tabMsg;
retMsg = tabMsg = gettext('Query returned successfully in %s.', this.queryRunTime());