[pgAdmin4][RM3903] Query Tool Initialization Error

2019-01-28 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix "Query Tool Initialization Error" which occurs
on opening query tool for some users.
The problem was, request data was sent from client but was not read by back
end service. In flask, if you receive POST data in a request you *must* read
it before returning a response.
Also removed a dead code, which was not referred/used anywhere.

Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


RM3903.patch
Description: Binary data


Re: [pgAdmin4[RM#3935] Grant wizard fails to list down functions

2019-01-28 Thread Murtuza Zabuawala
Hi,

PFA minor patch, To display an error on UI when there is a backend error
for the grant wizard request.
Please review.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



On Mon, Jan 28, 2019 at 12:48 PM Akshay Joshi 
wrote:

> Thanks patch applied.
>
> On Mon, Jan 28, 2019 at 12:01 PM Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch to fix the issue where EPAS DB instance running with
>> *no-redwood-compat* mode fails to list down functions objects in grant
>> wizard due to 'char' -> 'int' type cast error.
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


RM_3935_show_error_on_UI.diff
Description: Binary data


Re: [pgAdmin4[RM#3935] Grant wizard fails to list down functions

2019-01-28 Thread Akshay Joshi
Hi Murtuza

Here are my review comments:

   - Exact error should be logged in the log file and on GUI we should show
   message like "Unable to fetch  object".
   - Message should be shown in the status bar.
   - If there is an error to fetch one kind of object, we should show other
   objects.


On Mon, Jan 28, 2019 at 2:49 PM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch, To display an error on UI when there is a backend error
> for the grant wizard request.
> Please review.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
>
> On Mon, Jan 28, 2019 at 12:48 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Thanks patch applied.
>>
>> On Mon, Jan 28, 2019 at 12:01 PM Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch to fix the issue where EPAS DB instance running with
>>> *no-redwood-compat* mode fails to list down functions objects in grant
>>> wizard due to 'char' -> 'int' type cast error.
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>

-- 
*Akshay Joshi*

*Sr. Software Architect *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases

2019-01-28 Thread Dave Page
Hi

On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
 wrote:
>
> Hi Hackers,
>
> Attached is the patch to fix failing SQL editor related feature tests.
> The failure is occurring mostly because of send_keys function of selenium 
> which sometimes does not input the complete text. The change will use 
> Codemirror javascript object to set the text.
>
> I have also added new args flag "--modules" which can be used after --pkg 
> where you can test a specific module file under the pkg. This is not so 
> useful for build but definitely helpful for the developers.

One of the most common failures I see is failure to fill in the
details on the Add Server dialogue (it might type half of an entry,
then just hang). Should we get rid of all uses of send_keys?

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases

2019-01-28 Thread Aditya Toshniwal
Hi Dave,

On Mon, Jan 28, 2019 at 5:01 PM Dave Page  wrote:

> Hi
>
> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
>  wrote:
> >
> > Hi Hackers,
> >
> > Attached is the patch to fix failing SQL editor related feature tests.
> > The failure is occurring mostly because of send_keys function of
> selenium which sometimes does not input the complete text. The change will
> use Codemirror javascript object to set the text.
> >
> > I have also added new args flag "--modules" which can be used after
> --pkg where you can test a specific module file under the pkg. This is not
> so useful for build but definitely helpful for the developers.
>
> One of the most common failures I see is failure to fill in the
> details on the Add Server dialogue (it might type half of an entry,
> then just hang). Should we get rid of all uses of send_keys?
>
Setting the text using javascript executor can be done. send_keys simulate
an actual person,  so if you try to set a disabled text box using
send_keys, it won't. Places where disabled fields doesn't matter, send_keys
can be removed.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases

2019-01-28 Thread Dave Page
On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal
 wrote:
>
> Hi Dave,
>
> On Mon, Jan 28, 2019 at 5:01 PM Dave Page  wrote:
>>
>> Hi
>>
>> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
>>  wrote:
>> >
>> > Hi Hackers,
>> >
>> > Attached is the patch to fix failing SQL editor related feature tests.
>> > The failure is occurring mostly because of send_keys function of selenium 
>> > which sometimes does not input the complete text. The change will use 
>> > Codemirror javascript object to set the text.
>> >
>> > I have also added new args flag "--modules" which can be used after --pkg 
>> > where you can test a specific module file under the pkg. This is not so 
>> > useful for build but definitely helpful for the developers.
>>
>> One of the most common failures I see is failure to fill in the
>> details on the Add Server dialogue (it might type half of an entry,
>> then just hang). Should we get rid of all uses of send_keys?
>
> Setting the text using javascript executor can be done. send_keys simulate an 
> actual person,  so if you try to set a disabled text box using send_keys, it 
> won't. Places where disabled fields doesn't matter, send_keys can be removed.

Can't we just do something like:

if input.disabled == false:
  input.value = 'Foo';
else:
  raise exception 

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases

2019-01-28 Thread Aditya Toshniwal
On Mon, Jan 28, 2019 at 5:39 PM Dave Page  wrote:

> On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal
>  wrote:
> >
> > Hi Dave,
> >
> > On Mon, Jan 28, 2019 at 5:01 PM Dave Page  wrote:
> >>
> >> Hi
> >>
> >> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
> >>  wrote:
> >> >
> >> > Hi Hackers,
> >> >
> >> > Attached is the patch to fix failing SQL editor related feature tests.
> >> > The failure is occurring mostly because of send_keys function of
> selenium which sometimes does not input the complete text. The change will
> use Codemirror javascript object to set the text.
> >> >
> >> > I have also added new args flag "--modules" which can be used after
> --pkg where you can test a specific module file under the pkg. This is not
> so useful for build but definitely helpful for the developers.
> >>
> >> One of the most common failures I see is failure to fill in the
> >> details on the Add Server dialogue (it might type half of an entry,
> >> then just hang). Should we get rid of all uses of send_keys?
> >
> > Setting the text using javascript executor can be done. send_keys
> simulate an actual person,  so if you try to set a disabled text box using
> send_keys, it won't. Places where disabled fields doesn't matter, send_keys
> can be removed.
>
> Can't we just do something like:
>
> if input.disabled == false:
>   input.value = 'Foo';
> else:
>   raise exception 
>
I'll check if this can be done. Will get back.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


[pgAdmin4][Patch]: RM 3927 Unable to debug the procedure inside package

2019-01-28 Thread Akshay Joshi
Hi Hackers,

Attached is the patch to fix RM 3927 "Unable to debug the procedure inside
package". Problem with the existing code is we assume that "PLDBGBREAK"
will be always found in the first element of the notification list.

In this patch we loop through the list and found the string. Apart from
that patch contains small fix to cancel the transaction of Query Tool when
panel is closed.

Please review it.

-- 
*Akshay Joshi*

*Sr. Software Architect *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


RM_3927.patch
Description: Binary data


pgAdmin 4 commit: Fixed Query Tool Initialization Error. Fixes #3903

2019-01-28 Thread Akshay Joshi
Fixed Query Tool Initialization Error. Fixes #3903

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_2.rst   |  1 +
web/pgadmin/tools/datagrid/__init__.py | 11 -
web/pgadmin/tools/datagrid/static/js/datagrid.js   | 11 -
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 57 --
4 files changed, 20 insertions(+), 60 deletions(-)



Re: [pgAdmin4][RM3903] Query Tool Initialization Error

2019-01-28 Thread Akshay Joshi
Thanks patch applied.

On Mon, Jan 28, 2019 at 2:32 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to fix "Query Tool Initialization Error" which
> occurs on opening query tool for some users.
> The problem was, request data was sent from client but was not read by
> back end service. In flask, if you receive POST data in a request you
> *must* read it before returning a response.
> Also removed a dead code, which was not referred/used anywhere.
>
> Kindly review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>


-- 
*Akshay Joshi*

*Sr. Software Architect *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*