Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-05-08 Thread Dave Page
Thanks - patch applied. On Mon, May 8, 2017 at 8:08 AM, Khushboo Vashi < khushboo.va...@enterprisedb.com> wrote: > Hi, > > Please find the attached updated patch. > > Thanks, > Khushboo > > On Fri, May 5, 2017 at 9:00 PM, Joao Pedro De Almeida Pereira < > jdealmeidapere...@pivotal.io> wrote: > >>

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-05-08 Thread Khushboo Vashi
Hi, Please find the attached updated patch. Thanks, Khushboo On Fri, May 5, 2017 at 9:00 PM, Joao Pedro De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hi Khushboo, > > We looked at your updated patch: > - the tests look good! > - there's a small comment header change needed in size

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-05-05 Thread Khushboo Vashi
Hi Joao & George, On Fri, May 5, 2017 at 9:00 PM, Joao Pedro De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hi Khushboo, > > We looked at your updated patch: > - the tests look good! > - there's a small comment header change needed in size_prettify_spec > ok. will change. > - it lo

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-05-05 Thread Joao Pedro De Almeida Pereira
Hi Khushboo, We looked at your updated patch: - the tests look good! - there's a small comment header change needed in size_prettify_spec - it looks like the previous and new functions have different behaviors (where the new behavior changes units on 1 of the lower unit, a GB) - We should

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-05-04 Thread Khushboo Vashi
Hi, Please find the attached updated patch. Thanks, Khushboo On Fri, Apr 28, 2017 at 7:58 PM, Matthew Kleiman wrote: > Hi Khushboo, > > That sounds good. Sorry if we weren't clear at first. > > Have a good holiday weekend! > > Sarah & Matt > > > On Fri, Apr 28, 2017 at 4:35 AM, Khushboo Vashi

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-28 Thread Matthew Kleiman
Hi Khushboo, That sounds good. Sorry if we weren't clear at first. Have a good holiday weekend! Sarah & Matt On Fri, Apr 28, 2017 at 4:35 AM, Khushboo Vashi < khushboo.va...@enterprisedb.com> wrote: > Hi Sarah, > > On Thu, Apr 27, 2017 at 7:38 PM, Sarah McAlear > wrote: > >> Hi Kushboo! >> >

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-28 Thread Khushboo Vashi
Hi Sarah, On Thu, Apr 27, 2017 at 7:38 PM, Sarah McAlear wrote: > Hi Kushboo! > > We understand your point, but we believe that relying on 2 independent > functions to deliver the same formatting can become a problem if the PG > function changes. Our suggestion is to use a single function in our

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-27 Thread Sarah McAlear
Hi Kushboo! We understand your point, but we believe that relying on 2 independent functions to deliver the same formatting can become a problem if the PG function changes. Our suggestion is to use a single function in our javascript code to do this formatting. If the community believes we can li

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-26 Thread Khushboo Vashi
Hi Joao & Sarah, On Wed, Apr 26, 2017 at 8:46 PM, Joao Pedro De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hi Khushboo! > > Thanks for your reply! > > >> *SQL Files:* >>> >>>- Is there a way to avoid conditionals here? >>> >>> >>>- Maybe we can use the same javascript functi

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-26 Thread Joao Pedro De Almeida Pereira
Hi Khushboo! Thanks for your reply! > *SQL Files:* >> >>- Is there a way to avoid conditionals here? >> >> >>- Maybe we can use the same javascript function to prettify all the >>sizes >> >> >> In case of collection node (ex: Databases), I have implemented this >> functionality via p

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-25 Thread Khushboo Vashi
Hi Joao & Sarah, Thanks for reviewing the patch. On Tue, Apr 25, 2017 at 8:34 PM, Joao Pedro De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hello Khushboo, > > We reviewed the this patch and have some suggestions: > > *Python:* > ​ > The functionality for adding the "can_prettify" i

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-25 Thread Dave Page
On Tue, Apr 25, 2017 at 4:04 PM, Joao Pedro De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hello Khushboo, > > We reviewed the this patch and have some suggestions: > > *Python:* > ​ > The functionality for adding the "can_prettify" is repeated in multiple > places. Maybe this could b

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-25 Thread Joao Pedro De Almeida Pereira
Hello Khushboo, We reviewed the this patch and have some suggestions: *Python:* ​ The functionality for adding the "can_prettify" is repeated in multiple places. Maybe this could be extracted into a function. *Javascript:* ​ - The class Backgrid.SizeFormatter doesn't seem to have any tests.

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-25 Thread Dave Page
Ashesh, can you review/commit this please? Thanks. On Tue, Apr 25, 2017 at 10:18 AM, Khushboo Vashi < khushboo.va...@enterprisedb.com> wrote: > Hi, > > Fixed RM #2315 : Sorting by size is broken. > > Removed the pg_size_pretty function from query for the collection and > introduced the client si

[pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2315 : Sorting by size is broken

2017-04-25 Thread Khushboo Vashi
Hi, Fixed RM #2315 : Sorting by size is broken. Removed the pg_size_pretty function from query for the collection and introduced the client side function to convert size into human readable format. So, the sorting issue is fixed as the algorithm will get the actual value of size instead of format