public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rahul Shirsat <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][Patch] #4059 Query Tool button in Query Tool to open a new Query Window
Date: Wed, 9 Sep 2020 21:45:15 +0530
Message-ID: <CAKtn9dNb94zcCehFqgWCEqFv9W+b4xEHD6AW0LANDW1F1ZSQSw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdVD0C9q85eaaHdYT_NK74rk9dT3mig=2+Vu1X1krTqzg@mail.gmail.com>
References: <CAKtn9dPt5BB_vGqxYfbrPx7R=RWgXQsCPr0aCEtVDnN3W5C3-A@mail.gmail.com>
<CAKtn9dM5woCVYAc5dKAZ=eSuoDCw1HnJFNcX_=mduQ25Q16Bjg@mail.gmail.com>
<CANxoLDfA4NnprMEhYtPj9JTDG036L5VOed3Lpk-C20xn0bXSsg@mail.gmail.com>
<CAKtn9dOXEObX3ai-1h83ntiqcr+eonFE4juroikNU4n=KUQXtg@mail.gmail.com>
<CANxoLDdVD0C9q85eaaHdYT_NK74rk9dT3mig=2+Vu1X1krTqzg@mail.gmail.com>
Hi Akshay,
Issue is fixed for alerts getting popped up on the main window instead of
the current window.
On Wed, Sep 9, 2020 at 8:13 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, patch applied.
>
> On Wed, Sep 9, 2020 at 6:23 PM Rahul Shirsat <
> [email protected]> wrote:
>
>> Hi Akshay,
>>
>> Please find the attached patch which adds / corrects following features /
>> issues :
>>
>> 1. Added tooltip & keyboard shortcut for query tool button
>> 2. Corrected the *Uncaught TypeError: Cannot read property āiā of
>> undefined*
>> This issue can be reproduced by :
>> *Keeping the click on any node other than database, refresh the
>> page, open the same server (it should navigate to the previously selected
>> node), open query tool, now open query tool via sqleditor query tool
>> button, issue should be reproduced* - *Resolved*
>> 3. Aditya's changes for *popups are blocked* are now extended for the
>> new tab query tool too.
>>
>>
>> On Fri, Aug 28, 2020 at 6:24 PM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Thanks, patch applied.
>>>
>>> On Thu, Aug 27, 2020 at 8:16 PM Rahul Shirsat <
>>> [email protected]> wrote:
>>>
>>>>
>>>> Please find the update patch attached here.
>>>>
>>>> On Thu, Aug 27, 2020 at 8:10 PM Rahul Shirsat <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Hackers,
>>>>>
>>>>> Please find the attached patch below which adds the functionality of
>>>>> the query tool button in the query tool sqleditor.
>>>>>
>>>>> *Acceptance criteria:*
>>>>> - For sqleditor on same window & on new tab:
>>>>>
>>>>> - When a query tool connection is initiated, as expected it will
>>>>> open the connection based on the selected database in the treeview. Now,
>>>>> when the user clicks the query tool connection button on the query tool
>>>>> window, irrespective of the selected database in treeview, it should open a
>>>>> connection based on the query tool connected database.
>>>>> - Similarly, for a new tab, clicking on the query tool connection
>>>>> button, it should open a connection based on the query tool connected
>>>>> database, instead of selected treeview node.
>>>>>
>>>>> [image: query tool button.png]
>>>>>
>>>>> Additionally, an error is handled in the form of message dialog
>>>>> prompting the user to initiate the connection, when sqleditor is opened in
>>>>> the new tab with the main application window kept closed. This can be
>>>>> reviewed by refreshing the window as well as clicking on the query tool
>>>>> connection button.
>>>>>
>>>>> A prompt dialog message box is seen as:
>>>>>
>>>>> [image: Screen Shot 2020-08-27 at 8.04.33 PM.png]
>>>>>
>>>>> --
>>>>> *Rahul Shirsat*
>>>>> Software Engineer | EnterpriseDB Corporation.
>>>>>
>>>>
>>>>
>>>> --
>>>> *Rahul Shirsat*
>>>> Software Engineer | EnterpriseDB Corporation.
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Sr. Software Architect*
>>> *EDB Postgres <http://edbpostgres.com>*
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>>
>> --
>> *Rahul Shirsat*
>> Software Engineer | EnterpriseDB Corporation.
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Sr. Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
--
*Rahul Shirsat*
Software Engineer | EnterpriseDB Corporation.
Attachments:
[image/png] query tool button.png (78.2K, 3-query%20tool%20button.png)
download | view image
[image/png] Screen Shot 2020-08-27 at 8.04.33 PM.png (47.9K, 4-Screen%20Shot%202020-08-27%20at%208.04.33%20PM.png)
download | view image
[application/x-patch] RM4059_v4.patch (1.6K, 5-RM4059_v4.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index b0d5a118f..95ce1203b 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -8,6 +8,7 @@
//////////////////////////////////////////////////////////////
import {getTreeNodeHierarchyFromIdentifier} from 'sources/tree/pgadmin_tree_node';
+import {showQueryTool} from 'tools/datagrid/static/js/show_query_tool';
define('tools.querytool', [
'sources/gettext', 'sources/url_for', 'jquery', 'jquery.ui',
@@ -4317,14 +4318,16 @@ define('tools.querytool', [
_show_query_tool: function() {
var self = this;
- setTimeout(() => {
- var tree_node = pgWindow.default.pgAdmin.selected_tree_map.get(self.url_params.did || self.url_params.sid);
- if(self.preferences.new_browser_tab) {
- is_main_window_alive();
- }
+ var tree_node = pgWindow.default.pgAdmin.selected_tree_map.get(self.url_params.did || self.url_params.sid);
+ if(self.preferences.new_browser_tab) {
+ is_main_window_alive();
+ }
+ this._open_query_tool(tree_node);
+ },
- pgWindow.default.pgAdmin.DataGrid.show_query_tool('', tree_node.i);
- }, 200);
+ _open_query_tool: function(tree_node) {
+ const transId = pgadminUtils.getRandomInt(1, 9999999);
+ showQueryTool(pgWindow.default.pgAdmin.DataGrid, pgWindow.default.pgAdmin.Browser, alertify, '', tree_node.i, transId);
},
/*
view thread (7+ 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: [pgAdmin][Patch] #4059 Query Tool button in Query Tool to open a new Query Window
In-Reply-To: <CAKtn9dNb94zcCehFqgWCEqFv9W+b4xEHD6AW0LANDW1F1ZSQSw@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