[pgAdmin4][patch] Correct handling of URL param values when striping version number

2018-08-16 Thread Aditya Toshniwal
Hi Hackers,

Attached is minor patch to correctly handle "values" in web/pgadmin/__init__.py
-> strip_version_number which can be None in some cases and will cause
exception when None .

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


StripVersionHandling.patch
Description: Binary data


Re: [pgAdmin4][RM2927] Move all CSS into SCSS files for consistency and ease of colour maintenance etc.

2018-08-16 Thread Dave Page
Hi

On Thu, Aug 16, 2018 at 6:14 AM, Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Wed, Aug 15, 2018 at 9:31 PM, Dave Page  wrote:
>
>> One more thought - can you please look at updating the style guide on the
>> website to be consistent? https://git.postgresql.org/gitweb/?p=pgadmin-
>> www.git;a=summary
>>
> Yes. Will start working on this.
>
>>
>> Thanks.
>>
>>
>> On Wed, Aug 15, 2018 at 1:17 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Aug 14, 2018 at 6:41 PM, Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Attached is the updated patch fixing the errors. I missed the linter in
 webpack.config.js :(

>>>
>>> That's better - thanks.
>>>
>>> A few thoughts:
>>>
>>> - The button bars now have the flat style, however disabled buttons are
>>> almost indistinguishable from enabled ones. If we're going to have a
>>> flatter style, then we need to make the foreground colour of the buttons
>>> much lighter when they're disabled.
>>>
>> I guess they are distinguishable :/ (below screenshots). Plus you will
> get a disabled mouse pointer on button hover (after I send the updated
> patch). If we need to change the colors of the button then we need to
> override bootstrap variables and compile the less files.
>
>
>
I mean the button bar on the Query Tool or Debugger (though I only looked
at the former).

BTW, you should grab the Sim Daltonism app from the app store on your Mac.
It shows you what the colours would look like to people with different
types of colour-blindness. It's very useful.



>
>
>>
>>> - I'm not keen on using $color-white/$color-black. That pre-supposes
>>> what the colours are, in which case we might as well just hard-code the
>>> values. How about $color-foreground/$color-background?
>>>
>> foreground/background is a good idea. It will be helpful in theming if we
> want a dark theme. All need to use these variables in places where no
> backgroud/foreground color is set in CSS classes. Will work on this.
>
>
>>
>>> - One thing we may want to do in the future is to have the option for
>>> alternate themes (or at least just a dark one). Do you know (no need to do
>>> it now - I'm just asking) if we've got enough of the colours in
>>> _default_variables.scss (and overridden elsewhere) to be able to do that?
>>>
>> I have covered all the hash codes used in pgAdmin4 defined CSS/SCSS
> files. But, if we want the complete theme then we need to override the
> external CSS or override the variables and compile the less/sass files
> (bootstrap). This is part is still not done.
>

Ack. Personally, I'd love a dark theme. Or even pluggable themes. That
would be awesome - but we have more important work first.


>
>>>
 I have noticed one more thing, templated CSS. We should remove it. For
 now I have skipped template css from webpack bundling.

>>>
>>> +1
>>>
>> Should this be done as part of this RM, or we need to create a separate
> one ?
>

A separate one I think.

Thanks!


>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> 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"
>



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

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


pgAdmin 4 commit: Correctly handle "values" in web/pgadmin/__init__.py

2018-08-16 Thread Dave Page
Correctly handle "values" in web/pgadmin/__init__.py -> strip_version_number 
which can be None in some cases and will cause exception when None

Branch
--
master

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

Modified Files
--
web/pgadmin/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Re: [pgAdmin4][patch] Correct handling of URL param values when striping version number

2018-08-16 Thread Dave Page
Thanks, applied.

On Thu, Aug 16, 2018 at 9:13 AM, Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is minor patch to correctly handle "values" in 
> web/pgadmin/__init__.py
> -> strip_version_number which can be None in some cases and will cause
> exception when None .
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>



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

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


[pgAdmin4][Patch]: Fixed issue where "Backup Globals" not working correctly

2018-08-16 Thread Akshay Joshi
Hi Hackers,

Attached is the patch to fix issue where "Backup Globals" not working
correctly. pg_dumpall utility runs without "--globals-only" flag even if
user click on "Backup Globals" menu . Also correct the regression test case
for it.

-- 
*Akshay Joshi*

*Sr. Software Architect *



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


Backup_Globals.patch
Description: Binary data


Re: [pgAdmin 4 - Bug #3556] Slash "/" in server group breaks table contents

2018-08-16 Thread Aditya Toshniwal
Hi Jan,

Could you please upgrade pgAdmin4 to 3.2 and give a try. I tried on 3.2,
works fine for me.
Let us know if you face the problem.

On Thu, Aug 16, 2018 at 5:13 PM, Jan Birk  wrote:

> Sure and sorry I didn't do it from the beginning:
>
>
> Version
> 3.0
> Copyright
> Copyright 2013 - 2018, The pgAdmin Development Team
> Python Version
> 2.7.5 (default, May 29 2017, 20:42:36) [GCC 4.8.5 20150623 (Red Hat
> 4.8.5-11)]
> Flask Version
> 0.12.2
> Application Mode
> Server
> Current User
> j...@stil.dk
>
> Thanks for a very fine product - we are very happy to use it and have a
> big benefit out of it.
>
> /Jan
>
>
>
> Den 16-08-2018 kl. 13:36 skrev redm...@postgresql.org:
>
> Issue #3556  has
> been updated by Aditya Toshniwal.
>
>- *File* slash-simulate-1.png
>
> 
>added
>
> Jan Birk wrote:
>
> Sure,
>
> I did mean servername and not servergroup name.
>
> The first screenshot is OK and then I rename servername from "Slash-Slash"
> to Slash/Slash" (reset layout) and now it breaks when selecting ex last 100
> rows... and returns " was not found on this server."
>
> A quick fix could bee to disallow use of "/" in servernames :-)
>
> Thanks for at very useful product.
>
> /Jan
>
> Hi Jan,
>
> I tried to simulate the steps and it works fine for me. Attached is the
> screenshot.
> Could you please let us know which version of pgAdmin4 are you using. The
> latest version is 3.2.
>
> Thanks.
> --
> Bug #3556: Slash "/" in server group breaks table contents
> 
>
>- Author: Jan Birk
>- Status: In Progress
>- Priority: Normal
>- Assignee: Aditya Toshniwal
>- Category:
>- Target version:
>- Platform: Web
>- Area: User Interface
>- Difficulty:
>- Sprint: EDB Sprint 21
>
> Hi
>
> If you make a servergroup and name it with slash'es ex "aaa/bbb" you will
> not be able til use sql's.
>
> Best
>
> /Jan
> Files pgadmin4-servername-ok.png
> 
> (82.2 KB)
> pgadmin-servername-not-ok.png
> 
> (49.1 KB)
> slash-simulate-1.png
> 
> (290 KB)
> --
>
> You have received this notification because you have either subscribed to
> it, or are involved in it.
> To change your notification preferences, please click here:
> https://redmine.postgresql.org/my/account
>
>
> --
>
>
> Med venlig hilsen / Best regards
>
> Jan Birk
> Høvedstensvej 13
> 2650 Hvidovre
> Mobile: +45 41741615
>
>


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


Re: [pgAdmin 4 - Bug #3556] Slash "/" in server group breaks table contents

2018-08-16 Thread Jan Birk

Den 16-08-2018 kl. 13:51 skrev Aditya Toshniwal:

Hi Jan,

Could you please upgrade pgAdmin4 to 3.2 and give a try. I tried on 
3.2, works fine for me.

Let us know if you face the problem.


Yes and thanks. It will take a few weeks but I will be back.

Best

/Jan



Re: [pgAdmin4][patch]: Feature #1407 - Support map view for PostGIS query result sets

2018-08-16 Thread Dave Page
Hi

That's looking more awesome each time I try it :-). I found just 3 things I
think need tweaking:

- The maps sometimes include links to Leaflet or OpenStreet Map. Clicking
these will open them in the current Query Tool tab. We need to ensure they
open in a new browser tab or window, not inside pgAdmin.

- The dialogue parent seems to be the Query Tool that opened it, which
doesn't seem unreasonable, except it means it can only be moved within the
confines of the Query Tool panel. Can we make the parent the browser window
itself, so the dialogue can be moved anywhere, much like any of the
properties dialogues?

- If you press the view button without selecting any rows, you get a
message saying "Please select some rows". I think that if no rows are
selected, instead of displaying that message, we should ensure the entire
resultset is load (as happens if you click the top-left column/row header)
and then render all rows.

Thanks!

On Wed, Aug 15, 2018 at 4:56 PM, Xuri Gong  wrote:

> Hi,
>
> I have updated the geometry viewer:
>
>- Increase geometry column width.
>- Remove per-row buttons and just display the row(s) that are selected.
>- Change the viewer panel to regular dialogue.
>- Update documents and libraries.txt file.
>
> Attached are the patch and screenshots. Please review it. Thank you.
>
> Xuri Gong  于2018年8月11日周六 下午9:23写道:
>
>> Hi Dave and Khushboo,
>>
>> Thank you very much for the suggestions and instructions. I will do that
>> and send the new patch soon.
>>
>> Khushboo Vashi  于2018年8月10日周五 下午1:15写道:
>>
>>> Hi Xuri,
>>>
>>> On Thu, Aug 9, 2018 at 3:52 PM, Dave Page  wrote:
>>>
 Hi

 On Wed, Aug 8, 2018 at 5:32 PM, Xuri Gong  wrote:

> Hi Dave
>
> Thanks for your feedback!
>
> 1) The column headers should be resized to take into account the
>> button size. It looks a little weird when they obscure the text.
>>
> I will resize the column and update the code style.
>

 Thanks.


>
> 2) It would be good to be able to select a subset of rows. The grid
>> already supports this... I'd suggest that the header button should 
>> display
>> only the row(s) that are currently selected. That would also allow the
>> removal of the per-row buttons.
>>
> Thanks for your nice idea! This can be implemented without much change
> in the current code. I am wondering if it is intuitive enough for users to
> firstly select row(s) and then click the column header button. What do you
> think?
>

 I think it will be. It's exactly how other operations work (e.g. Copy).
 They affect the whole grid, unless a subset is selected in which case they
 only affect that subset.


>
> 3) Can the panel be made into a regular dialogue, with a close button
>> and ability to resize and move it?
>
> Now the viewer can be resized by dragging the bottom right corner and
> it can't be moved. I tried adding frame but found it look not good(see the
> attached screenshot).
>

 Hmm. I think that is an improvement, but it needs to lose the
 status/button bar at the bottom and render the map over the entire canvas
 except the title bar. Oh, and of course, making it movable is important so
 users can resize and move it so they can see other things underneath it.

 Khushboo/Aditya - you've worked with the dialogues much more recently
 than I; can you give Xuri some pointers on how to do the above?

 To make the Alertify dialogue movable you can set movable to true in
