Re: [pgAdmin4][patch]: RM #3090 pgadmin shows misleading "Query returned successfully" with incorrect SQL

2018-03-26 Thread Akshay Joshi
Hi Joao

On Tue, Mar 27, 2018 at 12:01 AM, Joao De Almeida Pereira  wrote:

> Hello,
> We tried to reproduce the issue but we were not capable to reproduce it.
> What it is strange on the fix is that python is complaining about a
> different line then the one that was fixed. Maybe this is just a Python
> thing
>

I have mentioned the steps in RM and I have tried it on Ubuntu 16.
Python is complaining the exact line where I have fixed the logic.

   ex_diag_message = u"{0}:  {1}".format(
 self.decode_to_utf8(exception_obj.diag.severity), #
exception_obj.diag.severity is not decoded before my fix.
 self.decode_to_utf8(exception_obj.diag.message_primary)
   )



>
> I assume that the fix works, but I would love to see some tests to ensure
> it is working. Another issue that looks more problematic is the fact that,
> as per the Redmine issue, when an exception is thrown it sends back a
> Successful Query message. If this is the case then this fix doesn't look
> like it is enough to solve the problem.
>

Yes it works. With the latest code I didn't see Successful Query
message, it is showing "Not connected to the server .", but the stack
trace is same that was mentioned in the RM.

>
> Thanks
> Victoria & Joao
>
> On Mon, Mar 26, 2018 at 9:00 AM Dave Page  wrote:
>
>> Thanks, applied.
>>
>> On Mon, Mar 26, 2018 at 11:43 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please find the attached patch to fix RM #3090 pgadmin shows misleading
>>> "Query returned successfully" with incorrect SQL.
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91
>>> 976-788-8246 <+91%2097678%2088246>*
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>


-- 
*Akshay Joshi*

*Sr. Software Architect *



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


