pgAdmin 4 commit: Fixed an issue in the search object when searching in

2021-06-23 Thread Akshay Joshi
Fixed an issue in the search object when searching in 'all types' or 
'subscription' if the user doesn't have access to the subscription. Fixes #6448

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=80ccd62d384192a76b8d4b10b3853fcbc6ee2123
Author: Pradip Parkale 

Modified Files
--
docs/en_US/release_notes_5_5.rst|  1 +
.../search_objects/sql/pg/10_plus/search.sql|  2 ++
.../search_objects/sql/pg/11_plus/search.sql|  3 ++-
.../search_objects/sql/ppas/10_plus/search.sql  |  2 ++
.../search_objects/sql/ppas/12_plus/search.sql  |  2 ++
web/pgadmin/tools/search_objects/utils.py   | 21 -
6 files changed, 29 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Fixed replace keyboard shortcut issue in the query to

2021-06-23 Thread Akshay Joshi
Fixed replace keyboard shortcut issue in the query tool on the normal keyboard 
layout. Fixes #6388

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_5.rst | 1 +
web/pgadmin/tools/datagrid/templates/datagrid/index.html | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Fixed an issue where the New Connection Drop Down has

2021-06-23 Thread Akshay Joshi
Fixed an issue where the New Connection Drop Down has lost default maintenance 
database, auto-select, and tab-through functionality. Fixes #6505

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_5.rst   | 1 +
web/pgadmin/static/js/sqleditor/new_connection_dialog_model.js | 6 +-
web/pgadmin/tools/sqleditor/__init__.py| 8 ++--
3 files changed, 12 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Do not block the query editor window when running a q

2021-06-23 Thread Akshay Joshi
Do not block the query editor window when running a query. Fixes #3920

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_5.rst   |  1 +
.../tools/datagrid/templates/datagrid/index.html   | 15 ++---
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 37 --
.../tools/sqleditor/static/scss/_sqleditor.scss| 19 +++
web/regression/feature_utils/pgadmin_page.py   | 18 +++
5 files changed, 68 insertions(+), 22 deletions(-)



Re: [pgAdmin][RM-6505]: Changing connection using the Drop Down has lost default "maintenance" database auto-select functionality and tab-through functionality.

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

On Tue, Jun 22, 2021 at 5:28 PM Nikhil Mohite <
nikhil.moh...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the attached patch for RM-6505
> : Changing connection using
> the  Drop Down has lost default "maintenance" database
> auto-select functionality and tab-through functionality.
>
> This patch fixed the maintenance DB is not selected as the default value
> for the New connection dialog database field.
>
>
>
> --
> *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][RM6448]: [search object] error displayed for non superuser because of right on pg_catalog.pg_subscription

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

On Tue, Jun 22, 2021 at 4:17 PM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Hackers,
> Please ignore my previous email and find the attached patch. I have fixed
> some review comments given by Aditya.
>
> On Tue, Jun 22, 2021 at 2:21 PM Fred  wrote:
>
>> nice !
>> thanks
>>
>> fred
>>
>>
>> Le 22 juin 2021 09:08:05 GMT+02:00, Pradip Parkale <
>> pradip.park...@enterprisedb.com> a écrit :
>>>
>>> Hi Hackers,
>>>
>>> Please find the attached patch for # 6448. I have added a check to
>>> ignore the subscription when the search type is 'All type' if the user
>>> doesn't have access to subscription.
>>>
>>> --
>>> Thanks & Regards,
>>> Pradip Parkale
>>> Software Engineer | EnterpriseDB Corporation
>>>
>>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


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

*Mobile: +91 976-788-8246*


Re: Refactor: Registry Classes

2021-06-23 Thread Akshay Joshi
Hi Ashesh

Following are the review comments:

   - Fixed PEP8 issues.
   - In "dynamic_registry/__init__.py" decorator @classmethod used for "
   *_get*" and "*_load_modules*" methods which are actually outside of the
   class. Even constructor also outside of the class.
   - Remove unused imports from "driver/registry.py"
   - Fixed sonarqube issues in "dynamic_registry/tests/registry/__init__.py"


On Sat, Jun 19, 2021 at 11:27 AM Ashesh Vashi 
wrote:

> On Sat, Jun 19, 2021 at 1:39 AM Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Hi Akshay,
>>
>> We do have a couple of classes, which does automatic registration of the
>> base classes,
>> and which creates single-ton objects for these base classes, when needed.
>>
>> I would be working on a patch sooner, which will be using similar
>> functionality for loading
>> the multi-factor authentication.
>>
>> I realized - it will be a duplicate code at three places for the same
>> functionalities.
>> Hence - I worked on refactoring this registry class.
>>
>> Please find the patch for the same.
>>
> Found issues - some test files were using the old function
> 'Driver.load_drivers(...)'.
> They're fixed now.
>
> -- Thanks, Ashesh
>
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>

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

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Ensure that Data Output panel can be snapped back aft

2021-06-23 Thread Akshay Joshi
Ensure that Data Output panel can be snapped back after it is detached. Fixes 
#4189

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_5.rst | 1 +
web/package.json | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



pgAdmin 4 - add missing gettexts and text space improvements

2021-06-23 Thread Libor M.
Hi,
I added some missing gettext usage and improved spaces in texts.
Diff file is attached.

Best regards,

Libor M.

E-mail: libor...@gmail.com
GitHub: https://github.com/liborm85
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.js
 
