Runtime refactoring

2020-07-16 Thread Dave Page
Here's a pretty large patch that implements a major refactoring of the
runtime code. Specifically:

- Move the bulk of the core code from main() into a new Runtime class.
- Break up the mass of code that was main() into a number of relatively
simple functions.
- Make the Configuration dialog synchronous so the Log dialog can be
properly viewed.
- Enable/disable menu options at the right time.
- Remove support for Qt < 5.0.
- Remove the application name constant and hardcode the name to simplify
the code.
- Improve log messages.
- Replace the sdbm hashing with Qt's MD5 hashing.

Please review & test, but do not commit before next week's release.

Thanks!

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com


Major_runtime_refactor.patch
Description: Binary data


Re: [pgAdmin][SonarQube] Shadowing variables

2020-07-16 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix a few more SonarQube reported issues(around
28) related to "potential hiding of variables declared in an outer scope".
Please review.

On Tue, Jul 14, 2020 at 4:06 PM Akshay Joshi 
wrote:

> Thanks, patch applied.
>
> On Mon, Jul 13, 2020 at 10:15 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch to fix the SonarQube reported issues (40+)
>> which potentially hides a variable declared in an outer scope.
>>
>> Please review.
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Regards,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


sonarqube.shadowing.part2.patch
Description: Binary data


[pgAdmin 4 - Bug #5137] Focussing in and then out of numeric input enables the save button in dialog

2020-07-16 Thread Satish V
Hi Hackers,

Please find the patch which fixes the bug related to save-button getting
enabled on hitting
tab key/focusing in and out of the numeric field(empty/non-empty).
Kindly review the patch.

Thanks,
Sathish V


RM5137s1.patch
Description: Binary data


[pgAdmin][RM5675] csrf token error on safari iframe

2020-07-16 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix CSRF errors when pgAdmin opened in an iframe
on safari browser.
Please review.

-- 
Regards,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


RM5675.patch
Description: Binary data


pgAdmin 4 commit: Fixed following SoanrQube issues

2020-07-16 Thread Akshay Joshi
Fixed following SoanrQube issues
  1) Rename field "node_type" to prevent any misunderstanding/clash with field 
"NODE_TYPE" defined.
  2) Define a constant instead of duplicating this literal.

Solution:
  1) Rename the field "NODE_TYPE" and "COLLECTION_LABEL" to "_NODE_TYPE" and 
"_COLLECTION_LABEL"
  2) Declare the constant in PGChildNodeView for SQL files.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/collection.py  |  8 ++--
