mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-06 22:23:11 -06:00
Fixed an issue where canceling a query without privilege does not display any message on query tool. #7480
This commit is contained in:
parent
2ab2d6b57c
commit
b5b0538fe3
@ -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(
|
||||
|
@ -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, ()=>{
|
||||
|
Loading…
Reference in New Issue
Block a user