public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: PATCH: To fix the issue in Debugger module (pgAdmin4)
Date: Mon, 26 Sep 2016 15:39:47 +0530
Message-ID: <CAKKotZQz6mGEiky_Szo91tzm_RFvwJTYGriTmuxVYrhcWi5nJg@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi,
PFA patch to fix the issue where it was not disabling buttons after
execution gets finished.
RM#1227
*Issue:*
If user clicks on buttons after execution is complete then it was throwing
error, expected behaviour was all button should gets disabled except
execute button.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM_1227.patch (2.4K, 3-RM_1227.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py
index f7d0e7b..ab22023 100644
--- a/web/pgadmin/tools/debugger/__init__.py
+++ b/web/pgadmin/tools/debugger/__init__.py
@@ -1343,8 +1343,14 @@ def poll_end_execution_result(trans_id):
if conn.connected():
statusmsg = conn.status_message()
status, result, col_info = conn.poll()
- if status == ASYNC_OK and session['functionData'][str(trans_id)]['language'] == 'edbspl':
+ if status == ASYNC_OK and \
+ not session['functionData'][str(trans_id)]['is_func'] and \
+ session['functionData'][str(trans_id)]['language'] == 'edbspl':
status = 'Success'
+ additional_msgs = conn.messages()
+ if len(additional_msgs) > 0:
+ statusmsg = "<br>".join(additional_msgs) + "<br>" + statusmsg
+
return make_json_response(success=1, info=gettext("Execution Completed."),
data={'status': status, 'status_message': statusmsg})
if result:
@@ -1354,6 +1360,10 @@ def poll_end_execution_result(trans_id):
data={'status': status, 'status_message': result})
else:
status = 'Success'
+ additional_msgs = conn.messages()
+ if len(additional_msgs) > 0:
+ statusmsg = "<br>".join(additional_msgs) + "<br>" + statusmsg
+
columns = []
# Check column info is available or not
if col_info is not None and len(col_info) > 0:
diff --git a/web/pgadmin/tools/debugger/templates/debugger/js/direct.js b/web/pgadmin/tools/debugger/templates/debugger/js/direct.js
index 7ec5e95..b6bec9d 100644
--- a/web/pgadmin/tools/debugger/templates/debugger/js/direct.js
+++ b/web/pgadmin/tools/debugger/templates/debugger/js/direct.js
@@ -405,7 +405,8 @@ define(
);
// Update the message tab of the debugger
- pgTools.DirectDebug.dbmsMessages.$elem.text(res.data.status_message);
+ if(res.data.status_message)
+ pgTools.DirectDebug.messages_panel.$container.find('.messages').val(res.data.status_message);
// Execution completed so disable the buttons other than "Continue/Start" button because user can still
// start the same execution again.
view thread (21+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: PATCH: To fix the issue in Debugger module (pgAdmin4)
In-Reply-To: <CAKKotZQz6mGEiky_Szo91tzm_RFvwJTYGriTmuxVYrhcWi5nJg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox