[pgAdmin]:Patch for SonarQube fixes.

2021-03-18 Thread Pradip Parkale
Hi Hackers,

I have fixed a few sonarQube issues.PFA patch.

   - Fts Configuration


   1. Remove this commented-out code.


   - Funtion


   1. Update this function so that its implementation is not identical to
   the one on line 51.
   2. Unexpected empty method 'validate'.


   - Trigger function


   1. Update this function so that its implementation is not identical to
   the one on line 41.


   - Exclusion constraint


   1. Update this function so that its implementation is not identical to
   the one on line 128.


   - File manager


   1. Remove the unused local variable "e".


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


sonarqube.patch
Description: Binary data


pgAdmin 4 commit: Ensure that toggle buttons are accessible by most scr

2021-03-18 Thread Akshay Joshi
Ensure that toggle buttons are accessible by most screen readers. Fixes #6317

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_1.rst  | 1 +
web/pgadmin/static/js/backform.pgadmin.js | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)



Re: [pgAdmin4][Patch]: RM 6317 - Toggle buttons are inaccessible

2021-03-18 Thread Akshay Joshi
Thanks, patch applied.

On Wed, Mar 17, 2021 at 2:36 PM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix the RM #6317:  Toggle buttons are
> inaccessible.
>
> Our toggle buttons are not the HTML buttons but the combinations of HTML
> tags which function as a toggle button. As the toggle button itself doesn't
> have a label/title as it wrapped around a div, we have provided the extra
> hidden label above the toggle button div, so on receiving the focus, toggle
> button will read the label we provided(For example: "Can login?, Yes,
> Toggle. Button''), which was working as expected with Chrome Screen Reader
> extension, on which we have tested. Unfortunately, most screen readers like
> VoiceOver, NVDA etc.. read the label and the button as different tags, so
> when the label gets the focus, the screen reader reads it as "Can login?
> Yes, Toggle Button", and when we try to click it, we can't, as it is just a
> label.
>
> To fix this issue, I have put the label inside the toggle div, so the
> label will belong to the toggle button div itself and with the new version
> of Bootstrap-toggle, the role="button" is already there,  so no need to add
> it.
>
> I have tested this patch on Mac with VoiceOver (on which I could reproduce
> the issue) and it is working fine.
>
> After committing this patch, we need to provide the nightly build link to
> the author of this RM, so he can test with a Braille display.
>
> Thanks,
> Khushboo
>
>
>

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

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Fixed some issues reported by SonarQube.

2021-03-18 Thread Akshay Joshi
Fixed some issues reported by SonarQube.

Branch
--
master

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

Modified Files
--
.../static/js/fts_configuration.js |  1 -
.../schemas/functions/static/js/function.js| 23 +-
.../functions/static/js/trigger_function.js|  7 +--
web/pgadmin/misc/file_manager/__init__.py  |  2 +-
4 files changed, 11 insertions(+), 22 deletions(-)



pgAdmin 4 commit: Fixed cognitive complexity reported by SonarQube.

2021-03-18 Thread Akshay Joshi
Fixed cognitive complexity reported by SonarQube.

Branch
--
master

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

Modified Files
--
.../databases/schemas/functions/__init__.py| 127 -
.../server_groups/servers/roles/__init__.py|  89 +++
2 files changed, 112 insertions(+), 104 deletions(-)



Re: [pgAdmin]:Patch for SonarQube fixes.

2021-03-18 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Mar 18, 2021 at 2:51 PM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Hackers,
>
> I have fixed a few sonarQube issues.PFA patch.
>
>- Fts Configuration
>
>
>1. Remove this commented-out code.
>
>
>- Funtion
>
>
>1. Update this function so that its implementation is not identical to
>the one on line 51.
>2. Unexpected empty method 'validate'.
>
>
>- Trigger function
>
>
>1. Update this function so that its implementation is not identical to
>the one on line 41.
>
>
>- Exclusion constraint
>
>
>1. Update this function so that its implementation is not identical to
>the one on line 128.
>
>
>- File manager
>
>
>1. Remove the unused local variable "e".
>
>
> --
> 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: SonarQube Fixes #5 Roles & Functions

2021-03-18 Thread Akshay Joshi
Thanks, patch applied.

On Wed, Mar 17, 2021 at 4:50 PM Rahul Shirsat <
rahul.shir...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the patch which resolves below sonar qube issues:
>
> For Roles:
> Refactor this function to reduce its Cognitive Complexity from 21 to the
> 15 allowed
> Refactor this function to reduce its Cognitive Complexity from 16 to the
> 15 allowed
>
> For Functions:
> Refactor this function to reduce its Cognitive Complexity from 17 to the
> 15 allowed
>
> --
> *Rahul Shirsat*
> Senior Software Engineer | EnterpriseDB Corporation.
>


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

*Mobile: +91 976-788-8246*