b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.js
index 7227991db..d1986c1fe 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.js
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.js
@@ -405,13 +405,13 @@ define('pgadmin.node.subscription', [
   type: 'switch', mode: ['create','edit', 'properties'],
   group: gettext('With'),
   readonly: 'isConnect', deps :['connect'],
-  helpMessage: gettext('Specifies whether the subscription should be 
actively replicating, or whether it should be just setup but not started yet. 
'),
+  helpMessage: gettext('Specifies whether the subscription should be 
actively replicating, or whether it should be just setup but not started yet.'),
 },
 {
   id: 'refresh_pub', label: gettext('Refresh publication?'),
   type: 'switch', mode: ['edit'],
   group: gettext('With'),
-  helpMessage: gettext('Fetch missing table information from 
publisher. '),
+  helpMessage: gettext('Fetch missing table information from 
publisher.'),
   deps:['enabled'], disabled: function(m){
 if (m.get('enabled'))
   return false;
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js 
b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index ffd715f8e..b1d88e4b7 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -121,7 +121,7 @@ define('pgadmin.node.server', [
   applies: ['object'], callback: 'change_password',
   label: gettext('Change Password...'), priority: 10,
   icon: 'fa fa-lock', enable : 'is_connected',data: {
-data_disabled: gettext('Please connect server to enable change 
password. '),
+data_disabled: gettext('Please connect server to enable change 
password.'),
   },
 },{
   name: 'wal_replay_pause', node: 'server', module: this,
diff --git a/web/pgadmin/browser/static/js/browser.js 
b/web/pgadmin/browser/static/js/browser.js
index ba84ca41c..e866d5c48 100644
--- a/web/pgadmin/browser/static/js/browser.js
+++ b/web/pgadmin/browser/static/js/browser.js
@@ -920,7 +920,7 @@ define('pgadmin.browser', [
 $dropdown.empty();
 if(o.menu == 'help'){
   $dropdown.append('');
-  $dropdown.append('  SUGGESTED SITES');
+  $dropdown.append('  ' + gettext('SUGGESTED 
SITES') + '');
 }
 
 if (pgAdmin.Browser.MenuCreator(
diff --git a/web/pgadmin/static/js/backform.pgadmin.js 
b/web/pgadmin/static/js/backform.pgadmin.js
index 0d5f46bbb..612e1ab6d 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -1130,7 +1130,7 @@ define([
 
   this.gridColumns = [{
 name: 'isDefault',
-label: 'Set as default',
+label: gettext('Set as default'),
 sortable: false,
 cell: Backgrid.RadioCell,
 cellHeaderClasses: 'width_percent_10',
@@ -1149,14 +1149,14 @@ define([
 }
   }, {
 name: 'serverType',
-label: 'Database Server',
+label: gettext('Database Server'),
 editable: false,
 cell: 'string',
 cellHeaderClasses: 'width_percent_20',
 headerCell: Backgrid.Extension.CustomHeaderCell,
   }, {
 name: 'binaryPath',
-label: 'Binary Path',
+label: gettext('Binary Path'),
 sortable: false,
 cell: Backgrid.Extension.SelectFileCell,
 dialog_type: 'select_folder',
@@ -1193,7 +1193,7 @@ define([
   this.$el.empty();
   this.$el.append(gridBody.append(self.grid.render().$el));
   this.$el.append(['' +
-  gettext(' Enter the directory in which the psql, pg_dump, pg_dumpall, 
and pg_restore' +
+  gettext('Enter the directory in which the psql, pg_dump, pg_dumpall, and 
pg_restore' +
   ' utilities can be found for the corresponding database server version.' 
+
   ' The default path will be used for server versions that do not have a' +
   ' path specified.') + ''].join('\n'));
diff --git 
a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx 
b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx
index 05a55fca6..0fedead25 100644
--- a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx
+++ b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx
@@ -332,12 +332,12 @@ export default class BodyWidget extends React.Component

Re: Refactor: Registry Classes

2021-06-23 Thread Ashesh Vashi
On Wed, Jun 23, 2021 at 1:22 PM Akshay Joshi 
wrote:

> Hi Ashesh
>
> Following are the review comments:
>
>- Fixed PEP8 issues.
>
> Done.

>
>- In "dynamic_registry/__init__.py" decorator @classmethod used for "
>*_get*" and "*_load_modules*" methods which are actually outside of
>the class. Even constructor also outside of the class.
>
> 'create_registry_metaclass' is not a class, but a method to create the
dynamic classes.
If I move these methods in 'create_registry_metaclass' method, SonarQube
raises issues about complexity of the functions, hence - they're best kept
outside of that method.

>
>- Remove unused imports from "driver/registry.py"
>
> Done

>
>-
>- Fixed sonarqube issues in
>"dynamic_registry/tests/registry/__init__.py"
>
> Done
As discussed, SonarQube is not able to understand that the result object is
a class, and not an object, hence - showing linter issues.
I've disabled them in those lines by adding the comment '# NOSNAR' at the
end.

-- Thanks, Ashesh

>
> On Sat, Jun 19, 2021 at 11:27 AM Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Sat, Jun 19, 2021 at 1:39 AM Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> Hi Akshay,
>>>
>>> We do have a couple of classes, which does automatic registration of the
>>> base classes,
>>> and which creates single-ton objects for these base classes, when needed.
>>>
>>> I would be working on a patch sooner, which will be using similar
>>> functionality for loading
>>> the multi-factor authentication.
>>>
>>> I realized - it will be a duplicate code at three places for the same
>>> functionalities.
>>> Hence - I worked on refactoring this registry class.
>>>
>>> Please find the patch for the same.
>>>
>> Found issues - some test files were using the old function
>> 'Driver.load_drivers(...)'.
>> They're fixed now.
>>
>> -- Thanks, Ashesh
>>
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> 
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi*
>>> 
>>>
>>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


refactor_registry_class_v3.patch
Description: Binary data


pgAdmin 4 commit: Added missing gettexts and text space improvements.

2021-06-23 Thread Akshay Joshi
Added missing gettexts and text space improvements.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=cc989c5c0857d371a362b2aa8a1fa7c3714a9f78
Author: Libor M 

Modified Files
--
.../servers/databases/subscriptions/static/js/subscription.js | 4 ++--
web/pgadmin/browser/server_groups/servers/static/js/server.js | 2 +-
web/pgadmin/browser/static/js/browser.js  | 2 +-
web/pgadmin/static/js/backform.pgadmin.js | 8 
.../tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx | 8 
5 files changed, 12 insertions(+), 12 deletions(-)



pgAdmin 4 commit: Fixed Czech translation string for 'Login' keyword. F

2021-06-23 Thread Akshay Joshi
Fixed Czech translation string for 'Login' keyword. Fixes #6555

Patch sent by: Waclaw

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_5.rst| 1 +
web/pgadmin/translations/cs/LC_MESSAGES/messages.po | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Refactor the registry class logic and remove duplicat

2021-06-23 Thread Akshay Joshi
Refactor the registry class logic and remove duplicate code for the same 
functionality.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=9574f43f87ebb64f00e5c209d877cac529aa525f
Author: Ashesh Vashi 

Modified Files
--
web/pgadmin/authenticate/__init__.py   |   4 +-
web/pgadmin/authenticate/registry.py   |  55 +--
.../sql/tests/test_foreign_key_properties.py   |   2 +-
web/pgadmin/utils/driver/__init__.py   |  23 +
web/pgadmin/utils/driver/registry.py   |  79 +---
web/pgadmin/utils/dynamic_registry/__init__.py | 104 +
.../utils/dynamic_registry/tests/__init__.py   |   8 ++
.../dynamic_registry/tests/registry/__init__.py|  99 
.../dynamic_registry/tests/registry/registry.py|  38 
.../utils/dynamic_registry/tests/registry/test1.py |  15 +++
.../utils/dynamic_registry/tests/registry/test2.py |  14 +++
.../tests/test_dynamic_registry.py |  39 
.../python_test_utils/sql_template_test_base.py|   2 +-
13 files changed, 334 insertions(+), 148 deletions(-)



Re: Refactor: Registry Classes

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

On Wed, Jun 23, 2021 at 7:54 PM Ashesh Vashi 
wrote:

> On Wed, Jun 23, 2021 at 1:22 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Ashesh
>>
>> Following are the review comments:
>>
>>- Fixed PEP8 issues.
>>
>> Done.
>
>>
>>- In "dynamic_registry/__init__.py" decorator @classmethod used for "
>>*_get*" and "*_load_modules*" methods which are actually outside of
>>the class. Even constructor also outside of the class.
>>
>> 'create_registry_metaclass' is not a class, but a method to create the
> dynamic classes.
> If I move these methods in 'create_registry_metaclass' method, SonarQube
> raises issues about complexity of the functions, hence - they're best kept
> outside of that method.
>
>>
>>- Remove unused imports from "driver/registry.py"
>>
>> Done
>
>>
>>-
>>- Fixed sonarqube issues in
>>"dynamic_registry/tests/registry/__init__.py"
>>
>> Done
> As discussed, SonarQube is not able to understand that the result object
> is a class, and not an object, hence - showing linter issues.
> I've disabled them in those lines by adding the comment '# NOSNAR' at the
> end.
>
> -- Thanks, Ashesh
>
>>
>> On Sat, Jun 19, 2021 at 11:27 AM Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> On Sat, Jun 19, 2021 at 1:39 AM Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 Hi Akshay,

 We do have a couple of classes, which does automatic registration of
 the base classes,
 and which creates single-ton objects for these base classes, when
 needed.

 I would be working on a patch sooner, which will be using similar
 functionality for loading
 the multi-factor authentication.

 I realized - it will be a duplicate code at three places for the same
 functionalities.
 Hence - I worked on refactoring this registry class.

 Please find the patch for the same.

>>> Found issues - some test files were using the old function
>>> 'Driver.load_drivers(...)'.
>>> They're fixed now.
>>>
>>> -- Thanks, Ashesh
>>>

 --

 Thanks & Regards,

 Ashesh Vashi
 EnterpriseDB INDIA: Enterprise PostgreSQL Company
 


 *http://www.linkedin.com/in/asheshvashi*
 

>>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>

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

*Mobile: +91 976-788-8246*


Re: pgAdmin 4 - add missing gettexts and text space improvements

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

On Wed, Jun 23, 2021 at 7:20 PM Libor M.  wrote:

> Hi,
> I added some missing gettext usage and improved spaces in texts.
> Diff file is attached.
>
> Best regards,
>
> Libor M.
>
> E-mail: libor...@gmail.com
> GitHub: https://github.com/liborm85
>


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

*Mobile: +91 976-788-8246*