[pgAdmin][RM4806] Add info to empty explain tab

2020-09-28 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to add a useful message when the explain plan is not
used and is empty. I've also added a message for the data output tab.

Please review.

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

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


RM4806.patch
Description: Binary data


[pgAdmin][RM5131] ctrl + a shortcut does not move cursor in sql editor with macOS

2020-09-28 Thread Aditya Toshniwal
Hi Hackers,

Attached patch removes the incorrect overriding of default CodeMirror
shortcuts.
Please review.

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

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


RM5131.patch
Description: Binary data


Re: [pgAdmin] Fix incorrect import in setup.py

2020-09-28 Thread Aditya Toshniwal
Hi Azad,

The patch looks good to me.

On Thu, Sep 24, 2020 at 6:33 PM Azad Salahlı  wrote:

> Hi,
>
> First time posting here. I've attached a fix for an incorrect import
> in `setup.py`. Trying to import from `pgadmin` before adding the root
> directory to the system path results in import error, when the script
> is invoked in any other way than running it directly. For example
>
> $ /path/to/venv/bin/pip install pgadmin4
> $ /path/to/venv/bin/python -m pgadmin4.setup
> Traceback (most recent call last):
>   ...
>   File "/path/to/venv/lib/python3.6/site-packages/pgadmin4/setup.py",
> line 18, in 
> from pgadmin.model import db, User, Version, ServerGroup, Server, \
> ModuleNotFoundError: No module named 'pgadmin'
>
> Please let me know what you think. Happy to address any feedback.
>
> Regards,
> Azad Salahlı
>


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

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


pgAdmin 4 commit: Fixed incorrect import in setup.py

2020-09-28 Thread Akshay Joshi
Fixed incorrect import in setup.py

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=43f1953aa770d59dca06b056f43e4794d9ee8ca2
Author: Azad Salahli 

Modified Files
--
web/setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Added useful message when the explain plan is not use

2020-09-28 Thread Akshay Joshi
Added useful message when the explain plan is not used and empty. Fixes #4806

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_27.rst  |  1 +
web/pgadmin/static/scss/_pgadmin.style.scss|  1 +
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 14 +++---
3 files changed, 13 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Added support to ignore the owner while comparing obj

2020-09-28 Thread Akshay Joshi
Added support to ignore the owner while comparing objects in the Schema Diff 
tool. Fixes #5200.

Branch
--
master

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

Modified Files
--
docs/en_US/images/preferences_schema_diff.png  | Bin 119849 -> 138312 bytes
docs/en_US/preferences.rst |   2 ++
docs/en_US/release_notes_4_27.rst  |   1 +
docs/en_US/schema_diff.rst |   8 +++--
.../databases/schemas/tables/schema_diff_utils.py  |  10 ++-
web/pgadmin/tools/schema_diff/__init__.py  |  29 --
web/pgadmin/tools/schema_diff/compare.py   |   2 --
web/pgadmin/tools/schema_diff/directory_compare.py |  33 +++--
8 files changed, 41 insertions(+), 44 deletions(-)



pgAdmin 4 commit: Added Macro support. Fixes #1402

2020-09-28 Thread Akshay Joshi
Added Macro support. Fixes #1402

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_27.rst  |   1 +
web/migrations/versions/398697dc9550_.py   |  56 
web/pgadmin/model/__init__.py  |  25 +-
web/pgadmin/static/js/backgrid.pgadmin.js  | 176 ++-
web/pgadmin/static/js/keyboard_shortcuts.js|  25 +-
web/pgadmin/static/js/sqleditor/macro.js   | 325 +
web/pgadmin/static/js/sqleditor/macro_model.js | 224 ++
.../static/js/sqleditor/query_tool_actions.js  |   5 +
web/pgadmin/static/scss/_backgrid.overrides.scss   |  28 ++
web/pgadmin/tools/datagrid/__init__.py |   4 +
.../tools/datagrid/templates/datagrid/index.html   |  28 +-
web/pgadmin/tools/sqleditor/__init__.py|  50 +++-
.../tools/sqleditor/static/css/sqleditor.css   |  29 ++
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |  95 +-
web/pgadmin/tools/sqleditor/tests/test_macros.py   | 125 
web/pgadmin/tools/sqleditor/utils/macros.py| 189 
.../sqleditor/keyboard_shortcuts_spec.js   |  58 +++-
17 files changed, 1429 insertions(+), 14 deletions(-)



Re: [pgAdmin4][Patch] - RM 1402 - Macro support like pgAdmin3