>>> the options of the setup function of Alertify.
>>> For changing the footer, you can use this.elements.footer in the build
>>> function which will give you the footer div. So you can apply the css to
>>> hide it.
>>>
>>> To change the size of the dialogue, resizeTo function is available. So
>>> instead of writing elements.dialogue.style.height / weight, you can use
>>> this function also.
>>>
>>> Whenever we introduce a new JS library, we maintain the list in
>>> libraries.txt file. So you need to add the 'wkx' library to this file.
>>>
>>> Please let me know if you have any doubts.
>>>
>>> Thanks,
>>> Khushboo
>>>
 Thanks!


>
>
> Dave Page  于2018年8月7日周二 下午11:41写道:
>
>> Hi
>>
>> On Sat, Aug 4, 2018 at 1:27 PM, Xuri Gong 
>> wrote:
>>
>>> Hi,
>>>
>>> I have added documents for geometry viewer. Please review this newer
>>> patch.
>>>
>>> For test you can install PostGIS and import this database[1].
>>>
>>> Thank you!
>>>
>>> [1] https://drive.google.com/open?id=1NHWW4WPli7kxpuGaDFGVFLDXdc2D2
>>> 0wp
>>>
>>
>> I finally got a chance to play with this! It's pretty awesome - I
>> think some tweaks are needed to polish it off though:
>>
>> 1) The column headers should be resized to take into account the
>> button size. It looks a little wei

