public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: PATCH: To fix the issue in Debugger module (pgAdmin4)
Date: Mon, 26 Sep 2016 17:58:16 +0530
Message-ID: <CAKKotZQGdhiFrtNK0xz8OVLKOA2QCk_yfOZDFT+HEMfELzbk4A@mail.gmail.com> (raw)
In-Reply-To: <CAKKotZRMetEEPzFTuqiw_8Vit2_STHSN22=K+5frJBu7=Jp6PQ@mail.gmail.com>
References: <CAKKotZQz6mGEiky_Szo91tzm_RFvwJTYGriTmuxVYrhcWi5nJg@mail.gmail.com>
<CA+OCxoxkphr1YF6F53j3sTreTMvoBOKqV+wjF6CnxoQ-SA+rzA@mail.gmail.com>
<CAKKotZRMetEEPzFTuqiw_8Vit2_STHSN22=K+5frJBu7=Jp6PQ@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi Dave,
PFA updated patch to fix `<br>` tag display.
Please clear cache & try again with this updated patch.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Mon, Sep 26, 2016 at 5:44 PM, Murtuza Zabuawala <
[email protected]> wrote:
>
>
> On Mon, Sep 26, 2016 at 5:08 PM, Dave Page <[email protected]> wrote:
>
>> Hi
>>
>> On Mon, Sep 26, 2016 at 11:09 AM, Murtuza Zabuawala
>> <[email protected]> wrote:
>> > 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.
>>
>> This is an improvement I think, but not complete:
>>
>> - The info messages are now shown, but:
>> - Not until execution ends, which limits their usefulness for
>> additional debugging. Not sure if that's easily changeable though.
>
> - The line breaks in messages are displaying like this: "INFO:
>> Employee 1 not found <br>SELECT 1"
>>
> It's showing properly on my side, Please clear browser cache & try again.
>
>> - The first execution of the function worked OK, but following the
>> second execution, I again saw: "Debugger: Step into execution error"
>> as I stepped out of the RETURN statement on line 18.
>>
> This is transient issue, so need more debugging.
>
>
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: 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_v1.patch (3.4K, 3-RM_1227_v1.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..68b5589 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').html(res.data.status_message);
// Execution completed so disable the buttons other than "Continue/Start" button because user can still
// start the same execution again.
@@ -433,7 +434,7 @@ define(
);
// Update the message tab of the debugger
- pgTools.DirectDebug.messages_panel.$container.find('.messages').text(res.data.status_message);
+ pgTools.DirectDebug.messages_panel.$container.find('.messages').html(res.data.status_message);
// Execution completed so disable the buttons other than "Continue/Start" button because user can still
// start the same execution again.
@@ -467,7 +468,7 @@ define(
function() { }
);
- pgTools.DirectDebug.messages_panel.$container.find('.messages').text(res.data.status_message);
+ pgTools.DirectDebug.messages_panel.$container.find('.messages').html(res.data.status_message);
pgTools.DirectDebug.messages_panel.focus();
// Execution completed so disable the buttons other than "Continue/Start" button because user can still
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], [email protected]
Subject: Re: PATCH: To fix the issue in Debugger module (pgAdmin4)
In-Reply-To: <CAKKotZQGdhiFrtNK0xz8OVLKOA2QCk_yfOZDFT+HEMfELzbk4A@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