2020-09-28 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Sep 28, 2020 at 2:18 PM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached updated patch.
>
> Thanks,
> Khushboo
>
> On Wed, Sep 23, 2020 at 5:42 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Khushboo
>>
>> Following are the GUI review comments:
>>
>>- If we provide anyone value either Name or SQL it throws Alertify
>>error message with 'name' or 'SQL'. The error message should be correct.
>>
>>[image: Name_Error.png]
>>
> Fixed.
>
>>
>>- We should not enable the 'Save' button if the value of Name or SQL
>>is not entered by the user. Either both values should be there or both
>>should be blank.
>>
>> Fixed.
>
>>
>>- Click on anywhere inside the empty cell where the clear row icon is
>>not visible, it pops up the message to clear the row which is already
>>empty.
>>
>>[image: Clear_Row.png]
>>
> Fixed.
>
>>
>>- Save any macro and then open the "Manage Macros..." dialog again
>>click on the SQL control for the existing macro, cursor is not at the
>>appropriate place.
>>
>> [image: CodeMirror_Error.png]
>>
> Fixed.
>
>>
>>- Macros are not working for multiple users. Create some macro from
>>User1 and then log in using User2, macros created by User1 are visible to
>>User2 and when I try to update it is not updating.
>>
>> Fixed.
>
>>
>> On Mon, Sep 21, 2020 at 2:19 PM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch for RM 1402 - Macro support like pgAdmin3.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Sr. Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>

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

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM4806] Add info to empty explain tab

2020-09-28 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Sep 28, 2020 at 3:02 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to add a useful message when the explain plan is not
> used and is empty. I've also added a message for the data output tab.
>
> 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 | Sr. Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin] Fix incorrect import in setup.py

2020-09-28 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Sep 28, 2020 at 4:48 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Azad,
>
> The patch looks good to me.
>
> On Thu, Sep 24, 2020 at 6:33 PM Azad Salahlı 
> wrote:
>
>> Hi,
>>
>> First time posting here. I've attached a fix for an incorrect import
>> in `setup.py`. Trying to import from `pgadmin` before adding the root
>> directory to the system path results in import error, when the script
>> is invoked in any other way than running it directly. For example
>>
>> $ /path/to/venv/bin/pip install pgadmin4
>> $ /path/to/venv/bin/python -m pgadmin4.setup
>> Traceback (most recent call last):
>>   ...
>>   File "/path/to/venv/lib/python3.6/site-packages/pgadmin4/setup.py",
>> line 18, in 
>> from pgadmin.model import db, User, Version, ServerGroup, Server,
>> \
>> ModuleNotFoundError: No module named 'pgadmin'
>>
>> Please let me know what you think. Happy to address any feedback.
>>
>> Regards,
>> Azad Salahlı
>>
>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> 
> "Don't Complain about Heat, Plant a TREE"
>


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

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM3794]:Allow User to Change Database Connection from an Open Query Tool Tab

2020-09-28 Thread Akshay Joshi
Hi Nikhil

The patch is not applying, rebase, and send it again. Please check your
code should not create any new SonarQube issues.

On Mon, Sep 28, 2020 at 11:20 AM Nikhil Mohite <
nikhil.moh...@enterprisedb.com> wrote:

> Hi Akshay,
>
> I have resolved all the review comments and also updated the test cases as
> per the new implementation.
>
> PFA updated patch.
>
>
>
> On Mon, Sep 21, 2020 at 5:24 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Nikhil
>>
>> Following are the initial review comments:
>>
>>- Open View/Edit data on any table and click on the same database
>>connection and then click on the Execute button. Got "get_primary_keys()
>>takes 1 positional argument but 2 were given" error.
>>- In my opinion, we should hide the option to change the database
>>connection for View/Edit Data.
>>- If the user clicks on the same database connection multiple times
>>then no need to change the backend connection and transaction id. Add
>>validation at the backend, no action required in this case.
>>- The role option is missing from the "connect to server" dialog.
>>- The Password field should not be there on the "connect to server"
>>dialog. Sometimes we saved the password so asking a password every time is
>>not correct. Check the pgAdmin 3 behavior.
>>
>> Code review still remains.
>>
>> On Thu, Sep 17, 2020 at 4:15 PM Nikhil Mohite <
>> nikhil.moh...@enterprisedb.com> wrote:
>>
>>> Hi Team,
>>>
>>> Regarding RM-3794  allow
>>> the user to change the database connection from an open query tool:
>>> I have implemented the feature and also added documentation for it.
>>>
>>> PFA patch.
>>>
>>> --
>>> *Thanks & Regards,*
>>> *Nikhil Mohite*
>>> *Software Engineer.*
>>> *EDB Postgres* 
>>> *Mob.No: +91-7798364578.*
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Sr. Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>

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

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM5131] ctrl + a shortcut does not move cursor in sql editor with macOS

2020-09-28 Thread Akshay Joshi
Hi Aditya

The patch is not applying, rebase, and send it again.

On Mon, Sep 28, 2020 at 3:23 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached patch removes the incorrect overriding of default CodeMirror
> shortcuts.
> 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 | Sr. Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