Re: [pgAdmin4][RM2927] Move all CSS into SCSS files for consistency and ease of colour maintenance etc.

2018-08-16 Thread Dave Page
Hi

That looks much better... but, did you get the right shades of grey? They
seem to have a slight green hint to them.

On Thu, Aug 16, 2018 at 10:42 AM, Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Dave/Hackers,
>
> Please find attached the updated patch.
>
> On Thu, Aug 16, 2018 at 1:45 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Aug 16, 2018 at 6:14 AM, Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Wed, Aug 15, 2018 at 9:31 PM, Dave Page  wrote:
>>>
 One more thought - can you please look at updating the style guide on
 the website to be consistent? https://git.postgr
 esql.org/gitweb/?p=pgadmin-www.git;a=summary

>>> Yes. Will start working on this.
>>>

 Thanks.


 On Wed, Aug 15, 2018 at 1:17 PM, Dave Page  wrote:

> Hi
>
> On Tue, Aug 14, 2018 at 6:41 PM, Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the updated patch fixing the errors. I missed the linter
>> in webpack.config.js :(
>>
>
> That's better - thanks.
>
> A few thoughts:
>
> - The button bars now have the flat style, however disabled buttons
> are almost indistinguishable from enabled ones. If we're going to have a
> flatter style, then we need to make the foreground colour of the buttons
> much lighter when they're disabled.
>
 I guess they are distinguishable :/ (below screenshots). Plus you will
>>> get a disabled mouse pointer on button hover (after I send the updated
>>> patch). If we need to change the colors of the button then we need to
>>> override bootstrap variables and compile the less files.
>>>
>>>
>>>
>> I mean the button bar on the Query Tool or Debugger (though I only looked
>> at the former).
>>
>> BTW, you should grab the Sim Daltonism app from the app store on your
>> Mac. It shows you what the colours would look like to people with different
>> types of colour-blindness. It's very useful.
>>
> I have over-riden bootstrap class
>
> for such buttons to make foreground more lighter. The app helped, thanks.
>
>>
>>
>>
>>>
>>>

> - I'm not keen on using $color-white/$color-black. That pre-supposes
> what the colours are, in which case we might as well just hard-code the
> values. How about $color-foreground/$color-background?
>
 foreground/background is a good idea. It will be helpful in theming if
>>> we want a dark theme. All need to use these variables in places where no
>>> backgroud/foreground color is set in CSS classes. Will work on this.
>>>
>>>

> - One thing we may want to do in the future is to have the option for
> alternate themes (or at least just a dark one). Do you know (no need to do
> it now - I'm just asking) if we've got enough of the colours in
> _default_variables.scss (and overridden elsewhere) to be able to do that?
>
 I have added few more variables and should be enough. pgAdmin4 has
> limited number of colors
>
> and the current variables should be enough.
>
>> I have covered all the hash codes used in pgAdmin4 defined CSS/SCSS
>>> files. But, if we want the complete theme then we need to override the
>>> external CSS or override the variables and compile the less/sass files
>>> (bootstrap). This is part is still not done.
>>>
>>
>> Ack. Personally, I'd love a dark theme. Or even pluggable themes. That
>> would be awesome - but we have more important work first.
>>
> Moving to Bootstrap 4 will make it more easier :P
>
>
>>
>>
>>>
>
>> I have noticed one more thing, templated CSS. We should remove it.
>> For now I have skipped template css from webpack bundling.
>>
>
> +1
>
 Should this be done as part of this RM, or we need to create a separate
>>> one ?
>>>
>>
>> A separate one I think.
>>
> RM3574  created.
>
>
>>
>> Thanks!
>>
>>
>>>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



 --
 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"
>>>
>>
>>
>>
>> --
>> 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"
>



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

EnterpriseDB UK: http://www.enterprisedb

Re: [pgAdmin4][RM2927] Move all CSS into SCSS files for consistency and ease of colour maintenance etc.

2018-08-16 Thread Aditya Toshniwal
Hi,

On Thu, Aug 16, 2018 at 6:01 PM, Dave Page  wrote:

> Hi
>
> That looks much better... but, did you get the right shades of grey? They
> seem to have a slight green hint to them.
>
I tried to get the correct ones. And we can always change them, its SASS.
:-D


>
> On Thu, Aug 16, 2018 at 10:42 AM, Aditya Toshniwal  enterprisedb.com> wrote:
>
>> Hi Dave/Hackers,
>>
>> Please find attached the updated patch.
>>
>> On Thu, Aug 16, 2018 at 1:45 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Aug 16, 2018 at 6:14 AM, Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 On Wed, Aug 15, 2018 at 9:31 PM, Dave Page  wrote:

> One more thought - can you please look at updating the style guide on
> the website to be consistent? https://git.postgr
> esql.org/gitweb/?p=pgadmin-www.git;a=summary
>
 Yes. Will start working on this.

>
> Thanks.
>
>
> On Wed, Aug 15, 2018 at 1:17 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Tue, Aug 14, 2018 at 6:41 PM, Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the updated patch fixing the errors. I missed the linter
>>> in webpack.config.js :(
>>>
>>
>> That's better - thanks.
>>
>> A few thoughts:
>>
>> - The button bars now have the flat style, however disabled buttons
>> are almost indistinguishable from enabled ones. If we're going to have a
>> flatter style, then we need to make the foreground colour of the buttons
>> much lighter when they're disabled.
>>
> I guess they are distinguishable :/ (below screenshots). Plus you will
 get a disabled mouse pointer on button hover (after I send the updated
 patch). If we need to change the colors of the button then we need to
 override bootstrap variables and compile the less files.



>>> I mean the button bar on the Query Tool or Debugger (though I only
>>> looked at the former).
>>>
>>> BTW, you should grab the Sim Daltonism app from the app store on your
>>> Mac. It shows you what the colours would look like to people with different
>>> types of colour-blindness. It's very useful.
>>>
>> I have over-riden bootstrap class
>>
>> for such buttons to make foreground more lighter. The app helped, thanks.
>>
>>>
>>>
>>>


>
>> - I'm not keen on using $color-white/$color-black. That pre-supposes
>> what the colours are, in which case we might as well just hard-code the
>> values. How about $color-foreground/$color-background?
>>
> foreground/background is a good idea. It will be helpful in theming if
 we want a dark theme. All need to use these variables in places where no
 backgroud/foreground color is set in CSS classes. Will work on this.


>
>> - One thing we may want to do in the future is to have the option for
>> alternate themes (or at least just a dark one). Do you know (no need to 
>> do
>> it now - I'm just asking) if we've got enough of the colours in
>> _default_variables.scss (and overridden elsewhere) to be able to do that?
>>
> I have added few more variables and should be enough. pgAdmin4 has
>> limited number of colors
>>
>> and the current variables should be enough.
>>
>>> I have covered all the hash codes used in pgAdmin4 defined CSS/SCSS
 files. But, if we want the complete theme then we need to override the
 external CSS or override the variables and compile the less/sass files
 (bootstrap). This is part is still not done.

>>>
>>> Ack. Personally, I'd love a dark theme. Or even pluggable themes. That
>>> would be awesome - but we have more important work first.
>>>
>> Moving to Bootstrap 4 will make it more easier :P
>>
>>
>>>
>>>

>>
>>> I have noticed one more thing, templated CSS. We should remove it.
>>> For now I have skipped template css from webpack bundling.
>>>
>>
>> +1
>>
> Should this be done as part of this RM, or we need to create a
 separate one ?

>>>
>>> A separate one I think.
>>>
>> RM3574  created.
>>
>>
>>>
>>> Thanks!
>>>
>>>

>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> 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"

>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> T

Re: [pgAdmin4][RM2927] Move all CSS into SCSS files for consistency and ease of colour maintenance etc.

2018-08-16 Thread Dave Page
On Thu, Aug 16, 2018 at 1:33 PM, Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi,
>
> On Thu, Aug 16, 2018 at 6:01 PM, Dave Page  wrote:
>
>> Hi
>>
>> That looks much better... but, did you get the right shades of grey? They
>> seem to have a slight green hint to them.
>>
> I tried to get the correct ones. And we can always change them, its SASS.
> :-D
>
>

Sure, but I'm assigning that task to you :-p

Can you please look at v3.2, and check if the button background, toolbar
background and code mirror gutters all have the same resulting colours in
your patch?

Thanks :-)



>
>> On Thu, Aug 16, 2018 at 10:42 AM, Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Dave/Hackers,
>>>
>>> Please find attached the updated patch.
>>>
>>> On Thu, Aug 16, 2018 at 1:45 PM, Dave Page  wrote:
>>>
 Hi

 On Thu, Aug 16, 2018 at 6:14 AM, Aditya Toshniwal <
 aditya.toshni...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Wed, Aug 15, 2018 at 9:31 PM, Dave Page  wrote:
>
>> One more thought - can you please look at updating the style guide on
>> the website to be consistent? https://git.postgr
>> esql.org/gitweb/?p=pgadmin-www.git;a=summary
>>
> Yes. Will start working on this.
>
>>
>> Thanks.
>>
>>
>> On Wed, Aug 15, 2018 at 1:17 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Aug 14, 2018 at 6:41 PM, Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Attached is the updated patch fixing the errors. I missed the
 linter in webpack.config.js :(

>>>
>>> That's better - thanks.
>>>
>>> A few thoughts:
>>>
>>> - The button bars now have the flat style, however disabled buttons
>>> are almost indistinguishable from enabled ones. If we're going to have a
>>> flatter style, then we need to make the foreground colour of the buttons
>>> much lighter when they're disabled.
>>>
>> I guess they are distinguishable :/ (below screenshots). Plus you
> will get a disabled mouse pointer on button hover (after I send the 
> updated
> patch). If we need to change the colors of the button then we need to
> override bootstrap variables and compile the less files.
>
>
>
 I mean the button bar on the Query Tool or Debugger (though I only
 looked at the former).

 BTW, you should grab the Sim Daltonism app from the app store on your
 Mac. It shows you what the colours would look like to people with different
 types of colour-blindness. It's very useful.

>>> I have over-riden bootstrap class
>>>
>>> for such buttons to make foreground more lighter. The app helped, thanks.
>>>



>
>
>>
>>> - I'm not keen on using $color-white/$color-black. That pre-supposes
>>> what the colours are, in which case we might as well just hard-code the
>>> values. How about $color-foreground/$color-background?
>>>
>> foreground/background is a good idea. It will be helpful in theming
> if we want a dark theme. All need to use these variables in places where 
> no
> backgroud/foreground color is set in CSS classes. Will work on this.
>
>
>>
>>> - One thing we may want to do in the future is to have the option
>>> for alternate themes (or at least just a dark one). Do you know (no 
>>> need to
>>> do it now - I'm just asking) if we've got enough of the colours in
>>> _default_variables.scss (and overridden elsewhere) to be able to do 
>>> that?
>>>
>> I have added few more variables and should be enough. pgAdmin4 has
>>> limited number of colors
>>>
>>> and the current variables should be enough.
>>>
 I have covered all the hash codes used in pgAdmin4 defined CSS/SCSS
> files. But, if we want the complete theme then we need to override the
> external CSS or override the variables and compile the less/sass files
> (bootstrap). This is part is still not done.
>

 Ack. Personally, I'd love a dark theme. Or even pluggable themes. That
 would be awesome - but we have more important work first.

>>> Moving to Bootstrap 4 will make it more easier :P
>>>
>>>


>
>>>
 I have noticed one more thing, templated CSS. We should remove it.
 For now I have skipped template css from webpack bundling.

>>>
>>> +1
>>>
>> Should this be done as part of this RM, or we need to create a
> separate one ?
>

 A separate one I think.

>>> RM3574  created.
>>>
>>>

 Thanks!


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

pgAdmin 4 commit: Fix passing of --globals-only to global backups.

2018-08-16 Thread Dave Page
Fix passing of --globals-only to global backups.

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/backup/__init__.py   | 4 ++--
web/pgadmin/tools/backup/tests/test_backup_create_job_unit_test.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)



Re: [pgAdmin4][Patch]: Fixed issue where "Backup Globals" not working correctly

2018-08-16 Thread Dave Page
Thanks, applied.

On Thu, Aug 16, 2018 at 11:14 AM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to fix issue where "Backup Globals" not working
> correctly. pg_dumpall utility runs without "--globals-only" flag even if
> user click on "Backup Globals" menu . Also correct the regression test
> case for it.
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>



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

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


[pgadmin4][patch] GreenPlum error while checking roles SQL

2018-08-16 Thread Joao De Almeida Pereira
Hi Hackers,

Attached you can find a patch that will correct issue #3578

The SQL command used to retrieve the SQL for the Role does not work,
because it as a piece of it that is intended for Postgres > 9.0.

Thanks
Joao
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/role/sql/post8_4/sql.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/role/sql/post8_4/sql.sql
index 642009e0..d3cb081b 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/role/sql/post8_4/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/role/sql/post8_4/sql.sql
@@ -59,35 +59,6 @@ FROM
 		oid=%(rid)s::OID
 	) r
 ) a) b)
--- PostgreSQL >= 9.0
-UNION ALL
-(SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
-FROM
-	(SELECT
-		'ALTER ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) ||
-		' SET ' || param|| ' TO ' ||
-		CASE
-		WHEN param IN ('search_path', 'temp_tablespaces') THEN value
-		ELSE quote_literal(value)
-		END || ';' AS sql
-	FROM
-		(SELECT
-			datname, split_part(rolconfig, '=', 1) AS param, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value
-		FROM
-			(SELECT
-d.datname, unnest(c.setconfig) AS rolconfig
-			FROM
-(SELECT *
-FROM
-	pg_catalog.pg_db_role_setting dr
-WHERE
-	dr.setrole=%(rid)s::OID AND dr.setdatabase!=0) c
-LEFT JOIN pg_catalog.pg_database d ON (d.oid = c.setdatabase)
-			) a
-		) b
-	) d
-)
 UNION ALL
 (SELECT
 	'COMMENT ON ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) || ' IS ' ||  pg_catalog.quote_literal(description) || ';' AS sql