web/pgadmin/browser/server_groups/__init__.py  | 10 ++---
.../browser/server_groups/servers/__init__.py  | 12 ++---
.../server_groups/servers/databases/__init__.py| 44 +--
.../servers/databases/casts/__init__.py| 29 ++--
.../servers/databases/event_triggers/__init__.py   | 43 +-
.../servers/databases/extensions/__init__.py   | 35 ---
.../servers/databases/external_tables/__init__.py  |  8 ++--
.../databases/foreign_data_wrappers/__init__.py| 42 ++
.../foreign_servers/__init__.py| 51 +-
.../foreign_servers/user_mappings/__init__.py  | 47 +++-
.../servers/databases/languages/__init__.py| 39 +
.../servers/databases/schemas/__init__.py  | 10 ++---
.../databases/schemas/catalog_objects/__init__.py  | 14 +++---
.../schemas/catalog_objects/columns/__init__.py| 12 ++---
.../databases/schemas/collations/__init__.py   | 38 
.../servers/databases/schemas/domains/__init__.py  | 37 
.../schemas/domains/domain_constraints/__init__.py | 30 ++---
.../databases/schemas/foreign_tables/__init__.py   | 34 ---
.../schemas/fts_configurations/__init__.py | 40 -
.../databases/schemas/fts_dictionaries/__init__.py | 49 +++--
.../databases/schemas/fts_parsers/__init__.py  | 42 +-
.../databases/schemas/fts_templates/__init__.py| 47 +++-
.../databases/schemas/functions/__init__.py| 44 ++-
.../servers/databases/schemas/packages/__init__.py | 45 ++-
.../schemas/packages/edbfuncs/__init__.py  | 19 
.../databases/schemas/packages/edbvars/__init__.py | 15 ---
.../databases/schemas/sequences/__init__.py| 40 -
.../servers/databases/schemas/synonyms/__init__.py | 32 +++---
.../servers/databases/schemas/tables/__init__.py   | 38 
.../databases/schemas/tables/columns/__init__.py   | 30 ++---
.../schemas/tables/compound_triggers/__init__.py   | 32 +++---
.../schemas/tables/constraints/__init__.py |  6 +--
.../constraints/check_constraint/__init__.py   | 30 ++---
.../constraints/exclusion_constraint/__init__.py   | 30 ++---
.../tables/constraints/foreign_key/__init__.py | 28 ++--
.../constraints/index_constraint/__init__.py   | 40 -
.../databases/schemas/tables/indexes/__init__.py   | 26 +--
.../schemas/tables/partitions/__init__.py  | 29 ++--
.../tables/row_security_policies/__init__.py   | 21 -
.../databases/schemas/tables/rules/__init__.py | 38 
.../databases/schemas/tables/schema_diff_utils.py  | 14 +++---
.../databases/schemas/tables/triggers/__init__.py  | 30 ++---
.../servers/databases/schemas/tables/utils.py  | 48 ++--
.../servers/databases/schemas/types/__init__.py| 42 +-
.../servers/databases/schemas/views/__init__.py| 14 +++---
.../server_groups/servers/pgagent/__init__.py  | 26 +--
.../servers/pgagent/schedules/__init__.py  | 24 +-
.../servers/pgagent/steps/__init__.py  | 28 ++--
.../servers/resource_groups/__init__.py|  4 +-
.../server_groups/servers/roles/__init__.py| 26 +--
.../server_groups/servers/tablespaces/__init__.py  | 32 +++---
web/pgadmin/browser/utils.py   | 11 +
web/pgadmin/tools/schema_diff/__init__.py  |  2 +-
web/pgadmin/tools/schema_diff/compare.py   |  2 +-
55 files changed, 816 insertions(+), 751 deletions(-)



pgAdmin 4 commit: Fixed code smell 'potential hiding of variables decla

2020-07-16 Thread Akshay Joshi
Fixed code smell 'potential hiding of variables declared in an outer scope'.

Branch
--
master

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

Modified Files
--
web/pgadmin/misc/file_manager/static/js/utility.js |  4 +--
web/pgadmin/misc/static/explain/js/explain.js  | 12 
web/pgadmin/static/js/slickgrid/editors.js |  4 +--
web/pgadmin/static/vendor/backform/backform.js |  4 +--
web/pgadmin/static/vendor/require/require.js   | 34 +++---
web/pgadmin/tools/debugger/static/js/debugger.js   | 32 ++--
.../tools/schema_diff/static/js/schema_diff_ui.js  | 28 +-
.../static/js/search_objects_dialog_wrapper.js |  4 +--
web/webpack.config.js  |  8 ++---
9 files changed, 65 insertions(+), 65 deletions(-)



Re: [pgAdmin][SonarQube] Shadowing variables

2020-07-16 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Jul 16, 2020 at 3:11 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to fix a few more SonarQube reported issues(around
> 28) related to "potential hiding of variables declared in an outer scope".
> Please review.
>
> On Tue, Jul 14, 2020 at 4:06 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Thanks, patch applied.
>>
>> On Mon, Jul 13, 2020 at 10:15 AM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch to fix the SonarQube reported issues (40+)
>>> which potentially hides a variable declared in an outer scope.
>>>
>>> Please review.
>>>
>>> --
>>> Thanks and Regards,
>>> Aditya Toshniwal
>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>>> "Don't Complain about Heat, Plant a TREE"
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>>
>> *Sr. Software Architect*
>> *EnterpriseDB Software India Private Limited*
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Regards,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> 
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM5653]: High Contrast UI Theme

2020-07-16 Thread Akshay Joshi
Aditya, can you please do the code review.

On Thu, Jul 16, 2020 at 6:54 PM Nikhil Mohite <
nikhil.moh...@enterprisedb.com> wrote:

> Hi Team,
>
> I have completed changes for the support of the new High-Contrast  UI
> Theme RM-#5653 .
>
> PFA patch.
>
>
> Regards,
> Nikhil Mohite.
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*