[pgAdmin][RM-6404]: Separate settings for query tool tab title and connection info

2021-06-07 Thread Nikhil Mohite
Hi Hackers,

Please find the attached patch for RM-6404
: Separate settings for query
tool tab title and connection info.
1. Query tool connection string will not get change as per "Query tool tab
title".
2. It will use the default title format. (%DATABASE%/%USERNAME%@%SERVER%).


-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* 
*Mob.No: +91-7798364578.*


RM_6404.patch
Description: Binary data


Re: [Patch][pgAdmin] RM4203 Rename Database by another user

2021-06-07 Thread Rahul Shirsat
Hi Akshay,

Please find the updated patch below for your reference. I have added an
extra check for verifying the database rename.
Sorry for the inconvenience caused.

On Tue, Jun 1, 2021 at 8:50 PM Akshay Joshi 
wrote:

> Thanks, the patch applied.
>
> On Sun, May 30, 2021 at 12:03 AM Rahul Shirsat <
> rahul.shir...@enterprisedb.com> wrote:
>
>> Hi Akshay,
>>
>> On Thu, May 27, 2021 at 12:19 PM Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Rahul
>>>
>>> Following are the review comments:
>>>
>>>- Why you have changed the order of the toolbar button on the
>>>browser tree? It should not.
>>>
>>>Changes were related to the wcDocker issue showing
>> reverse order buttons, so had to change in the pgAdmin app to reflect it
>> correctly.
>>
>>>
>>>- *sqleditor.js (check_db_name_change function)*
>>>- var declaration should be comma-separated instead of writing var,
>>>   again and again.
>>>
>>>   Done.
>>
>>>
>>>- Add proper comments.
>>>
>>>   This too is taken care of.
>>
>>>
>>>- Remove dots from the string "Database moved/renamed.."
>>>
>>>   Done.
>>
>>>
>>>- "Please note that the database you are working on has been moved
>>>   or renamed to ${data.actual_db_name}. Refresh databases in browser 
>>> panel or
>>>   click OK to continue.." should be changed to "Current database has 
>>> been
>>>   moved or renamed to ${data.actual_db_name}. Click on the OK button to
>>>   refresh the database name."
>>>
>>>   Done.
>>Also have done some code refactoring.
>>
>>>
>>>
>>> On Wed, May 26, 2021 at 2:07 PM Rahul Shirsat <
>>> rahul.shir...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Please find the attached patch which resolves the issue of renaming the
 database by another user.

 A minor issue of navigation button alignment is also fixed in this
 patch.

 --
 *Rahul Shirsat*
 Senior Software Engineer | EnterpriseDB Corporation.

>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Principal Software Architect*
>>> *EDB Postgres *
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>>
>> --
>> *Rahul Shirsat*
>> Senior Software Engineer | EnterpriseDB Corporation.
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


-- 
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 884cc8be0..780c0243f 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -505,6 +505,8 @@ def poll(trans_id):
 
 transaction_status = conn.transaction_status()
 data_obj['db_name'] = conn.db