Re: [pgAdmin4][RM#3055] Allow user to sort the data in View data mode

2018-03-26 Thread Robert Eckhardt
On Mon, Mar 26, 2018 at 2:07 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
>
> @Murtuza: The patch codewise looks good. Nice to see that we are using
> axios instead of jquery ajax calls and that there is some coverage for the
> change.
> Nevertheless the Javascript testing looks a bit slim and could be
> improved. Also the DataSorting class could have some other member functions
> like the model validation could be extracted out so that it is easily
> tested.
>
>
> @Hackers: This was how we tried to test this feature:
> 1 - Started pgAdmin
> 2 - Opened the query tool for a specific server
> 3 - Executed a SQL statment
> 4 - Pressed the column header to try to order, nothing happened
> 5 - Right clicked the column header to see if it was there the option,
> nothing
>
> This is the behavior that we were expecting, not to have to open Data View
> and then press the icon that is not even near the grid in order to sort the
> column. Is this really the way we want people to use the grid in pgAdmin?
> Should it be more intuitive?
>

Have we considered making the grid behave more like excel or other grids? I
think that having the ascending and descending inside the column header, we
could similarly provide filtering. Something that would give users a more
intuitive place to look.

-- Rob


>
>
> PS: Also that Orange after the selection is like a push in the eyes and
> not in a good way. Maybe we should think about changing the color of the
> icon to blue to match the rest of the website or something.
>
> Thanks
> Victoria & Joao
>
> On Mon, Mar 26, 2018 at 12:13 PM Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> On Mon, Mar 26, 2018 at 5:52 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Sun, Mar 25, 2018 at 7:13 PM, Murtuza Zabuawala >> enterprisedb.com> wrote:
>>>
 Hi,

 PFA patch which allow user to sort the data in View data mode.

>>>
>>> The patch looks good in general, however I'm not sure about the UI, in
>>> particular that the closely-linked dialogue for filtering is a completely
>>> different design. I think it would be better to combine the Sort/Filter
>>> options and use a single dialogue for both, as pgAdmin 3 did (though, maybe
>>> not using separate tabs for each part, but the top and bottom of the same
>>> dialogue.
>>>
>>> That would certainly fix the consistency of the dialogues (obviously, as
>>> there would only be one!), and I think would perhaps be a more simple
>>> overall UI, particularly for those that want to sort and filter.
>>>
>> ​Sure, I'll send updated it accordingly.​
>>
>>
>>>
>>> Thoughts?
>>>
>>> Thanks.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>


Re: [pgAdmin4][Patch]: RM #1978 - Add an option to allow user to disable alertifyjs and acitree animations

2018-03-26 Thread Joao De Almeida Pereira
Hi Khushboo,

Looks like you have a typo on your CSS where it reads 'zoomeIn' it should
be 'zoomIn'.
Also setting more parameters into the window, in our experience, is never
good, so maybe it is time to create a real settings cache that can retrieve
from the backend the settings, like this one.

Thanks
Victoria & Joao

On Mon, Mar 26, 2018 at 8:38 AM Dave Page  wrote:

> Hi
>
> On Mon, Mar 26, 2018 at 7:23 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix RM #1978: Add an option to allow
>> user to disable alertifyjs and acitree animations.
>>
>
> I think these really need to be per-user settings, not per-installation..
> Whether or not animations are shown is really a matter of personal taste
> and circumstance.
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][patch]: RM #3090 pgadmin shows misleading "Query returned successfully" with incorrect SQL

2018-03-26 Thread Joao De Almeida Pereira
Hello,
We tried to reproduce the issue but we were not capable to reproduce it.
What it is strange on the fix is that python is complaining about a
different line then the one that was fixed. Maybe this is just a Python
thing

I assume that the fix works, but I would love to see some tests to ensure
it is working. Another issue that looks more problematic is the fact that,
as per the Redmine issue, when an exception is thrown it sends back a
Successful Query message. If this is the case then this fix doesn't look
like it is enough to solve the problem.

Thanks
Victoria & Joao

On Mon, Mar 26, 2018 at 9:00 AM Dave Page  wrote:

> Thanks, applied.
>
> On Mon, Mar 26, 2018 at 11:43 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch to fix RM #3090 pgadmin shows misleading
>> "Query returned successfully" with incorrect SQL.
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-8246
>> <+91%2097678%2088246>*
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Trying to work on a feature.

2018-03-26 Thread Rahul Soshte
I am new to the codebase of pgAdmin4 and I am trying to work on this
Feature.

https://redmine.postgresql.org/issues/1998

which appends .sql to files when using the feature "Save" or "Save As"

Which files or folders I should be mostly grasping or looking at ?


Re: [pgAdmin4][RM#3055] Allow user to sort the data in View data mode

2018-03-26 Thread Joao De Almeida Pereira
Hi Hackers,

@Murtuza: The patch codewise looks good. Nice to see that we are using
axios instead of jquery ajax calls and that there is some coverage for the
change.
Nevertheless the Javascript testing looks a bit slim and could be improved.
Also the DataSorting class could have some other member functions like the
model validation could be extracted out so that it is easily tested.


@Hackers: This was how we tried to test this feature:
1 - Started pgAdmin
2 - Opened the query tool for a specific server
3 - Executed a SQL statment
4 - Pressed the column header to try to order, nothing happened
5 - Right clicked the column header to see if it was there the option,
nothing

This is the behavior that we were expecting, not to have to open Data View
and then press the icon that is not even near the grid in order to sort the
column. Is this really the way we want people to use the grid in pgAdmin?
Should it be more intuitive?


PS: Also that Orange after the selection is like a push in the eyes and not
in a good way. Maybe we should think about changing the color of the icon
to blue to match the rest of the website or something.

Thanks
Victoria & Joao

On Mon, Mar 26, 2018 at 12:13 PM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> On Mon, Mar 26, 2018 at 5:52 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Sun, Mar 25, 2018 at 7:13 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch which allow user to sort the data in View data mode.
>>>
>>
>> The patch looks good in general, however I'm not sure about the UI, in
>> particular that the closely-linked dialogue for filtering is a completely
>> different design. I think it would be better to combine the Sort/Filter
>> options and use a single dialogue for both, as pgAdmin 3 did (though, maybe
>> not using separate tabs for each part, but the top and bottom of the same
>> dialogue.
>>
>> That would certainly fix the consistency of the dialogues (obviously, as
>> there would only be one!), and I think would perhaps be a more simple
>> overall UI, particularly for those that want to sort and filter.
>>
> ​Sure, I'll send updated it accordingly.​
>
>
>>
>> Thoughts?
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>


Re: [pgAdmin4][RM#3055] Allow user to sort the data in View data mode

2018-03-26 Thread Murtuza Zabuawala
On Mon, Mar 26, 2018 at 5:52 PM, Dave Page  wrote:

> Hi
>
> On Sun, Mar 25, 2018 at 7:13 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch which allow user to sort the data in View data mode.
>>
>
> The patch looks good in general, however I'm not sure about the UI, in
> particular that the closely-linked dialogue for filtering is a completely
> different design. I think it would be better to combine the Sort/Filter
> options and use a single dialogue for both, as pgAdmin 3 did (though, maybe
> not using separate tabs for each part, but the top and bottom of the same
> dialogue.
>
> That would certainly fix the consistency of the dialogues (obviously, as
> there would only be one!), and I think would perhaps be a more simple
> overall UI, particularly for those that want to sort and filter.
>
​Sure, I'll send updated it accordingly.​


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


Re: [pgAdmin4][patch]: RM #3090 pgadmin shows misleading "Query returned successfully" with incorrect SQL

2018-03-26 Thread Dave Page
Thanks, applied.

On Mon, Mar 26, 2018 at 11:43 AM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the attached patch to fix RM #3090 pgadmin shows misleading
> "Query returned successfully" with incorrect SQL.
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-8246
> <+91%2097678%2088246>*
>



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

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


pgAdmin 4 commit: Decode the severity field in database exception objec

2018-03-26 Thread Dave Page
Decode the severity field in database exception objects properly. Fixes #3090

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1baddd5e9a8d66daefa4c9e1b6a6ba10ba1130ea
Author: Akshay Joshi 

Modified Files
--
docs/en_US/release_notes_3_0.rst| 1 +
web/pgadmin/utils/driver/psycopg2/connection.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



Re: [pgAdmin4][RM#3055] Allow user to sort the data in View data mode

2018-03-26 Thread Dave Page
Hi

On Sun, Mar 25, 2018 at 7:13 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch which allow user to sort the data in View data mode.
>

The patch looks good in general, however I'm not sure about the UI, in
particular that the closely-linked dialogue for filtering is a completely
different design. I think it would be better to combine the Sort/Filter
options and use a single dialogue for both, as pgAdmin 3 did (though, maybe
not using separate tabs for each part, but the top and bottom of the same
dialogue.

That would certainly fix the consistency of the dialogues (obviously, as
there would only be one!), and I think would perhaps be a more simple
overall UI, particularly for those that want to sort and filter.

Thoughts?

Thanks.

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

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


[pgAdmin4][patch]: RM #3090 pgadmin shows misleading "Query returned successfully" with incorrect SQL

2018-03-26 Thread Akshay Joshi
Hi Hackers,

Please find the attached patch to fix RM #3090 pgadmin shows misleading
"Query returned successfully" with incorrect SQL.

-- 
*Akshay Joshi*

*Sr. Software Architect *



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


RM_3090.patch
Description: Binary data


[pgAdmin4][Patch]: RM #1978 - Add an option to allow user to disable alertifyjs and acitree animations

2018-03-26 Thread Khushboo Vashi
Hi,

Please find the attached patch to fix RM #1978: Add an option to allow user
to disable alertifyjs and acitree animations.

Thanks,
Khushboo
diff --git a/web/config.py b/web/config.py
index 3d8f6f7..a91b2e2 100644
--- a/web/config.py
+++ b/web/config.py
@@ -364,6 +364,12 @@ COOKIE_DEFAULT_DOMAIN = None
 SESSION_COOKIE_DOMAIN = None
 
 ##
+# Allow user to disable alertify and acitree animation
+##
+SHOW_ALERTIFY_ANIMATION = True
+SHOW_ACITREE_ANIMATION = True
+
+##
 # Local config settings
 ##
 
diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js
index 46b6033..31e6db9 100644
--- a/web/pgadmin/browser/static/js/browser.js
+++ b/web/pgadmin/browser/static/js/browser.js
@@ -73,14 +73,16 @@ define('pgadmin.browser', [
 },
 loaderDelay: 100,
 show: {
-  duration: 75,
+  duration: window.SHOW_ACITREE_ANIMATION ? 75 : 0,
 },
 hide: {
-  duration: 75,
+  duration: window.SHOW_ACITREE_ANIMATION ? 75 : 0,
 },
 view: {
-  duration: 75,
+  duration: window.SHOW_ACITREE_ANIMATION ? 75 : 0,
 },
+animateRoot: window.SHOW_ACITREE_ANIMATION ? true : false,
+unanimated: window.SHOW_ACITREE_ANIMATION ? false : true,
   });
 
   b.tree = $('#tree').aciTree('api');
diff --git a/web/pgadmin/static/css/alertify.noanimation.css b/web/pgadmin/static/css/alertify.noanimation.css
new file mode 100644
index 000..cc68747
--- /dev/null
+++ b/web/pgadmin/static/css/alertify.noanimation.css
@@ -0,0 +1,41 @@
+.alertify .ajs-dimmer,
+.alertify .ajs-modal,
+.alertify-notifier,
+.alertify-notifier .ajs-message.ajs-visible,
+.alertify-notifier .ajs-message,
+.alertify-notifier.ajs-center .ajs-message.ajs-visible,
+.alertify-notifier.ajs-center .ajs-message
+{
+  -moz-transition: none;
+  -webkit-transition: none;
+  -o-transition: none;
+  transition: none;
+  -webkit-transform: none;
+  transform: none;
+}
+
+.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog {
+  -webkit-animation-name: ajs-zoomeIn;
+  animation-name: ajs-zoomeIn;
+}
+.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog {
+  -webkit-animation-name: ajs-zoomOut;
+  animation-name: ajs-zoomOut;
+}
+
+@-webkit-keyframes ajs-zoomeIn {
+  -webkit-transform: none;
+  transform: none;
+}
+@keyframes ajs-zoomeIn {
+  -webkit-transform: none;
+  transform: none;
+}
+@-webkit-keyframes ajs-zoomOut {
+  -webkit-transform: none;
+  transform: none;
+}
+@keyframes ajs-zoomeOut {
+  -webkit-transform: none;
+  transform: none;
+}
diff --git a/web/pgadmin/templates/base.html b/web/pgadmin/templates/base.html
index c7a6174..e07536e 100755
--- a/web/pgadmin/templates/base.html
+++ b/web/pgadmin/templates/base.html
@@ -23,6 +23,12 @@
 
 
 
+
+var SHOW_ACITREE_ANIMATION = ('{{ config.SHOW_ACITREE_ANIMATION }}' === 'True') ? true : false;
+
+{% if not config.SHOW_ALERTIFY_ANIMATION %}
+
+{% endif%}
 
  
 {% block css_link %}{% endblock %}