[pgAdmin][RM4855] Renaming a file removes the file extension

2020-09-28 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix a bug where extension file extension is
stripped on renaming a file.
Pleasure review.

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

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


RM4855.patch
Description: Binary data


Re: [pgAdmin][RM5131] ctrl + a shortcut does not move cursor in sql editor with macOS

2020-09-28 Thread Aditya Toshniwal
Hi,

Please find the updated patch.

On Mon, Sep 28, 2020 at 5:59 PM Akshay Joshi 
wrote:

> Hi Aditya
>
> The patch is not applying, rebase, and send it again.
>
> On Mon, Sep 28, 2020 at 3:23 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached patch removes the incorrect overriding of default CodeMirror
>> shortcuts.
>> 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 | Sr. Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


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

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


RM5131.patch
Description: Binary data


Error in pgadmin 4

2020-09-28 Thread Leandro Bugalho
Hi, I need help, I have a problem using pgadmin 4 and greenplum. I had
a popup error Internal Server Error -
"depends/gpdb/#80323#/dependencies.sql"  , how can i resolve these
errors?


thanks for help

Leandro




Re: Error in pgadmin 4

2020-09-28 Thread Akshay Joshi
Hi Leandro

pgAdmin4 doesn't support the Greenplum database.

On Tue, Sep 29, 2020 at 12:08 AM Leandro Bugalho 
wrote:

> Hi, I need help, I have a problem using pgadmin 4 and greenplum. I had
> a popup error Internal Server Error -
> "depends/gpdb/#80323#/dependencies.sql"  , how can i resolve these
> errors?
>
>
> thanks for help
>
> Leandro
>
>
>

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

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Ensure that 'ctrl + a' shortcut does not move the cur

2020-09-28 Thread Akshay Joshi
Ensure that 'ctrl + a' shortcut does not move the cursor in SQL editor. Fixes 
#5131

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_27.rst|  1 +
web/pgadmin/browser/static/js/browser.js | 16 
2 files changed, 1 insertion(+), 16 deletions(-)



pgAdmin 4 commit: Fixed an issue where file extension is stripped on re

2020-09-28 Thread Akshay Joshi
Fixed an issue where file extension is stripped on renaming a file. Fixes #4855

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_27.rst  | 1 +
web/pgadmin/misc/file_manager/static/js/utility.js | 7 +++
2 files changed, 4 insertions(+), 4 deletions(-)



Re: [pgAdmin][RM3794]:Allow User to Change Database Connection from an Open Query Tool Tab

2020-09-28 Thread Akshay Joshi
Hi Nikhil

Your patch introduces 1 new Bug and 13 new code smells, please fix those
and resend the patch.

On Mon, Sep 28, 2020 at 7:31 PM Nikhil Mohite <
nikhil.moh...@enterprisedb.com> wrote:

> Hi Akshay,
>
> I have resolved code conflict issues and sonarqube issues.
> PFA updated patch.
>
> Regards,
> Nikhil Mohite.
>
> On Mon, Sep 28, 2020 at 5:58 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Nikhil
>>
>> The patch is not applying, rebase, and send it again. Please check your
>> code should not create any new SonarQube issues.
>>
>> On Mon, Sep 28, 2020 at 11:20 AM Nikhil Mohite <
>> nikhil.moh...@enterprisedb.com> wrote:
>>
>>> Hi Akshay,
>>>
>>> I have resolved all the review comments and also updated the test cases
>>> as per the new implementation.
>>>
>>> PFA updated patch.
>>>
>>>
>>>
>>> On Mon, Sep 21, 2020 at 5:24 PM Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Nikhil

 Following are the initial review comments:

- Open View/Edit data on any table and click on the same database
connection and then click on the Execute button. Got "get_primary_keys()
takes 1 positional argument but 2 were given" error.
- In my opinion, we should hide the option to change the database
connection for View/Edit Data.
- If the user clicks on the same database connection multiple times
then no need to change the backend connection and transaction id. Add
validation at the backend, no action required in this case.
- The role option is missing from the "connect to server" dialog.
- The Password field should not be there on the "connect to server"
dialog. Sometimes we saved the password so asking a password every time 
 is
not correct. Check the pgAdmin 3 behavior.

 Code review still remains.

 On Thu, Sep 17, 2020 at 4:15 PM Nikhil Mohite <
 nikhil.moh...@enterprisedb.com> wrote:

> Hi Team,
>
> Regarding RM-3794  allow
> the user to change the database connection from an open query tool:
> I have implemented the feature and also added documentation for it.
>
> PFA patch.
>
> --
> *Thanks & Regards,*
> *Nikhil Mohite*
> *Software Engineer.*
> *EDB Postgres* 
> *Mob.No: +91-7798364578.*
>


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

 *Mobile: +91 976-788-8246*

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

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

*Mobile: +91 976-788-8246*