+data_obj['db_id'] = trans_obj.did \
+if trans_obj is not None and hasattr(trans_obj, 'did') else 0
 
 return make_json_response(
 data={
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index 33547223e..3e91f424a 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -5125,9 +5125,10 @@ define('tools.querytool', [
   tree_data = pgWindow.default.pgAdmin.Browser.treeMenu.translateTreeNodeIdFromACITree(selected_item),
   server_data = pgWindow.default.pgAdmin.Browser.treeMenu.findNode(tree_data.slice(0,2)),
   database_data = pgWindow.default.pgAdmin.Browser.treeMenu.findNode(tree_data.slice(0,4)),
-  db_name = database_data.data.label;
+  db_name = database_data.data.label,
+  db_did = database_data.data._id;
 
-if(!_.isEqual(db_name, data.data_obj.db_name)) {
+if(data.data_obj.db_id == db_did && !_.isEqual(db_name, data.data_obj.db_name)) {
 
   var message = `Current database has been moved or renamed to ${data.data_obj.db_name}. Click on the OK button to refresh the database name.`,
 title = self.url_params.title;


[pgAdmin][RM-6482]: Server property "Foreground Color" does not work.

2021-06-07 Thread Nikhil Mohite
Hi Hackers,

Please find the attached patch for RM-6482
:
Server property "Foreground Color" does not work.


-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* 
*Mob.No: +91-7798364578.*


RM_6482.patch
Description: Binary data


pgAdmin 4 commit: Updated Flask-Security-Too to the latest v4. Fixes #6

2021-06-07 Thread Akshay Joshi
Updated Flask-Security-Too to the latest v4. Fixes #6225

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=065a3aa2f5a22024746419596de7de8dff34440c
Author: Aditya Toshniwal 

Modified Files
--
docs/en_US/release_notes_5_4.rst |  1 +
requirements.txt |  2 +-
web/migrations/versions/c465fee44968_.py | 57 
web/pgadmin/__init__.py  |  4 +--
web/pgadmin/browser/__init__.py  |  6 ++--
web/pgadmin/model/__init__.py|  6 +++-
6 files changed, 69 insertions(+), 7 deletions(-)



pgAdmin 4 commit: 1) Added logic to set the appropriate default binary

2021-06-07 Thread Akshay Joshi
1) Added logic to set the appropriate default binary path if 
DEFAULT_BINARY_PATH is
   set in the config and the user not updated the preferences.
2) Remove 'gpdb' from DEFAULT_BINARY_PATH.
3) Fixed API test cases.

refs #5370

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=07eb5418067a11541aad09259797fcdfa5c7206e

Modified Files
--
web/config.py  |  3 +-
web/pgadmin/browser/server_groups/servers/types.py | 51 +-
web/pgadmin/misc/__init__.py   | 15 ---
web/pgadmin/static/js/backform.pgadmin.js  | 23 +-
web/pgadmin/utils/__init__.py  |  5 +++
web/pgadmin/utils/constants.py | 39 +
web/regression/python_test_utils/test_utils.py | 11 +++--
web/regression/test_config.json.in |  3 +-
8 files changed, 112 insertions(+), 38 deletions(-)



Re: [pgAdmin][RM6225] Update Flask-Security-Too v4

2021-06-07 Thread Akshay Joshi
Thanks, the patch applied.

On Fri, Jun 4, 2021 at 6:54 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached patch updates Flask-Security-Too to the latest v4.
> Please review.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> 
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Fixed an issue where the Foreground Color property of

2021-06-07 Thread Akshay Joshi
Fixed an issue where the Foreground Color property of server dialog does not 
work. Fixes #6482

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=5b124834162474e6ee9371698d30f1905c41ff4a
Author: Nikhil Mohite 

Modified Files
--
docs/en_US/release_notes_5_4.rst  | 1 +
web/pgadmin/browser/static/js/node.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Added extra check for verifying the rename of the dat

2021-06-07 Thread Akshay Joshi
Added extra check for verifying the rename of the database.

refs #4203

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d5f537aae497e4ac3811a035ca357dbef07c0885
Author: Rahul Shirsat 

Modified Files
--
web/pgadmin/tools/sqleditor/__init__.py| 2 ++
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Ensure that the Query Tool connection string should n

2021-06-07 Thread Akshay Joshi
Ensure that the Query Tool connection string should not be changed as per the 
'Query Tool tab title'. Fixes #6404

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e1067ffe6737f32db3c41c99d9c95191781d534b
Author: Nikhil Mohite 

Modified Files
--
docs/en_US/release_notes_5_4.rst   |  1 +
web/pgadmin/browser/__init__.py|  5 +++--
.../browser/register_browser_preferences.py|  4 ++--
web/pgadmin/browser/templates/browser/js/utils.js  |  1 +
.../static/js/sqleditor/new_connection_dialog.js   | 26 +-
.../datagrid/static/js/datagrid_panel_title.js | 12 ++
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 16 ++---
web/pgadmin/utils/constants.py |  3 +++
8 files changed, 41 insertions(+), 27 deletions(-)



Re: [pgAdmin][RM-6404]: Separate settings for query tool tab title and connection info

2021-06-07 Thread Akshay Joshi
Thanks, the patch applied.

On Mon, Jun 7, 2021 at 5:08 PM Nikhil Mohite 
wrote:

> Hi Hackers,
>
> Please find the attached patch for RM-6404
> : Separate settings for query
> tool tab title and connection info.
> 1. Query tool connection string will not get change as per "Query tool tab
> title".
> 2. It will use the default title format. (%DATABASE%/%USERNAME%@%SERVER%).
>
>
> --
> *Thanks & Regards,*
> *Nikhil Mohite*
> *Software Engineer.*
> *EDB Postgres* 
> *Mob.No: +91-7798364578.*
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM-6482]: Server property "Foreground Color" does not work.

2021-06-07 Thread Akshay Joshi
Thanks, the patch applied.

On Mon, Jun 7, 2021 at 5:31 PM Nikhil Mohite 
wrote:

> Hi Hackers,
>
> Please find the attached patch for RM-6482
> :
> Server property "Foreground Color" does not work.
>
>
> --
> *Thanks & Regards,*
> *Nikhil Mohite*
> *Software Engineer.*
> *EDB Postgres* 
> *Mob.No: +91-7798364578.*
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [Patch][pgAdmin] RM4203 Rename Database by another user

2021-06-07 Thread Akshay Joshi
Thanks, the patch applied.

On Mon, Jun 7, 2021 at 5:08 PM Rahul Shirsat 
wrote:

> Hi Akshay,
>
> Please find the updated patch below for your reference. I have added an
> extra check for verifying the database rename.
> Sorry for the inconvenience caused.
>
> On Tue, Jun 1, 2021 at 8:50 PM Akshay Joshi 
> wrote:
>
>> Thanks, the patch applied.
>>
>> On Sun, May 30, 2021 at 12:03 AM Rahul Shirsat <
>> rahul.shir...@enterprisedb.com> wrote:
>>
>>> Hi Akshay,
>>>
>>> On Thu, May 27, 2021 at 12:19 PM Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Rahul

 Following are the review comments:

- Why you have changed the order of the toolbar button on the
browser tree? It should not.

Changes were related to the wcDocker issue showing
>>> reverse order buttons, so had to change in the pgAdmin app to reflect it
>>> correctly.
>>>

- *sqleditor.js (check_db_name_change function)*
- var declaration should be comma-separated instead of writing var,
   again and again.

   Done.
>>>

- Add proper comments.

   This too is taken care of.
>>>

- Remove dots from the string "Database moved/renamed.."

   Done.
>>>

- "Please note that the database you are working on has been moved
   or renamed to ${data.actual_db_name}. Refresh databases in browser 
 panel or
   click OK to continue.." should be changed to "Current database has 
 been
   moved or renamed to ${data.actual_db_name}. Click on the OK button to
   refresh the database name."

   Done.
>>>Also have done some code refactoring.
>>>


 On Wed, May 26, 2021 at 2:07 PM Rahul Shirsat <
 rahul.shir...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the attached patch which resolves the issue of renaming
> the database by another user.
>
> A minor issue of navigation button alignment is also fixed in this
> patch.
>
> --
> *Rahul Shirsat*
> Senior Software Engineer | EnterpriseDB Corporation.
>


 --
 *Thanks & Regards*
 *Akshay Joshi*
 *pgAdmin Hacker | Principal Software Architect*
 *EDB Postgres *

 *Mobile: +91 976-788-8246*

>>>
>>>
>>> --
>>> *Rahul Shirsat*
>>> Senior Software Engineer | EnterpriseDB Corporation.
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> *Rahul Shirsat*
> Senior Software Engineer | EnterpriseDB Corporation.
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*