Fixed an issue where canceling a query without privilege does not display any message on query tool. #7480

This commit is contained in:
Pravesh Sharma 2024-05-31 11:19:44 +05:30 committed by GitHub
parent 2ab2d6b57c
commit b5b0538fe3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -1687,6 +1687,8 @@ def cancel_transaction(trans_id):
status, result = _check_and_cancel_transaction(trans_obj,
delete_connection, conn,
manager)
if not status:
return internal_server_error(errormsg=result)
else:
status = False
result = gettext(

View File

@ -888,11 +888,11 @@ export function ResultSet() {
eventBus.registerListener(QUERY_TOOL_EVENTS.TRIGGER_STOP_EXECUTION, async ()=>{
try {
await rsu.current.stopExecution();
eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_CONNECTION_STATUS, CONNECTION_STATUS.TRANSACTION_STATUS_IDLE);
eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END);
} catch(e) {
eventBus.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR, e);
pgAdmin.Browser.notifier.error(parseApiError(e));
}
eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_CONNECTION_STATUS, CONNECTION_STATUS.TRANSACTION_STATUS_IDLE);
eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END);
});
eventBus.registerListener(QUERY_TOOL_EVENTS.EXECUTION_END, ()=>{