mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Display messages and notices received in the query tool. Fixes #1953
This commit is contained in:
parent
6567669798
commit
6e68e7501a
@ -504,11 +504,20 @@ def poll(trans_id):
|
||||
|
||||
rows_affected = conn.rows_affected()
|
||||
|
||||
# There may be additional messages even if result is present
|
||||
# eg: Function can provide result as well as RAISE messages
|
||||
additional_messages = None
|
||||
if status == 'Success' and result is not None:
|
||||
messages = conn.messages()
|
||||
if messages:
|
||||
additional_messages = ''.join(messages)
|
||||
|
||||
return make_json_response(
|
||||
data={
|
||||
'status': status, 'result': result,
|
||||
'colinfo': col_info, 'primary_keys': primary_keys,
|
||||
'rows_affected': rows_affected
|
||||
'rows_affected': rows_affected,
|
||||
'additional_messages': additional_messages
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -1787,12 +1787,20 @@ define(
|
||||
alertify.success(msg1 + '<br />' + msg2, self.info_notifier_timeout);
|
||||
}
|
||||
|
||||
$('.sql-editor-message').text(msg1 + '\n' + msg2);
|
||||
var _msg = msg1 + '\n' + msg2;
|
||||
|
||||
/* Add the data to the collection and render the grid.
|
||||
* In case of Explain draw the graph on explain panel
|
||||
* and add json formatted data to collection and render.
|
||||
*/
|
||||
// If there is additional messages from server then add it to message
|
||||
if(!_.isNull(data.additional_messages) &&
|
||||
!_.isUndefined(data.additional_messages)) {
|
||||
_msg = data.additional_messages + '\n' + _msg;
|
||||
}
|
||||
|
||||
$('.sql-editor-message').text(_msg);
|
||||
|
||||
/* Add the data to the collection and render the grid.
|
||||
* In case of Explain draw the graph on explain panel
|
||||
* and add json formatted data to collection and render.
|
||||
*/
|
||||
var explain_data_array = [];
|
||||
if(
|
||||
data.result && data.result.length >= 1 &&
|
||||
|
Loading…
Reference in New Issue
Block a user