Re: [pgAdmin4][Patch]: Dashboard requests don't stop even after closing the panel

2017-07-28 Thread Dave Page
Ashesh, can you deal with this please? Thanks.

On Thu, Jul 27, 2017 at 6:20 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> If we close the Dashboard tab even then the requests don't stop. This is
> the regression of web-packing of browser.js file.
> Please find the attached patch for the same.
>
> Thanks,
> Khushboo
>



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

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


Re: [pgAdmin4][Patch]: RM_2596 - Query tool not working in Desktop Runtime on Mac OS X

2017-07-28 Thread Dave Page
Ashesh, can you deal with this please? Thanks.

On Fri, Jul 28, 2017 at 8:12 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> I inspect the react code and in call stacks, found `process.env.NODE_ENV`
> is undefined due to which 'SyntheticEvent.call' is not callable.
>
> So, to fix this, i add 'definePlugin' to plugins for `dev` environment in
> `webpack.config.js`. Initially it was added only for `production`
> environment. but it is needed for both, because React code is conditional
> based on environment variables set.
>
> Please find attached patch and review.
>
> Thanks,
> Surinder
>



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

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


Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard

2017-07-28 Thread Dave Page
On Fri, Jul 28, 2017 at 12:24 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Fri, Jul 28, 2017 at 4:11 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Hi
>>
>> I took a quick look at this and have a couple of thoughts:
>>
>> - Instead of the "edit" icon to open the subnode, we should use something
>> more appropriate - a "properties" icon perhaps.
>>
>> I used default subnode's edit icon for consistency purpose.
> What if we go with caret-right <http://fontawesome.io/icon/caret-right/>
> and caret-down <http://fontawesome.io/icon/caret-down/> icons?
>

That could work.


> - There seems to be a lot of different shades of grey on there (maybe a
>> subnode design in general that just shows up with the disabled controls),
>> and the subnode control looks a bit messy as a result.
>>
>> Can you work with Chethana to improve the look and feel please?
>>
>> Do you mean only colours or subnode control design itself?
>

The colours, and possibly the borders etc. If Chethana comes up with an
improved look and feel for subnodes in general, I'm not against changing
them all.


> Input from others welcome of course - screenshot attached.
>>
>> Thanks.
>>
>> On Fri, Jul 28, 2017 at 11:33 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> ++ Attaching the patch
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Fri, Jul 28, 2017 at 4:02 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> PFA patch to display additional information from pg_stat_activity table
>>>> using subnode control.
>>>> RM#2597
>>>>
>>>> Please review.
>>>>
>>>> --
>>>> Regards,
>>>> Murtuza Zabuawala
>>>> EnterpriseDB: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>> On Tue, Jul 25, 2017 at 10:56 AM, Shirley Wang <sw...@pivotal.io>
>>>> wrote:
>>>>
>>>>>
>>>>>> On Mon, Jul 24, 2017 at 8:11 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jul 24, 2017 at 3:28 PM, Shirley Wang <sw...@pivotal.io>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> 2-3 days is a lot of valuable engineering time. Is this a 'drop
>>>>>>>> everything now' kind of feature or can this wait for some user 
>>>>>>>> validation
>>>>>>>> on a mock up first?
>>>>>>>>
>>>>>>>
>>>>>>> Most of the time will likely be on the infrastructure to change the
>>>>>>> display to a subnode control. If you have some cycles to mockup 
>>>>>>> potential
>>>>>>> layouts for the subnode view and have them validated, please feel free,
>>>>>>> however, that seems like an awful lot of work to me to display some 
>>>>>>> missing
>>>>>>> SQL using a standard control.
>>>>>>>
>>>>>> Regarding SQL display: Developing simple control to show codemirror
>>>>>> in disabled state (for now) wont take that much time.
>>>>>>
>>>>>>
>>>>> Part of a product designer's job is to make sure there is a definitive
>>>>> need for a feature and that the interface for the feature is designed in
>>>>> such a way that the user gets all intended value from it. Time spent
>>>>> validating now will decrease the time spent later on redesigning /
>>>>> reimplementing.
>>>>>
>>>>> If everyone is aware of what that value is and confident that how
>>>>> it'll be displayed is right, there's little risk in starting to develop 
>>>>> it.
>>>>> If we're wrong, it'll add to feature bloat and detract from the 
>>>>> experience.
>>>>>
>>>>> Would Chethana be able to take on some of the design work? It would be
>>>>> valuable for the dev team to also be part of design process.
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> 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


Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard

2017-07-28 Thread Dave Page
Hi

I took a quick look at this and have a couple of thoughts:

- Instead of the "edit" icon to open the subnode, we should use something
more appropriate - a "properties" icon perhaps.

- There seems to be a lot of different shades of grey on there (maybe a
subnode design in general that just shows up with the disabled controls),
and the subnode control looks a bit messy as a result.

Can you work with Chethana to improve the look and feel please?

Input from others welcome of course - screenshot attached.

Thanks.

On Fri, Jul 28, 2017 at 11:33 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> ++ Attaching the patch
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Jul 28, 2017 at 4:02 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA patch to display additional information from pg_stat_activity table
>> using subnode control.
>> RM#2597
>>
>> Please review.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Tue, Jul 25, 2017 at 10:56 AM, Shirley Wang <sw...@pivotal.io> wrote:
>>
>>>
>>>> On Mon, Jul 24, 2017 at 8:11 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Jul 24, 2017 at 3:28 PM, Shirley Wang <sw...@pivotal.io>
>>>>> wrote:
>>>>>
>>>>>> 2-3 days is a lot of valuable engineering time. Is this a 'drop
>>>>>> everything now' kind of feature or can this wait for some user validation
>>>>>> on a mock up first?
>>>>>>
>>>>>
>>>>> Most of the time will likely be on the infrastructure to change the
>>>>> display to a subnode control. If you have some cycles to mockup potential
>>>>> layouts for the subnode view and have them validated, please feel free,
>>>>> however, that seems like an awful lot of work to me to display some 
>>>>> missing
>>>>> SQL using a standard control.
>>>>>
>>>> Regarding SQL display: Developing simple control to show codemirror in
>>>> disabled state (for now) wont take that much time.
>>>>
>>>>
>>> Part of a product designer's job is to make sure there is a definitive
>>> need for a feature and that the interface for the feature is designed in
>>> such a way that the user gets all intended value from it. Time spent
>>> validating now will decrease the time spent later on redesigning /
>>> reimplementing.
>>>
>>> If everyone is aware of what that value is and confident that how it'll
>>> be displayed is right, there's little risk in starting to develop it. If
>>> we're wrong, it'll add to feature bloat and detract from the experience.
>>>
>>> Would Chethana be able to take on some of the design work? It would be
>>> valuable for the dev team to also be part of design process.
>>>
>>
>>
>


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

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


Re: [pgAdmin4][Patch]: Fixed RM #2603 - Import/Export File issues

2017-07-28 Thread Dave Page
Ashesh, can you deal with this please? Thanks.

On Thu, Jul 27, 2017 at 5:08 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix the RM #2603: Import/Export File
> issues.
>
> Fixed Issues:
>  1. Couldn't click on the File Control once gets an error
>  2. The encoding is not in alphabetical order
>
> Thanks,
> Khsuhboo
>



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

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


Re: Unified server/desktop config

2017-08-17 Thread Dave Page
Thanks. Out of interest, what changes were required?

All, this reinforces to me that this should be a v2.0 change. Other
thoughts?

On Mon, Aug 14, 2017 at 4:59 AM, Bing Xu <b...@pivotal.io> wrote:

> Hi hackers,
>
> We've reviewed this patch and it need us changing our own config_local.py
> file. It's ok and we'll do the change in our configuration.
>
> Thanks,
> Bing & Violet
>
> On Wed, Aug 9, 2017 at 8:49 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> This patch includes the fix where this patch breaks when feature tests
>> are run.
>>
>> Set builtins.SERVER_MODE if it is present in globals()['SERVER_MODE']
>> else set to None.
>>
>> Please find updated patch.
>> Thanks,
>> Surinder
>> ​
>>
>> On Wed, Aug 9, 2017 at 11:57 AM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Sure, I will update.
>>>
>>> On Wed, Aug 9, 2017 at 11:17 AM, Dave Page <dp...@pgadmin.org> wrote:
>>>
>>>> Please update the patch :-)
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK:http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>> On 9 Aug 2017, at 05:53, Surinder Kumar <surinder.kumar@enterprisedb.c
>>>> om> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I noticed that test cases don’t run and I got an error:
>>>>
>>>> (pgAdmin_27)Laptop195:regression surinder$ python runtests.py --pkg 
>>>> feature_tests
>>>> 
>>>> Traceback (most recent call last):
>>>>   File "runtests.py", line 45, in 
>>>> import config
>>>>   File "/Users/surinder/Documents/Projects/pgadmin4/web/config.py", line 
>>>> 121, in 
>>>> if builtins.SERVER_MODE is None:
>>>> AttributeError: 'module' object has no attribute'
>>>> SERVER_MODE
>>>> '
>>>>
>>>> I think this is because we are setting​ ​first​ ​builtins.SERVER_MODE​ in​ 
>>>> ​pgAdmin4.py
>>>> but in test cases pgAdmin4.py is not being called.​
>>>>
>>>>
>>>> On Tue, Aug 8, 2017 at 4:03 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Aug 8, 2017 at 11:27 AM, Surinder Kumar <
>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>
>>>>>> On Tue, Aug 8, 2017 at 1:47 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> On Tue, Aug 8, 2017 at 7:18 AM, Surinder Kumar <
>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> On Ubuntu-14.04, I got error Application Server couldn't be
>>>>>>>> contacted:
>>>>>>>>
>>>>>>>> *Steps performed:*
>>>>>>>>
>>>>>>>>- I have already installed pgAdmin4-1.4 which come with
>>>>>>>>PostgreSQL-9.6 installer.
>>>>>>>>then I run root@ubuntu:/opt/PostgreSQL/9.6/pgAdmin 4/bin#
>>>>>>>>./pgAdmin4./.
>>>>>>>>- Now took latest git pull from HEAD
>>>>>>>>- Apply unified_config.diff patch.
>>>>>>>>- Then compiled pgAdmin4 in runtime and then run ./pgAdmin.
>>>>>>>>- Got error Application Server couldn't be contacted.
>>>>>>>>
>>>>>>>> But when I ran ./pgAdmin4 for the second time. pgAdmin4 runs
>>>>>>>> without any issue.
>>>>>>>> I didn’t get any error on the terminal and log file.
>>>>>>>> ​ I couldn't find why it gives this error.​
>>>>>>>>
>>>>>>>
>>>>>>> I know Fahar has run into this with existing releases on Ubuntu. If
>>>>>>> you enable debugging, can you see any clues? I assume it's going round 
>>>>>>> the
>>>>>>> retry loop before aborting?
>>>>>>>
>>>>>>>> *Another issue related to Alembic:*
>>>&

pgAdmin 4 commit: Revert "Open query tool and debugger windows in new t

2017-07-07 Thread Dave Page
Revert "Open query tool and debugger windows in new tabs by default."

This reverts commit 1a6fe946ce69736a4b9af8bcd79568f907fa383a.

This is going to break the regression tests, so reverting it for now.

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/debugger/__init__.py  | 2 +-
web/pgadmin/tools/sqleditor/__init__.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Fix handling of CREATE TABLE OF . Fixes #2534

2017-07-07 Thread Dave Page
Fix handling of CREATE TABLE OF . Fixes #2534

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d151bdb4cd9b6038864dc9596d279860628cb70f
Author: Harshal Dhumal 

Modified Files
--
.../databases/schemas/tables/static/js/table.js| 32 --
.../tables/templates/table/sql/default/create.sql  |  2 +-
2 files changed, 24 insertions(+), 10 deletions(-)



Re: [RM2534][pgAdmin4] Fix issues related to table OF TYPE property.

2017-07-07 Thread Dave Page
Thanks, applied.

On Fri, Jul 7, 2017 at 2:41 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch to fix issue related to table OF TYPE property.
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: 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


pgAdmin 4 commit: Fix alert animation on IE11

2017-07-07 Thread Dave Page
Fix alert animation on IE11

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=08e874a0266e56f07ec61cbeed1173c249a2311f
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/static/scss/_alert.scss  |  1 +
web/pgadmin/static/scss/_alertify.overrides.scss | 16 ++--
2 files changed, 11 insertions(+), 6 deletions(-)



pgAdmin 4 commit: Open query tool and debugger windows in new tabs by d

2017-07-07 Thread Dave Page
Open query tool and debugger windows in new tabs by default.

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/debugger/__init__.py  | 2 +-
web/pgadmin/tools/sqleditor/__init__.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-12 Thread Dave Page


> On 12 Jul 2017, at 02:56, Ashesh Vashi <ashesh.va...@enterprisedb.com> wrote:
> 
>> On Tue, Jul 11, 2017 at 10:29 PM, Surinder Kumar 
>> <surinder.ku...@enterprisedb.com> wrote:
>> Robert, 
>> 
>> I have attached two patches:
>> 
>> 1. webpack_bundles.patch
>> 
>> 2. unvendor_files.patch
>> 
>> in this email chain.
>> 
>> If you didn't received those patches possibly due to large size of patch, 
>> let me know i will send again.
> Dave,
> 
> I don't see these two patches too in the mail-chain.
> By any chance, it is stalled.

They're way too big for the mailing lists (>13MB). Please have Surinder send 
you them privately.

> 
> -- Thanks, Ashesh 
>> 
>> 
>>> On Tue, Jul 11, 2017 at 10:24 PM, Robert Eckhardt <reckha...@pivotal.io> 
>>> wrote:
>>> Surinder, 
>>> 
>>> Sorry I'm missing the email can you tell me the name please. 
>>> 
>>> -- Rob
>>> 
>>>> On Tue, Jul 11, 2017 at 12:51 PM, Surinder Kumar 
>>>> <surinder.ku...@enterprisedb.com> wrote:
>>>>> On Tue, Jul 11, 2017 at 10:18 PM, Robert Eckhardt <reckha...@pivotal.io> 
>>>>> wrote:
>>>> 
>>>>> The last email on this chain from Surinder says that it isn't working on 
>>>>> IE and he will submit another patch. Are we missing that patch? Would you 
>>>>> like us to look at the previous patch?
>>>> 
>>>> ​Yes previous patch includes fix related to IE.​
>>>>> 
>>>>> -- Rob
>>>>> 
>>>>> 
>>>>>> On Jul 11, 2017 11:37 AM, "Dave Page" <dave.p...@enterprisedb.com> wrote:
>>>>>> Pivotal team; you guys are far more familiar with webpack etc. than we 
>>>>>> are; could you review please?
>>>>>> 
>>>>>> Thanks!
>>>>>> 
>>>>>>> On Tue, Jul 11, 2017 at 4:24 PM, Surinder Kumar 
>>>>>>> <surinder.ku...@enterprisedb.com> wrote:
>>>>>>> Hi
>>>>>>> 
>>>>>>> 1) Created a separated patch for Un-vendored libraries and another one 
>>>>>>> related to webpack bundle files so it is easy to review.
>>>>>>> 
>>>>>>> 2) Removed commented out code and dead code.
>>>>>>> 
>>>>>>> 3) Feature test cases are fixed. All are running.
>>>>>>> I have to add `time.sleep` of 1 second in method 
>>>>>>> 'fill_codemirror_area_with' as sometimes it work and sometimes don't.
>>>>>>> 
>>>>>>> 4. Removed unused libraries from package.json
>>>>>>> 
>>>>>>> Please find updated patch and review.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Surinder
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On Tue, Jul 11, 2017 at 3:11 PM, Surinder Kumar 
>>>>>>>> <surinder.ku...@enterprisedb.com> wrote:
>>>>>>>> Hi
>>>>>>>> 
>>>>>>>> This patch doesn't work in windows IE 11 due to error `'Promise' is 
>>>>>>>> undefined​`​.
>>>>>>>> 
>>>>>>>> The dependency package 'babel-polyfill' is required to run ES6 code 
>>>>>>>> with webpack and has to load before at entry point of app.
>>>>>>>> related thread
>>>>>>>> 
>>>>>>>> Please find updated patch.
>>>>>>>> 
>>>>>>>> Thanks
>>>>>>>> Surinder
>>>>>>>> 
>>>>>>>>> On Tue, Jul 11, 2017 at 2:13 PM, Dave Page 
>>>>>>>>> <dave.p...@enterprisedb.com> wrote:
>>>>>>>>> Nice!
>>>>>>>>> 
>>>>>>>>>> On Tue, Jul 11, 2017 at 9:42 AM, Neel Patel 
>>>>>>>>>> <neel.pa...@enterprisedb.com> wrote:
>>>>>>>>>> Hi Dave,
>>>>>>>>>> 
>>>>>>>>>> I have tested Surinder's patch in my local machine with Qt 5.9.1 
>>>>>>>>>> Webkit on Windows and we are getting improvements with this patch. :)
>>>>>>>>>> 
>>

Re: More RHEL 6 build issues

2017-07-12 Thread Dave Page
Hi

On Tue, Jul 11, 2017 at 5:40 PM, Devrim Gündüz <dev...@gunduz.org> wrote:

>
> Hi Dave,
>
> On Tue, 2017-07-11 at 12:26 +0100, Dave Page wrote:
> > Anyway; the attached patch fixes the issue for me. I wonder if this is
> some
> > CentOS weirdness...
>
> Thanks, that fixed this issue. We have now another one:
>
> Exception occurred:
>   File 
> "/usr/lib/python2.6/site-packages/pgadmin4-web/flask_sqlalchemy/__init__.py",
> line 25, in 
> from sqlalchemy import orm, event, inspect
> ImportError: cannot import name event


I have no idea what would cause that. Are you using a version of any Python
component that differs from whats in requirements.txt?

The reason I ask is that we have automated regression tests on Python 2.6,
and they're passing just fine - so whatever you do on CentOS 6 should as
well.

You can see from the test output at
https://jenkins.pgadmin.org/job/pgadmin4-master-python26/lastSuccessfulBuild/consoleText
what packages are being used (the installations are fairly near the top).

Note that the second PIP run (which starts with pyperclip) is for the
components in web/regression/requirements.txt, which are only required to
run the regression tests.

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

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


Re: pgadmin-for-web is going nowhere

2017-07-14 Thread Dave Page
On Thu, Jul 13, 2017 at 6:23 PM, Josh Berkus <j...@berkus.org> wrote:

> Folks,
>
> Installing pgadmin-for-web is painful, poorly documented, and broken.
> As a result, it's not considered a real UI by anyone not on this team.
>

Have you re-read the docs since I told you some time back that I was
updating them? As far as I can see they cover every step now, in detail.

https://www.pgadmin.org/docs/pgadmin4/1.x/server_deployment.html

Setting up in server mode by following those docs takes just a few minutes.


> Six months ago, I jumped on this with the goal of solving it, partly
> through use of linux containers.  However, I'm full stop because of the
> emphasis on (a) having only one package which is both desktop and web,
> and (b) treating the web version as the ugly stepchild.
>

It's not an ugly step-child - it's a non-default configuration because the
majority of users use desktop mode. There's a big difference.


>
> See: https://redmine.postgresql.org/issues/2495#change-7635


Right - your suggestion there was reverted because it became quickly clear
that it broke the default desktop mode.


>
>
> If you read the conversation on pgsql-advocacy, for example, you'll see
> that even people in our own community regard pgAdmin4 as not production
> quality software.
>

Yes - and in every case I'm aware of, that is either because of a Qt
performance issue on Windows which is now resolved, or because the reported
considered that it needed a particular feature for their use-case (the
majority of which have now been implemented anyway). That does not stop it
being production quality; there are many users using it daily quite
successfully.


> As such, I'm done.  When y'all decide to get real with caring about
> users' ability to install pgadmin for web, ping me.
>

Oh, we care. That's why it's well documented and takes just a few easy
steps - and why for some time now I've been wracking my brain about ways to
make it even easier. There are a bunch of pgAdmin containers on Docker Hub
available, few, if any of which were setup with the help of our mailing
lists, so it's presumably not that hard to do. Either that or the Docker
guys have thicker skins than the Project Atomic guys :-)

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

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


Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-17 Thread Dave Page
c.js:6411

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "jquery"
  at
regression/javascript/slickgrid/event_handlers/handle_query_output_keyboard_event_spec.js:6411

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "jquery"
  at regression/javascript/sqleditor_utils_spec.js:125

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "jquery"
  at regression/javascript/sqleditor_utils_spec.js:125

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "jquery"
  at pgadmin/static/bundle/slickgrid.js:1008

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  Error: Cannot find module "jquery"
  at pgadmin/static/bundle/slickgrid.js:1008

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

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


Re: pgAdmin 4 v1.6 Released!

2017-07-17 Thread Dave Page
On Fri, Jul 14, 2017 at 1:58 PM, Pawel Hadam <had...@gmail.com> wrote:

> Thank you Dave and Khushboo for advises.
>
> 1) (re)moving 'pgadmin4.db' - did not help.
>
> 2) I have disabled teredo - did not help.
>
> 3) localhost is resolved to IPv6 address:
>
> $ ping localhost
>
> Pinging ogrodowa [::1] with 32 bytes of data:
> Reply from ::1: time<1ms
> Reply from ::1: time<1ms
> Reply from ::1: time<1ms
> Reply from ::1: time<1ms
>
> 4) I DO use IPv4 as well.
>
> 5) No entries for localhost in hosts file.
>
> 6) On which address/port the server should be listening?
>
> $ netstat -a | grep LISTEN | grep "127.0.0.1"
>   TCP127.0.0.1:3212 ogrodowa:0 LISTENING
>   TCP127.0.0.1:3213 ogrodowa:0 LISTENING
>   TCP127.0.0.1:4370 ogrodowa:0 LISTENING
>   TCP127.0.0.1:4371 ogrodowa:0 LISTENING
>   TCP127.0.0.1:4380 ogrodowa:0 LISTENING
>   TCP127.0.0.1:4381 ogrodowa:0 LISTENING
>   TCP127.0.0.1:5037 ogrodowa:0 LISTENING
>   TCP127.0.0.1:9990 ogrodowa:0 LISTENING
>   TCP127.0.0.1:3ogrodowa:0 LISTENING
>   TCP127.0.0.1:49674ogrodowa:0 LISTENING
>
> 7) ping to 127.0.0.1 works well:
>
> $ ping 127.0.0.1
>
> Pinging 127.0.0.1 with 32 bytes of data:
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
>
>
> Not sure what else I need to check...
>

In the web/ subdirectory of the installation, you should find a file called
config.py. Please create a file called config_local.py in the same
directory, containing the following lines (excluding the  lines) :


from config import *

# Debug mode
DEBUG = True

# Log
CONSOLE_LOG_LEVEL = DEBUG
FILE_LOG_LEVEL = DEBUG


Then, try to start pgAdmin. That should create a more useful logfile in
%APPDATA%\pgAdmin to share with us.

Thanks.

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

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


pgAdmin 4 commit: Show tablespace on partitions. Fixes #2551

2017-07-17 Thread Dave Page
Show tablespace on partitions. Fixes #2551

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=07aa74eaf56db72eab55dd735c710a4796abd669
Author: Harshal Dhumal 

Modified Files
--
.../templates/partition/sql/10_plus/create.sql |  8 -
.../servers/databases/schemas/tables/utils.py  | 41 +++---
2 files changed, 28 insertions(+), 21 deletions(-)



Re: [RM2551][pgAdmin4] show tablespace on partitions.

2017-07-17 Thread Dave Page
Thanks, applied.

On Wed, Jul 12, 2017 at 11:23 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch to show tablespace on partitions.
> Also reformatted sql slightly in sql tab.
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: 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


Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard

2017-07-17 Thread Dave Page
Hi

On Thu, Jul 13, 2017 at 2:53 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> hiHi,
>
> PFA patch to add functionality which will allow super user to cancel long
> running queries from dashboard.
> RM#1812
>
> *Steps used to test:*
> 1) Open psql session, Connect to 'test' database on respective server
> 2) Execute "select pg_sleep(1000);"
> 3) Open pgAdmin4
> 4) Connect to respective server
> 5) Click on Dashboard
> 6) Check "Sessions" tab under "Server activity" section then look for
> active sessions for test database.
> 7) Click on cancel button and cancel the active session
> 8) Check psql session now, you will see "ERROR:  canceling statement due
> to user request"
>
> Some comments:

- The action here is to cancel the active query in the backend, not the
session - so messages etc. should say things like "Cancel Active Query?"

- The grid should refresh following the cancel operation.

- Can you fix the vertical alignment while you're working on this? The new
button really makes the poor alignment stand out.

- This should not be superuser only - regular users should be able to
cancel their own queries.

- On PG10, background workers are also shown in the dashboard. Should we
prevent attempts to cancel their work (they'll fail anyway I believe).

Thanks!

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

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


Re: pgadmin-for-web is going nowhere

2017-07-17 Thread Dave Page
On Fri, Jul 14, 2017 at 7:17 PM, Josh Berkus <j...@berkus.org> wrote:

> On 07/14/2017 01:01 AM, Dave Page wrote:
>
> > Setting up in server mode by following those docs takes just a few
> minutes.
> >
> >
> > Six months ago, I jumped on this with the goal of solving it, partly
> > through use of linux containers.  However, I'm full stop because of
> the
> > emphasis on (a) having only one package which is both desktop and
> web,
> > and (b) treating the web version as the ugly stepchild.
> >
> >
> > It's not an ugly step-child - it's a non-default configuration because
> > the majority of users use desktop mode. There's a big difference.
>
> Er, no, there's not.  That's *exactly* what I mean by "ugly-step-child".
>  The current project attitude is "we test desktop mode, and if web mode
> works, well, that's a happy accident."
>

Except, that's not the case. The regression tests run through a browser,
not the desktop runtime, and like Rob's team at Pivotal, my team mostly
works through the browser as well as it's far easier to debug that way.

Web mode is also the only supported mode of operation for Postgres
Enterprise Manager which is based on pgAdmin 4, so it gets a ton of testing
as part of that as well.

So no, it's not an "ugly stepchild", it gets more testing and use than
desktop mode. It's just not the default.


>
> I'm not going to recommend pgadmin-for-web to anyone under those
> circumstances.  And *of course* the majority of users use desktop mode,
> given that web mode doesn't work out of the box, and sometimes doesn't
> work at all.
>
> > As such, I'm done.  When y'all decide to get real with caring about
> > users' ability to install pgadmin for web, ping me.
> >
> >
> > Oh, we care. That's why it's well documented and takes just a few easy
> > steps - and why for some time now I've been wracking my brain about ways
> > to make it even easier.
>
> Here's how to make it easier: don't require steps.  Really.  If someone
> installs pgadmin-for-web using RPMs or Debs, it should Just Work.  The
> changes in the tickets I filed will make that happen for the RPMs,
> except that you rejected them as WONTFIX.
>

The changes you proposed would break the desktop mode, which is what most
people use. Why do you consider your use case more important to work out of
the box than the more common use case? Or are you ignoring the reasons why
your suggested changes were rejected?


>
> Part of the problem there is that the pgadmin-for-web RPM spec really
> needs to be completely separate from pgadmin-for-desktop.
>

You are misunderstanding what the RPM is for. It's not "pgadmin-for-web",
it's "pgadmin-web-components".


>
> > There are a bunch of pgAdmin containers on
> > Docker Hub available, few, if any of which were setup with the help of
> > our mailing lists, so it's presumably not that hard to do. Either that
> > or the Docker guys have thicker skins than the Project Atomic guys :-)
>
> That's because docker hub is the "wild west" where people are willing to
> hack whatever toghether whether or not it's maintainable or updated. For
> the Fedora & CentOS projects, there's requirements that builds have to
> be 100% reproduceable, which most of the time means RPMs.  My goal was
> to make pgadmin-for-web available officially on Fedora & CentOS, and
> that's what I'm giving up on.
>

So what do you require? Install RPMs and run, with zero additional config?
That seems to be what you are asking for, but I don't see that it would
ever be possible because at the very least you'll need to do "systemctl
enable httpd".

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

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


pgAdmin 4 commit: Fix proxy support with Qt 5.9+

2017-07-11 Thread Dave Page
Fix proxy support with Qt 5.9+

Branch
--
master

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

Modified Files
--
runtime/pgAdmin4.cpp | 5 +
1 file changed, 5 insertions(+)



Re: More RHEL 6 build issues

2017-07-11 Thread Dave Page
On Tue, Jul 11, 2017 at 12:09 PM, Devrim Gündüz <dev...@gunduz.org> wrote:

>
> Hi,
>
> Sorry, I missed this part:
>
> On Tue, 2017-07-11 at 11:44 +0100, Dave Page wrote:
> > It was fixed in the code:
> >
> >  # HTMLMIN doesn't work with Python 2.6.
> > if not config.DEBUG and sys.version_info >= (2,7):
> > HTMLMIN(app)
> >
> > Though, we do have an unconditional import (both in
> > web/pgadmin/__init__.py).
> >
> > Does the app run?
>
> We even cannot build it.
>
>
I just tried it on CentOS 6 here, and the app runs, but the docs don't
build. That's weird, considering
https://jenkins.pgadmin.org/job/pgadmin4-master-python26/lastSuccessfulBuild/
.

Anyway; the attached patch fixes the issue for me. I wonder if this is some
CentOS weirdness...

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py
index 4389e96b..55c59732 100644
--- a/web/pgadmin/__init__.py
+++ b/web/pgadmin/__init__.py
@@ -16,7 +16,6 @@ from importlib import import_module
 
 from flask import Flask, abort, request, current_app, session
 from flask_babel import Babel, gettext
-from flask_htmlmin import HTMLMIN
 from flask_login import user_logged_in
 from flask_security import Security, SQLAlchemyUserDatastore
 from flask_mail import Mail
@@ -146,6 +145,9 @@ def create_app(app_name=None):
 if not app_name:
 app_name = config.APP_NAME
 
+if not config.DEBUG and sys.version_info >= (2,7):
+from flask_htmlmin import HTMLMIN
+
 """Create the Flask application, startup logging and dynamically load
 additional modules (blueprints) that are found in this directory."""
 app = PgAdmin(__name__, static_url_path='/static')

Re: Windows testing required: Updated runtime

2017-07-11 Thread Dave Page
Hi

The candidate build can be found at
https://developer.pgadmin.org/~dpage/1.6/.

Note that as the timing is coupled with the PostgreSQL 10b2 release, we'll
only rewrap now for showstopper issues, not anything minor.

On Tue, Jul 11, 2017 at 1:14 PM, Mike Surcouf <mi...@surcouf.co.uk> wrote:

> Hi Dave
>
>
>
> Can I suggest you send out another build before you go GA.
>
> I for one have outstanding issues that were not in 1.3 (see previous
> emails).
>
> I know you said you don’t have my issues on your install but that doesn’t
> mean they don’t exist.
>
>
>
> Happy to test
>
>
>
> Thanks
>
>
>
> Mike
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 11 July 2017 13:11
> *To:* McDonaldR
> *Cc:* pgadmin-hackers; pgAdmin Support
> *Subject:* Re: Windows testing required: Updated runtime
>
>
>
> Hi
>
>
>
> On Tue, Jul 11, 2017 at 10:03 AM, McDonaldR <mcdona...@angus.gov.uk>
> wrote:
>
> Hi Dave,
>
>
>
> I’m testing the latest build (10/7/2017) from your download page.
>
>
>
> I had a v1.5 build that fixed issues with the proxy server. It took ~30
> secs from start to usable.  Before that I could only run the v1.3 release.
>
>
>
> This new build starts in about 9 seconds showing the splash screen and
> then it crashes with a *Fatal Error: The application server could not be
> contacted*.
>
>
>
> There is nothing in the Event Viewer logs and the pgAdmin log is empty in
> C:\Users\username\AppData\Roaming\pgAdmin
>
>
>
> The registry key in HKEY_CURRENT_USER\Software\pgadmin\pgadmin4 is blank
> with a value not set.
>
>
>
> Windows 7 Enterprise 64 bit
>
> 16GB RAM
>
> SSD
>
> Behind the corporate proxy and firewall
>
>
>
> Thanks - this should be fixed for GA.
>
>
>
> --
>
> 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


Re: More RHEL 6 build issues

2017-07-11 Thread Dave Page
On Tue, Jul 11, 2017 at 11:21 AM, Devrim Gündüz <dev...@gunduz.org> wrote:

>
> Hi,
>
> I thought we fixed it at some point, but I'm recently getting this again:
>
> in the web/config.py, I changed
> MINIFY_PAGE = True
>
> to False.
>

Never modify config.py! You should be using config_distro.py.


>
> Still getting
>
> sphinx-1.0-build -b html -d _build/doctrees   . _build/html
> Making output directory...
> Running Sphinx v1.0.8
>
> Exception occurred:
>   File "/usr/lib/python2.6/site-packages/pgadmin4-web/flask_htmlmin.py",
> line 1, in 
> from htmlmin.main import minify
> ImportError: No module named main
>

It was fixed in the code:

 # HTMLMIN doesn't work with Python 2.6.
if not config.DEBUG and sys.version_info >= (2,7):
HTMLMIN(app)

Though, we do have an unconditional import (both in
web/pgadmin/__init__.py).

Does the app run?

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

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


pgAdmin 4 commit: Straighten line

2017-07-11 Thread Dave Page
Straighten line

Branch
--
master

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

Modified Files
--
web/pgadmin/dashboard/static/img/welcome_logo.png | Bin 22526 -> 22603 bytes
1 file changed, 0 insertions(+), 0 deletions(-)



Re: Windows testing required: Updated runtime

2017-07-11 Thread Dave Page
On Tue, Jul 11, 2017 at 4:14 PM, Mike Surcouf <mi...@surcouf.co.uk> wrote:

> > Try pressing Ctrl 0 (Control zero)
>
>
>
> Yes that did it.
>
> I also needed to reset layout for it to stick.
>

OK, good.


>
>
> Start-up time still 25 secs to dash board so still slow for me (sorry but
> it’s a fact).
>
> For comparison Server install start up is 5 seconds to dash board.
>

Hmm, that is still slow. I get about 11 seconds on Windows 10, running on
VMware on my MacBook Pro. Any AV software etc. that may be slowing things?


>
>
> 1.   Does the desktop support GSSAPI.  It doesn’t seem to work for me
> (I get error FATAL: GSSAPI authentication failed for user "postgres").   
> Server
> install works fine.
>
No - PostgreSQL builds on Windows dropped GSSAPI in favour of SSPI some
years ago. That functionality is provided by the underlying libpq, not
pgAdmin - though pgAdmin 1.6 does allow you to specify the host address as
well as hostname/address which many people need with Kerberos for example.

>
>
> 2.   Did you webpack all the things for 1.6?
>
No, unfortunately the patch wasn't ready. I have a WIP version, and it's
looking good; Neel reported the following using the runtime you have:

*Before Webpack patch:-*

It took ~20 seconds. This 20 seconds includes when user double click on
application ( timing of python server start + page load )

*After Webpack patch:-*

It took ~13 seconds ( timing of python server start + page load ).

We got ~7 seconds improvement with webpack on same machine & same Qt
configuration and this will be useful in windows performance issue as well
:)

 I expect this to be in 1.7, which we'll aim to get out fairly quickly
(vacations allowing)

>
>
> 3.   Will there be a web install package.
>
There is a source tarball and Python wheel available at
http://developer.pgadmin.org/~dpage/1.6/

 Thanks!

>
>
> Thanks
>
>
>
> Mike
>
>
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 11 July 2017 15:43
> *To:* Mike Surcouf
> *Cc:* McDonaldR; pgadmin-hackers; pgAdmin Support
> *Subject:* Re: Windows testing required: Updated runtime
>
>
>
> Hi
>
>
>
> On Tue, Jul 11, 2017 at 2:47 PM, Mike Surcouf <mi...@surcouf.co.uk>
> wrote:
>
> Hi Dave
>
>
>
> v1.6
>
> Show splash then backround of main window then hangs forever. pgadmin4.log
> is 0 bytes
>
>
>
> Try pressing Ctrl 0 (Control zero) to reset the zoom level. The
> experimental ActiveQt build used a different scaling factor for the zoom
> which may have been saved in the registry. I found that on my machine - it
> had zoomed in so far that I just had a few pixels expanded to fit the
> screen.
>
>
>
> v1.3
>
> Uninstalled then reinstalled 1.3 (which was the last version that
> worked).and all is ok again
>
>
>
> But I guess it works on your machine so it must be something wrong with my
> setup
>
>
>
> Hard to see what though, if it's not the zoom. I have tested on Windows 7
> as well as Windows 10, so it *should* work.
>
>
>
> --
>
> 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


Re: [pgadmin-hackers][pgaweb][patch] Website patch to add SCSS

2017-07-11 Thread Dave Page
Hi

On Mon, Jul 10, 2017 at 7:16 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
>
> In this email you will be able to find the first patches to start the
> migration of the Styleguide from http://pgadmin4-styleguide.cfapps.io/ to
> the pgadmin.org webpage.
>
> The first patch adds a Readme to the project and also the yarn.lock file
> The second patch:
> - Adds SCSS processor to Django
>

Hmm, seems like the dependencies are broken. Adding them throws me down
what seems like a rabbit hole of manual installation, starting with:

(pgaweb) piranha:pgaweb dpage$ pip install -r requirements.txt
Requirement already satisfied: Django==1.8.18 in
/Users/dpage/.virtualenvs/pgaweb/lib/python2.7/site-packages (from -r
requirements.txt (line 1))
Requirement already satisfied: psycopg2==2.7.1 in
/Users/dpage/.virtualenvs/pgaweb/lib/python2.7/site-packages (from -r
requirements.txt (line 2))
Collecting libsass==0.13.2 (from -r requirements.txt (line 3))
  Using cached libsass-0.13.2.tar.gz
Could not import setuptools which is required to install from a source
distribution.
Traceback (most recent call last):
  File
"/Users/dpage/.virtualenvs/pgaweb/lib/python2.7/site-packages/pip/req/req_install.py",
line 387, in setup_py
import setuptools  # noqa
  File
"/Users/dpage/.virtualenvs/pgaweb/lib/python2.7/site-packages/setuptools/__init__.py",
line 10, in 
from six.moves import filter, map
ImportError: No module named six.moves

Perhaps the entire dependency tree should be added to requirements.txt?


> - Scripts to yarn to compile the SCSS and run the application
>
- Add startapp.sh script to start the application
>

The application runs under uWSGI - it's not going to be started via a
script. It's auto-updated periodically from git, and uWSGI will restart
when necessary so if any pre-processing of files is required, that needs to
be done at startup automatically.


> - Changes the current pgaweb.css file to SCSS
>

OK.


> - Update README with new instructions
>

- The "Add initial pgAdmin4 version" should be changed to describe loading
the fixture data from each of the various modules that seed the database.
e.g.

./manage.py loaddata ./download/fixtures/packages.json
./manage.py loaddata ./download/fixtures/distributions.json
./manage.py loaddata ./download/fixtures/versions.json
./manage.py loaddata ./download/fixtures/downloads.json
./manage.py loaddata ./faq/fixtures/categories.json
./manage.py loaddata ./faq/fixtures/faqs.json
./manage.py loaddata ./news/fixtures/news.json
./manage.py loaddata ./versions/fixtures/versions.json

- s/PGAdmin/pgAdmin

- We can remove the part about using sqlite for the DB. This is a Postgres
project after all :-)

Thanks.

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

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


Re: Windows testing required: Updated runtime

2017-07-11 Thread Dave Page
Nice! Thanks for the feedback.

On Tue, Jul 11, 2017 at 3:35 PM, McDonaldR <mcdona...@angus.gov.uk> wrote:

> Yes!
>
>
>
> Installed quickly.
>
> Splash screen to gui window about 7 secs and then another few secs to
> usable.
>
> Much more responsive.
>
> Expanding elements in tree is snappy.
>
>
>
> I’ll test it some more tomorrow with connections to a production database.
>
>
>
> Ross
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 11 July 2017 13:52
> *To:* Mike Surcouf
> *Cc:* McDonaldR; pgadmin-hackers; pgAdmin Support
>
> *Subject:* Re: Windows testing required: Updated runtime
>
>
>
> Hi
>
>
>
> The candidate build can be found at https://developer.pgadmin.
> org/~dpage/1.6/.
>
>
>
> Note that as the timing is coupled with the PostgreSQL 10b2 release, we'll
> only rewrap now for showstopper issues, not anything minor.
>
>
>
> On Tue, Jul 11, 2017 at 1:14 PM, Mike Surcouf <mi...@surcouf.co.uk> wrote:
>
> Hi Dave
>
>
>
> Can I suggest you send out another build before you go GA.
>
> I for one have outstanding issues that were not in 1.3 (see previous
> emails).
>
> I know you said you don’t have my issues on your install but that doesn’t
> mean they don’t exist.
>
>
>
> Happy to test
>
>
>
> Thanks
>
>
>
> Mike
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 11 July 2017 13:11
> *To:* McDonaldR
> *Cc:* pgadmin-hackers; pgAdmin Support
> *Subject:* Re: Windows testing required: Updated runtime
>
>
>
> Hi
>
>
>
> On Tue, Jul 11, 2017 at 10:03 AM, McDonaldR <mcdona...@angus.gov.uk>
> wrote:
>
> Hi Dave,
>
>
>
> I’m testing the latest build (10/7/2017) from your download page.
>
>
>
> I had a v1.5 build that fixed issues with the proxy server. It took ~30
> secs from start to usable.  Before that I could only run the v1.3 release.
>
>
>
> This new build starts in about 9 seconds showing the splash screen and
> then it crashes with a *Fatal Error: The application server could not be
> contacted*.
>
>
>
> There is nothing in the Event Viewer logs and the pgAdmin log is empty in
> C:\Users\username\AppData\Roaming\pgAdmin
>
>
>
> The registry key in HKEY_CURRENT_USER\Software\pgadmin\pgadmin4 is blank
> with a value not set.
>
>
>
> Windows 7 Enterprise 64 bit
>
> 16GB RAM
>
> SSD
>
> Behind the corporate proxy and firewall
>
>
>
> Thanks - this should be fixed for GA.
>
>
>
> --
>
> 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
>
>
> This message is strictly confidential. If you have received this in error,
> please inform the sender and remove it from your system. If received in
> error you may not copy, print, forward or use it or any attachment in any
> way. This message is not capable of creating a legal contract or a binding
> representation and does not represent the views of Angus Council. Emails
> may be monitored for security and network management reasons. Messages
> containing inappropriate content may be intercepted. Angus Council does not
> accept any liability for any harm that may be caused to the recipient
> system or data on it by this message or any attachment.
>



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

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


Re: Windows testing required: Updated runtime

2017-07-11 Thread Dave Page
Hi

On Tue, Jul 11, 2017 at 2:47 PM, Mike Surcouf <mi...@surcouf.co.uk> wrote:

> Hi Dave
>
>
>
> v1.6
>
> Show splash then backround of main window then hangs forever. pgadmin4.log
> is 0 bytes
>

Try pressing Ctrl 0 (Control zero) to reset the zoom level. The
experimental ActiveQt build used a different scaling factor for the zoom
which may have been saved in the registry. I found that on my machine - it
had zoomed in so far that I just had a few pixels expanded to fit the
screen.


> v1.3
>
> Uninstalled then reinstalled 1.3 (which was the last version that
> worked).and all is ok again
>
>
>
> But I guess it works on your machine so it must be something wrong with my
> setup
>

Hard to see what though, if it's not the zoom. I have tested on Windows 7
as well as Windows 10, so it *should* work.

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

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


Re: Windows testing required: Updated runtime

2017-07-11 Thread Dave Page
On Tue, Jul 11, 2017 at 4:56 PM, Mike Surcouf <mi...@surcouf.co.uk> wrote:

> >No - PostgreSQL builds on Windows dropped GSSAPI in favour of SSPI some
> years ago. That functionality is provided by the underlying libpq, not
> pgAdmin - though pgAdmin 1.6 does allow you to specify the host address as
> >well as hostname/address which many people need with Kerberos for example.
>
>
>
> Not sure I understand this.
>
> Windows works fine with gssapi (the server is on a linux box).
>
> I make gssapi connections all the time with npgsql library and the web
> version of pgadmin and terminal software so I don’t have to use passwords.
>
> It just doesn’t seem to work with the desktop version of pgadmin.
>

We rely entirely on libpq to handle this side of things, which means we're
reliant on how it was built on a particular platform. On Windows, GSSAPI
was dropped in favour of SSPI many years ago. I'm not familiar with either
though, so I can't say what will or won't work - just that if it works with
libpq on Windows, it should work with pgAdmin.


>
>
> *>Before Webpack patch:-*
>
>
>
> >It took ~20 seconds. This 20 seconds includes when user double click on
> application ( timing of python server start + page load )
>
>
>
> So Neel also gets 20 second start up (before webpack) .  At least it’s not
> just me.  I look forward to having those 7 secs.
>

He is on a virtual machine though.


>
>
> On a more positive note I do find the browsing of nodes and retrieving
> table SQL seems to be snappier in 1.6.
>

Yes, I've found that. As it turns out, we're actually not using the
ActiveQT port that Neel worked on. It looks like Qt (or the fork of
QtWebKit we use) fixed the underlying issue.


>
>
> >Will there be a web install package.
>
>
>
> What I meant was will there be a pgadmin4-v1-web package update.
>

Oh, right - yeah, Devrim was working on that earlier today.


>
>
> Oh and as an aside I think you made the right decision going with a web
> app.  It’s definitely the future .
>
> After these performance problems have been addressed.
>
> It’s not easy creating a feature rich web app and I appreciate all the
> work you guys have done on this.
>

Thank you.


> Just keep an open mind that your end users may have issues you don’t.
> There are so many environmental factors to consider.
>

Oh, after over 20 years in IT support and software development, I've become
painfully aware of that :-).


>
>
> Mike
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 11 July 2017 16:36
>
> *To:* Mike Surcouf
> *Cc:* McDonaldR; pgadmin-hackers; pgAdmin Support
> *Subject:* Re: Windows testing required: Updated runtime
>
>
>
>
>
>
>
> On Tue, Jul 11, 2017 at 4:14 PM, Mike Surcouf <mi...@surcouf.co.uk>
> wrote:
>
> > Try pressing Ctrl 0 (Control zero)
>
>
>
> Yes that did it.
>
> I also needed to reset layout for it to stick.
>
>
>
> OK, good.
>
>
>
>
>
> Start-up time still 25 secs to dash board so still slow for me (sorry but
> it’s a fact).
>
> For comparison Server install start up is 5 seconds to dash board.
>
>
>
> Hmm, that is still slow. I get about 11 seconds on Windows 10, running on
> VMware on my MacBook Pro. Any AV software etc. that may be slowing things?
>
>
>
>
>
> 1.   Does the desktop support GSSAPI.  It doesn’t seem to work for me
> (I get error FATAL: GSSAPI authentication failed for user "postgres").   
> Server
> install works fine.
>
> No - PostgreSQL builds on Windows dropped GSSAPI in favour of SSPI some
> years ago. That functionality is provided by the underlying libpq, not
> pgAdmin - though pgAdmin 1.6 does allow you to specify the host address as
> well as hostname/address which many people need with Kerberos for example.
>
>
>
> 2.   Did you webpack all the things for 1.6?
>
> No, unfortunately the patch wasn't ready. I have a WIP version, and it's
> looking good; Neel reported the following using the runtime you have:
>
>
>
> *Before Webpack patch:-*
>
>
>
> It took ~20 seconds. This 20 seconds includes when user double click on
> application ( timing of python server start + page load )
>
>
>
> *After Webpack patch:-*
>
>
>
> It took ~13 seconds ( timing of python server start + page load ).
>
>
>
> We got ~7 seconds improvement with webpack on same machine & same Qt
> configuration and this will be useful in windows performance issue as well
> :)
>
>
>
>  I expect this to be in 1.7, which we'll aim to get out fairly quickly
> (vacations allowing)
>
>
>
> 3.   Will there 

pgAdmin 4 commit: Fix a compiler error with older compilers.

2017-07-11 Thread Dave Page
Fix a compiler error with older compilers.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=de06e63334ba041df6de4ba5a91e1650a9d8f024
Author: Mammoth Power 

Modified Files
--
runtime/splash.png | Bin 28131 -> 13559 bytes
1 file changed, 0 insertions(+), 0 deletions(-)



pgAdmin 4 commit: Use the correct font for alerts on IE.

2017-07-10 Thread Dave Page
Use the correct font for alerts on IE.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=907c5fe1984ead9d1df1c7d0dbe458f9ab607488
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/static/scss/_alert.scss | 2 ++
1 file changed, 2 insertions(+)



Re: [pgadmin4][patch] fix history panel on ie11

2017-07-10 Thread Dave Page
Thanks, applied.

On Sat, Jul 8, 2017 at 12:03 AM, Sarah McAlear <smcal...@pivotal.io> wrote:

> Hi Hackers!
>
> This patch fixes the layout issues on IE11. There is a known issue on
> react-split-pane that requires a previous version of bowser in order to
> render correctly on IE11. We had to downgrade the version of bowser to
> 1.6.1 until the relevant pull request to react-split-pane has been accepted.
>
> Thanks!
> Sarah & Rob
>
>
>


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

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


pgAdmin 4 commit: Fix alignment of Object > delete/drop & properties ic

2017-07-10 Thread Dave Page
Fix alignment of Object > delete/drop & properties icons

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2bfe640a081cc59a22453c3db847817406cb6651
Author: Surinder Kumar 

Modified Files
--
web/pgadmin/static/css/bootstrap.overrides.css | 8 
1 file changed, 8 deletions(-)



Re: [pgAdmin4][Patch]: Fixed #2550 declarative partitioning - drop/delete and drop cascade is not working for partition table

2017-07-10 Thread Dave Page
Thanks, applied.

On Mon, Jul 10, 2017 at 3:28 PM, Akshay Joshi <akshay.jo...@enterprisedb.com
> wrote:

> Hi All
>
> Attached is the patch file to fix the RM #2550, where user will not be
> able to drop/drop cascade partitions. Apart from that RM this patch
> contains following fix:
>
>- Update the SQL query to fix the jenkins build.
>- Use AlertifyWrapper in Partition.js
>- Fix the icon while 'truncate table' and 'reset statistics'.
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *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: Fix history font on IE.

2017-07-10 Thread Dave Page
Fix history font on IE.

Branch
--
master

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

Modified Files
--
web/pgadmin/static/scss/_typography.scss | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-11 Thread Dave Page
es using `require` and
> `import` calls.
>
> *TODO:*
>
> ​1) Automatically handle static and template JS files: This is already
> being discussed. Once it is sorted out, we will change webpack
> configuration accordingly.
>
> 2) Implementing Caching: I will look into this once an initial patch is
> commited. and later on add as improvement.
>
> 3) Source maps: It will help in debugging bundled JS code in production
> environment.
>
> 4) Feature tests are failing: I am currently looking into it. Query tool
> functionality is working fine, the issue is it is unable to find code
> mirror.
>
> *Steps to run:*
>
> ​After applying patch:* git apply --binary /path/to/patch*
>
> run* `yarn install`*
> then run:
>
> *​*In development mode:
> *yarn run bundle:dev*
>
> In production mode:
> *yarn run bundle:prod​*​
>
> *Performance comparison:*
>
> On Mac's Chrome - Before bundle it was taking ~9sec to load page. After
> bundle it took 3.5secs (with no cache)
>
> Please review the patch.
>
> Thanks,
> Surinder
>
>
> On Wed, Jul 5, 2017 at 8:22 PM, Sarah McAlear <smcal...@pivotal.io> wrote:
>
>> Hello,
>>
>>
>>> *​Things to discuss:*
>>>
>>> How to differentiate between a static and template JS
>>> ​​
>>> .
>>>
>>
>> What is the advantage of webpacking templated JS? It seems as though this
>> creates a system in which the bundled dependencies have to refer back to
>> the backend to load the templates.
>>
>> If there is a performance win in packing templated JS then looking at it
>> makes sense.  Otherwise it may make sense to put off until it is clear that
>> the templated files should be dealt with by either de-templating them or
>> bundling them where there is a clear reason.
>>
>> However, we're wondering about possible performance penalties with
>> templating larger files (as opposed to templating on-demand.) Since jinja
>> templates can execute arbitrary python, this could get time expensive and
>> further slow things like initial page-load.
>> Another concern is: what happens when a template gets out of date (e.g.
>> if browser.js had previously filled in the content for 'panel_item.content'
>> and had been cached, would it render a new version with the new values when
>> needed? Or is it possible that we would get old content?)
>>
>>
>>> *Taks remaining:*
>>>
>>> ​1. ​
>>> Fix local variables which are declared without using var, have to check
>>> in each file
>>> ​ by​
>>>  running eslint (For now, i will fix only errors which are giving error
>>> in browser).
>>>
>>> ​2. ​
>>> Move non-template files from ’templates’ to ’static’ directory. List of
>>> ​ pending​
>>>  modules is here:
>>>
>>>- Tools (mostly all modules - 9 modules)
>>>- Browser nodes - 3 modules(resource group, roles, tablespace)
>>>- ​About
>>>​​
>>>
>>> Also can we move
>>> ​'​
>>> dashboard, statistic
>>> ​s​
>>> , preferences and help
>>> ​'​
>>>  modules inside misc to preserve modularity as pgAdmin is modular
>>> ​ ?​
>>>
>>
>> Is there anything from a organization stance you discussed in the
>> previous email that needs to be done to make this usable and consistent?
>>
>>
>> Thanks,
>>
>> George & Sarah
>>
>
>


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

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


pgAdmin 4 commit: Ensure dependencies are packaged in the tarball

2017-07-11 Thread Dave Page
Ensure dependencies are packaged in the tarball

Branch
--
master

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

Modified Files
--
pkg/src/build.sh | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)



Re: Windows testing required: Updated runtime

2017-07-07 Thread Dave Page
Hi

On Fri, Jul 7, 2017 at 9:20 AM, Mike Surcouf <mi...@surcouf.co.uk> wrote:

> Hi Dave
>
>
>
> 30 second start-up so still very slow for me.
>

That's strange - I get < 12s even on my underpowered virtual machine.

What spec machine are you running? Can you try with AV disabled?


>
>
> Consistently get an exception when closing( see attachment)
>

Also strange. I do not see that. Is there any more info in the event log
etc?


>
>
> Did webpack not make it?
>
> I still get 167 requests on start up.
>

The basic infrastructure is there now, and we've made almost all the JS
code static now so it avoids the templating engine, but there's still work
to do to pack it all.

Thanks.


>
>
> Thanks
>
>
>
> Mike
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 06 July 2017 15:59
> *To:* pgadmin-hackers; pgAdmin Support
> *Subject:* Windows testing required: Updated runtime
>
>
>
> All,
>
>
>
> I've put an interim build of pgAdmin 4 at https://developer.pgadmin.
> org/~dpage/pgadmin4-1.5-x86.exe for Windows users. This build uses a work
> in progress patch to replace the slow Qt components with ActiveQt + the
> Microsoft web browser control to significantly improve performance.
>
>
>
> The version also includes close to 100 other bug fixes and changes, most
> noticeably performance improvements in the Query Tool that make it
> significantly faster than pgAdmin 3 with large result sets, and the ability
> to open the Query Tool and Debugger in new tabs that can be dragged onto
> different windows and therefore displays.
>
>
>
> If you have the ability, please give it a test and let me know how it
> performs. There are some known issues that we're working on:
>
>
>
> - The Query Tool History view isn't rendered correctly.
>
>
>
> - Closing a tab is now detected when there's a dirty query tool window in
> it, but closing the window containing the tab is not.
>
>
>
> - Inactive tabs have no visual definition between them.
>
>
>
> - When dragging a tab, the mouse icon changes to one with a stop sign in
> it.
>
>
>
> - If you close the last tab in a child window, it doesn't close the window.
>
>
>
> - Popout alerts don't display correctly.
>
>
>
> 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


Re: Windows testing required: Updated runtime

2017-07-07 Thread Dave Page
If you've done that, then you really have removed everything except for a
handful of registry entries. To completely start over you should:

- Uninstall pgAdmin
- Ensure the original installation directory is removed entirely.
- Remove "%APPDATA%\pgAdmin" (not %APPDATA%\pgAdmin4)
- Remove "HKEY_CURRENT_USER\Software\pgadmin" from the registry
- Restart (probably not required, but...)
- Reinstall pgAdmin.


On Fri, Jul 7, 2017 at 10:29 AM, Mike Surcouf <mi...@surcouf.co.uk> wrote:

> IN addition I uninstalled removed everything in %APPDATA%\pgadmin4 and
> programfiles and restarted reinstalled.
>
> Also trying with AV disabled.
>
> Unfortunately I still get the same results.
>
>
>
> *From:* Mike Surcouf [mailto:mi...@surcouf.co.uk]
> *Sent:* 07 July 2017 10:17
> *To:* 'Dave Page'
> *Cc:* pgadmin-hackers; pgAdmin Support
> *Subject:* RE: Windows testing required: Updated runtime
>
>
>
> HI Dave
>
>
>
> Machine is
>
>
>
> Windows 7 x64
>
> Intel Core 6400 2.33GHz 6GB ram
>
> SSD
>
>
>
> I can no longer start pgAdmin the progress wheel just keeps running. and
> it never gets to dashboard.
>
> Not much info sorry.
>
>
>
> The Event log for exception on close is
>
>
>
> Log Name:  Application
>
> Source:Application Error
>
> Date:  07/07/2017 10:05:51
>
> Event ID:  1000
>
> Task Category: (100)
>
> Level: Error
>
> Keywords:  Classic
>
> User:  N/A
>
> Computer:  aes15win7.surcouf.local
>
> Description:
>
> Faulting application name: pgAdmin4.exe, version: 1.5.0.0, time stamp:
> 0x595e3603
>
> Faulting module name: Qt5Core.dll, version: 5.8.0.0, time stamp:
> 0x587fd30b
>
> Exception code: 0xc005
>
> Fault offset: 0x0016ced8
>
> Faulting process id: 0x1b28
>
> Faulting application start time: 0x01d2f6fffeab9d36
>
> Faulting application path: C:\Program Files (x86)\pgAdmin
> 4\v1\runtime\pgAdmin4.exe
>
> Faulting module path: C:\Program Files (x86)\pgAdmin
> 4\v1\runtime\Qt5Core.dll
>
> Report Id: 78f82194-62f3-11e7-a69f-0019b91a41aa
>
> Event Xml:
>
> http://schemas.microsoft.com/win/2004/08/events/event;>
>
>   
>
> 
>
> 1000
>
> 2
>
> 100
>
> 0x80
>
> 
>
> 99764
>
> Application
>
> aes15win7.surcouf.local
>
> 
>
>   
>
>   
>
> pgAdmin4.exe
>
>     1.5.0.0
>
> 595e3603
>
> Qt5Core.dll
>
> 5.8.0.0
>
> 587fd30b
>
> c005
>
> 0016ced8
>
> 1b28
>
> 01d2f6fffeab9d36
>
> C:\Program Files (x86)\pgAdmin 4\v1\runtime\pgAdmin4.exe
>
> C:\Program Files (x86)\pgAdmin 4\v1\runtime\Qt5Core.dll
>
> 78f82194-62f3-11e7-a69f-0019b91a41aa
>
>   
>
> 
>
>
>
>
>
> Thanks
>
>
>
> Mike
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org <dp...@pgadmin.org>]
> *Sent:* 07 July 2017 09:39
> *To:* Mike Surcouf
> *Cc:* pgadmin-hackers; pgAdmin Support
> *Subject:* Re: Windows testing required: Updated runtime
>
>
>
> Hi
>
>
>
> On Fri, Jul 7, 2017 at 9:20 AM, Mike Surcouf <mi...@surcouf.co.uk> wrote:
>
> Hi Dave
>
>
>
> 30 second start-up so still very slow for me.
>
>
>
> That's strange - I get < 12s even on my underpowered virtual machine.
>
>
>
> What spec machine are you running? Can you try with AV disabled?
>
>
>
>
>
> Consistently get an exception when closing( see attachment)
>
>
>
> Also strange. I do not see that. Is there any more info in the event log
> etc?
>
>
>
>
>
> Did webpack not make it?
>
> I still get 167 requests on start up.
>
>
>
> The basic infrastructure is there now, and we've made almost all the JS
> code static now so it avoids the templating engine, but there's still work
> to do to pack it all.
>
>
>
> Thanks.
>
>
>
>
>
> Thanks
>
>
>
> Mike
>
>
>
> *From:* Dave Page [mailto:dp...@pgadmin.org]
> *Sent:* 06 July 2017 15:59
> *To:* pgadmin-hackers; pgAdmin Support
> *Subject:* Windows testing required: Updated runtime
>
>
>
> All,
>
>
>
> I've put an interim build of pgAdmin 4 at https://developer.pgadmin.
> org/~dpage/pgadmin4-1.5-x86.exe for Windows users. This build uses a work
> in progress patch to replace the slow Qt components with ActiveQt + the
> Microsoft web browser control to significantly improve performance.
>
>
>
> The version also includes close to 100 ot

Re: Fix clear history option [pgAdmin4][RM2535]

2017-07-07 Thread Dave Page
Thanks, applied.

On Thu, Jul 6, 2017 at 2:50 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch to fix clear history functionality in query
> tool.
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: 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


pgAdmin 4 commit: Enable pretty html output of our karma test results.

2017-07-07 Thread Dave Page
Enable pretty html output of our karma test results. While running yarn 
test:karma, visit localhost:9876/debug.html to see test output.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8646e9e404401478342ed44e41ed9fa009fe0e63
Author: Sarah McAlear 

Modified Files
--
web/karma.conf.js |  1 +
web/package.json  |  2 +-
web/yarn.lock | 10 +-
3 files changed, 7 insertions(+), 6 deletions(-)



Re: [pgadmin-hackers][pgAdmin4][Patch] Make karma test results output to browser

2017-07-07 Thread Dave Page
Thanks, applied.

On Thu, Jul 6, 2017 at 3:09 PM, Sarah McAlear <smcal...@pivotal.io> wrote:

> Hi Hackers!
>
> Attached is a minor patch that enables pretty html output of our karma
> test results. While running yarn test:karma, visit
> localhost:9876/debug.html to see test output.
>
> Thanks,
> Matt and Sarah
>



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

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


pgAdmin 4 commit: Fix the formatting of the ROWS option for functions e

2017-07-07 Thread Dave Page
Fix the formatting of the ROWS option for functions etc. Fixes #2537

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=acd3568f064be65ec82d2b2e20189b7cf3df2fef
Author: Murtuza Zabuawala 

Modified Files
--
.../schemas/functions/templates/function/pg/sql/9.2_plus/update.sql| 2 +-
.../schemas/functions/templates/function/pg/sql/9.5_plus/update.sql| 2 +-
.../schemas/functions/templates/function/pg/sql/9.6_plus/create.sql| 3 +++
.../schemas/functions/templates/function/pg/sql/9.6_plus/update.sql| 2 +-
.../schemas/functions/templates/function/pg/sql/default/update.sql | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.2_plus/update.sql  | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.5_plus/update.sql  | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.6_plus/create.sql  | 3 +++
.../schemas/functions/templates/function/ppas/sql/9.6_plus/update.sql  | 2 +-
.../schemas/functions/templates/function/ppas/sql/default/update.sql   | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.5_plus/update.sql | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.6_plus/update.sql | 2 +-
.../functions/templates/trigger_function/pg/sql/9.2_plus/update.sql| 2 +-
.../functions/templates/trigger_function/pg/sql/9.5_plus/update.sql| 2 +-
.../functions/templates/trigger_function/pg/sql/default/update.sql | 2 +-
.../functions/templates/trigger_function/ppas/sql/9.2_plus/update.sql  | 2 +-
.../functions/templates/trigger_function/ppas/sql/9.5_plus/update.sql  | 2 +-
.../functions/templates/trigger_function/ppas/sql/default/update.sql   | 2 +-
18 files changed, 22 insertions(+), 16 deletions(-)



pgAdmin 4 commit: Don't continually poll for graph data on the dashboar

2017-07-14 Thread Dave Page
Don't continually poll for graph data on the dashboard if the server is 
disconnected. Fixes #1165

Branch
--
master

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

Modified Files
--
.../dashboard/templates/dashboard/js/dashboard.js  | 61 +++---
1 file changed, 41 insertions(+), 20 deletions(-)



Re: [pgAdmin4][Patch]: Fixed RM #1165 - Too many request to update dashboard graphs when server is disconnected.

2017-07-14 Thread Dave Page
Thanks, patch applied.

On Tue, Jul 11, 2017 at 5:12 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> please find the attached updated patch.
>
> Thanks,
> Khushboo
>
> On Mon, Jul 10, 2017 at 6:54 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Hi
>>
>> On Mon, Jul 10, 2017 at 2:14 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch to fix the RM #1165 - Too many request
>>> to update dashboard graphs when server is disconnected.
>>>
>>
>> If I disconnect the server, it doesn't stop trying to get data until I
>> refresh the browser by clicking on another node that causes it to reload.
>>
>> Fixed
>
>> If I then click back on the server node, it doesn't redraw the dashboard
>> and start displaying new data upon reconnect. I have to change nodes again
>> before it will respond to the re-connection.
>>
>> Fixed
>
>> 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


Re: [pgAdmin4][Patch] To fix the issue in privileges control

2017-07-14 Thread Dave Page
Thanks, applied.

On Tue, Jul 11, 2017 at 12:40 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find updated patch.
>
>
> On Tue, Jul 11, 2017 at 4:52 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Please disregard previous patch, I'll send updated patch as I found one
>> issue.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Tue, Jul 11, 2017 at 4:49 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA minor patch to fix the issue in privileges control, where privileges
>>> were not displaying in IE10/11 when user click on it to grant privileges
>>> for given role.
>>> RM#1166
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: 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


Re: [pgadmin-hackers] 10k Tables and more

2017-07-18 Thread Dave Page
Hi

On Mon, Jul 17, 2017 at 7:08 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
> We were looking at a schema that had 10k+ tables on it and we noticed a
> substantial decrease of performance while loading the tables and after they
> are loaded and we try to scroll over them.
>

Not overly surprising.


>
> After some search on the web we found a post of the ACITree maintainer
> here
> <https://disqus.com/home/discussion/acoderinsights/acitree_tree_view_cu_jquery_acoderinsightsro/#comment-1270448772>
> and he states that the library was not meant to handle that amount of data.
>
>> Still, with whatever optimizations I'll be able to implement, 10k items
>> seem allot on one level. On a slow hardware you'll still have to wait
>> enough to get them created, scrolling will also be a problem ... I think.
>
>
> Is it a common scenario to have an extremely large number of tables?
>

Not really.


> We wanted to bring up this issue to solicit ideas for ways to improve the
> performance of large lists of tables in the ACITree.
>

We discussed replacing ACITree in the past. That's still an option of
course, though I've yet to find anything better.

A more generic solution might be to group tables if there are more than N -
e.g. add an extra level into the hierarchy dynamically splitting them up
into groups (which would probably also have to be dynamically defined to
allow for non-ascii naming) like A-D, E-H etc.

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

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


Re: [PATCH] Persist opened nodes in tree

2017-07-18 Thread Dave Page
ndow.$={}),p={parse:window.
> JSON&&(window.JSON.parse||window.JSON.decode)||String.
> prototype.evalJSON&(a){return String(a).evalJSON()}||y.
> parseJSON||y.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.
> stringify||window.JSON.encode)||y.toJSON};if("function"!==
> +typeof p.parse||"function"!==typeof p.stringify)throw Error("No JSON
> support found, include //cdnjs.cloudflare.com/ajax/
> libs/json2/20110223/json2.js to page");var c={__jstorage_meta:{CRC32:{}}}
> ,h={jStorage:"{}"},g=null,z=0,f=!1,m={},F=!1,r=0,t={},A=+new
> Date,G,B={isXML:function(a){return(a=(a?a.ownerDocument||
> a:0).documentElement)?"HTML"!==a.nodeName:!1},encode:
> function(a){if(!this.isXML(a))return!1;try{return(new XMLSerializer).
> serializeToString(a)}catch(b){try{return a.xml}catch(c){}}return!1},
> +decode:function(a){var b="DOMParser"in window&&(new
> DOMParser).parseFromString||window.ActiveXObject&(a){var b=new
> ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a);return
> b};if(!b)return!1;a=b.call("DOMParser"in window&
> DOMParser||window,a,"text/xml");return this.isXML(a)?a:!1}};y.
> jStorage={version:"0.4.12",set:function(a,b,l){q(a);l=l||{};if("undefined"==typeof
> b)return this.deleteKey(a),b;if(B.isXML(b))b={_is_xml:!0,xml:B.
> encode(b)};else{if("function"==typeof b)return;
> +b&&"object"==typeof b&&(b=p.parse(p.stringify(b)))}c[a]=b;for(var
> k=c.__jstorage_meta.CRC32,d=p.stringify(b),g=d.length,e=
> 2538058380^g,h=0,f;4<=g;)f=d.charCodeAt(h)&255|(d.
>

pgAdmin 4 commit: Add missing new files from the previous commit. Ooops

2017-07-18 Thread Dave Page
Add missing new files from the previous commit. Ooops.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=6396b8ce1801ebb9b00013b5115ea7851ca094a7
Author: Surinder Kumar 

Modified Files
--
.../index_constraint/static/js/primary_key.js  | 539 +
.../static/js/unique_constraint.js | 529 
web/pgadmin/browser/templates/browser/js/utils.js  |  88 
web/pgadmin/static/bundle/app.js   |  23 +
web/pgadmin/static/bundle/browser.js   |   5 +
web/pgadmin/static/bundle/codemirror.js|  18 +
web/pgadmin/static/css/lib.css |  37 ++
web/webpack.shim.js| 282 +++
8 files changed, 1521 insertions(+)



Re: Testing out font changes in query editor tool

2017-07-18 Thread Dave Page
Done. Same location.

On Mon, Jul 17, 2017 at 7:58 PM, Shirley Wang <sw...@pivotal.io> wrote:

> Thank you! We also realized it would be easier on people to have both Mac
> and Windows test builds from the same url above. If it's not too difficult,
> would you also be able to add that as well?
>
> On Mon, Jul 17, 2017 at 5:55 AM Dave Page <dp...@pgadmin.org> wrote:
>
>> On Fri, Jul 14, 2017 at 5:06 AM, Murtuza Zabuawala <murtuza.zabuawala@
>> enterprisedb.com> wrote:
>>
>>> Hi Shirley,
>>>
>>> It's easy on the eyes :)
>>>
>>
>> Agreed.
>>
>> As requested, there's a test build for Windows at
>> https://developer.pgadmin.org/~dpage/query_tool_font_test/
>>
>> --
>> 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


Re: [RM2074][[RM2080]][pgAdmin4] handle large bytea and bytea[] data in datagrid

2017-07-18 Thread Dave Page
On Tue, Jul 18, 2017 at 2:40 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Tue, Jul 18, 2017 at 1:24 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>>
>>
>> On Tue, Jul 18, 2017 at 8:26 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>>
>>> On Mon, Jul 17, 2017 at 9:33 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>
>>>> Hi
>>>>
>>>> On Mon, Jul 17, 2017 at 1:09 PM, Harshal Dhumal <
>>>> harshal.dhu...@enterprisedb.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please find updated patch. Now placeholder string for bytea and
>>>>> bytea[] data will only appear in datagrid (view all/1000/500 rows). If 
>>>>> user
>>>>> executes query using Query tool then placeholder won't appear (similar to
>>>>>  pgAdminIII behaviour)
>>>>>
>>>>
>>>> I'm getting the following error when testing this:
>>>>
>>>
>>> I ran all feature test cases 5-6 times and each time they ran
>>> successfully.
>>> May be this is occasional failure which we get after running test cases
>>> for many times.
>>>
>>> Please let me know if you are getting this failure consistently at your
>>> end.
>>>
>>
>> I ran it twice and it failed twice. I can't keep running tests over and
>> over again as they take quite a while to run and I can't use my machine for
>> anything else at the same time as occasionally the test browser will grab
>> focus.
>>
>
> Please find updated patch.
> I have slightly modified feature test case for 'view data dml queries'
> (though I wasn't getting failure as mentioned).
>
>
Thanks, that passes.

Now I've played with it though, I think that the query tool should also
hide the binary data.  I don't see a good reason to see it in one place but
not another - ultimately it's still not human readable.

Also, we need to make it look like the [null] placeholder I think; e.g. use
[ ] instead of < > and give it a lighter colour.


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

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


pgAdmin 4 commit: Refresh nodes correctly when there is a single child

2017-07-10 Thread Dave Page
Refresh nodes correctly when there is a single child that is updated. Fixes 
#2532

Branch
--
master

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

Modified Files
--
.../browser/templates/browser/js/browser.js| 56 ++
1 file changed, 36 insertions(+), 20 deletions(-)



Re: [pgAdmin4][Patch]: Fixed #2532 - Left side tree: The node disappears on update if there is only one child exist for that category.

2017-07-10 Thread Dave Page
Thanks, patch applied.

On Mon, Jul 10, 2017 at 7:07 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix the RM #2532 : Left side tree: The
> node disappears on update if there is only one child exist for that
> category.
>
>
> Thanks,
> Khushboo
>



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

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


Re: pgagent build issue on SLES 12

2017-07-10 Thread Dave Page
On Mon, Jul 10, 2017 at 1:59 PM, Devrim Gündüz <dev...@gunduz.org> wrote:

>
> Hi Dave,
>
> On Mon, 2017-07-10 at 13:18 +0100, Dave Page wrote:
> > What wxWidgets configs are available on that machine?
>
> wxWidgets-3_2-devel-3.1.0
>

I have no idea if pgAgent will work with wxWidgets 3. Are there wx 2.8
packages available?

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

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


Re: [pgAdmin4][Patch] To fix "there is no disk..." warning in Windows

2017-07-10 Thread Dave Page
Thanks, applied.

On Mon, Jul 10, 2017 at 1:26 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue in Windows where Windows throws warning "there
> is no disk..." if user do not have a removable disk in the removable disk
> drive while opening File Manager.
> RM#1999
>
> I was able to reproduce issue by following steps on Windows:
> 1. Open Query tool, type 'SELECT 1;'
> 2. Save the file to your removable drive.
> 3. Eject that removable drive.
> 4. Now click Open button in Query tool, you will get error.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: 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


pgAdmin 4 commit: Handle un-mounted drives correctly on Windows. Fixes

2017-07-10 Thread Dave Page
Handle un-mounted drives correctly on Windows. Fixes #1999

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=6d3d2cd458aa74c677559a3c3b3c2fb44da4aa6f
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/misc/file_manager/__init__.py | 32 ++-
1 file changed, 31 insertions(+), 1 deletion(-)



Re: pgagent build issue on SLES 12

2017-07-10 Thread Dave Page
On Mon, Jul 10, 2017 at 12:59 PM, Devrim Gündüz <dev...@gunduz.org> wrote:

>
> Hi,
>
> I'm trying to RPMify pgagent on SLES 12, but getting an error. Here is the
> command I'm using (like I did for RHEL)
>
> cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr -D 
> PG_CONFIG_PATH:FILEPATH=/usr/pgsql-9.6/bin/pg_config
> -D STATIC_BUILD:BOOL=OFF
>
> Error is:
>
> CMake Error at cmake/FindWX.cmake:271 (MESSAGE):
>   The selected wxWidgets configuration (version: 2.8, debug: no, static:
> no,
>   unicode: yes, modules: base) is not available.
> Call Stack (most recent call first):
>   CMakeLists.txt:95 (FIND_PACKAGE)
>
> and here is the CMakeOutput.log:
>
> https://www.gunduz.org/temp/pgagent-CMakeOutput.log
>
> Any hints how can I debug this?
>

What wxWidgets configs are available on that machine?

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

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


Re: [pgAdmin4][Patch]: Fixed #2545 Partitioned table should be created using 'OF TYPE'

2017-07-10 Thread Dave Page
Thanks, applied.

On Mon, Jul 10, 2017 at 1:30 PM, Akshay Joshi <akshay.jo...@enterprisedb.com
> wrote:

> Hi All
>
> Attached is the patch file to fix the RM #2545, where user will be able to
> create partitioned table using 'OF TYPE' feature of table dialog.
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *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: Handle partitioned tables created "OF TYPE". Fixes #2

2017-07-10 Thread Dave Page
Handle partitioned tables created "OF TYPE". Fixes #2545

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/tables/__init__.py   | 11 +-
.../schemas/tables/static/js/partition.utils.js| 18 +-
.../databases/schemas/tables/static/js/table.js| 39 +-
.../templates/table/sql/10_plus/properties.sql |  3 +-
.../templates/table/sql/9.1_plus/properties.sql|  3 +-
.../tables/templates/table/sql/default/create.sql  |  3 +-
6 files changed, 56 insertions(+), 21 deletions(-)



pgAdmin 4 commit: Couple of typos in the release notes.

2017-07-10 Thread Dave Page
Couple of typos in the release notes.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=7aa7ea0fe2eede85cbb95c3fe69bdbe6496b5cd8
Author: Harshal Dhumal 

Modified Files
--
docs/en_US/release_notes_1_6.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Re: [pgAdmin4][Patch]: Fixed RM #1165 - Too many request to update dashboard graphs when server is disconnected.

2017-07-10 Thread Dave Page
Hi

On Mon, Jul 10, 2017 at 2:14 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix the RM #1165 - Too many request to
> update dashboard graphs when server is disconnected.
>

If I disconnect the server, it doesn't stop trying to get data until I
refresh the browser by clicking on another node that causes it to reload.

If I then click back on the server node, it doesn't redraw the dashboard
and start displaying new data upon reconnect. I have to change nodes again
before it will respond to the re-connection.

Thanks.

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

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


pgAdmin 4 commit: Bump version numbers prior to release.

2017-07-10 Thread Dave Page
Bump version numbers prior to release.

Branch
--
master

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

Modified Files
--
runtime/Info.plist   | 4 ++--
runtime/pgAdmin4.pro | 2 +-
web/config.py| 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)



Re: [pgAdmin4][Patch] To fix the issue in Function, Procedure & Trigger Function modules

2017-07-07 Thread Dave Page
Of course, yes you're correct. Thanks - patch applied.

On Thu, Jul 6, 2017 at 3:59 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Sorry, I think my last statement was misleading.
>
> No, It's not broken, I meant the behaviour is taken from pgAdmin3, It is
> disabled by default but once you change the value of "Returns a set?"
> (under Options tab) to Yes while creating new function it gets enabled.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jul 6, 2017 at 6:37 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Maybe, but it's pretty clearly broken, so whilst you're fixing the
>> template for that value, it would make sense to fix the UI too :-)
>>
>> On Thu, Jul 6, 2017 at 1:42 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> This behaviour is from beginning I think and it is inherited from
>>> pgAdmin3.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Thu, Jul 6, 2017 at 5:58 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>
>>>> Hi
>>>>
>>>> On Thu, Jul 6, 2017 at 12:04 PM, Murtuza Zabuawala <
>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> PFA patch to fix the issue in Function, Procedure & Trigger Function
>>>>> modules where user was not able to update object if user changes the code
>>>>> definition.
>>>>> RM#2537
>>>>>
>>>>
>>>> This still doesn't seem quite right - the Rows field seems to be always
>>>> greyed out, so I cannot set it to test at all.
>>>>
>>>> --
>>>> 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
>>
>
>


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

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


Re: pgAdmin 4 commit: Release notes for 1.6.

2017-07-10 Thread Dave Page
Thanks, fixed.

On Mon, Jul 10, 2017 at 3:14 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi Dave,
>
> Below corrections required in release notes.
>
> Feature #2137:
> 1) Redmine link is pointing to issue 2437 it should be 2137
> 2) Feature title should On-demand loading for the query tool result and
> not Fixed Row selection issue and row past issue.
>
>
> Fearture# 2191:
> 1) Redmine link is pointing to issue 2491 it should be 2191
>
>
> I have listed incorrect feature entries below for reference.
> +| `Feature #2137 <https://redmine.postgresql.org/issues/2437>`_ -
> Fixed Row selection issue and row past issue
> +| `Feature #2191 <https://redmine.postgresql.org/issues/2491
> >`_ - Add support for the hostaddr connection parameter.
>  This helps us play nicely with Kerberos/SSPI and friends
>
>
>
>
>
>
>
>
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, Jul 10, 2017 at 7:22 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Release notes for 1.6.
>>
>> Branch
>> --
>> master
>>
>> Details
>> ---
>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
>> f;h=4bfb31b03b3c6f1337f5ef317c69569fdf940d6c
>> Author: Karen Blatchley <karen.blatch...@enterprisedb.com>
>>
>> Modified Files
>> --
>> docs/en_US/release_notes.rst |   1 +
>> docs/en_US/release_notes_1_6.rst | 102 ++
>> +
>> 2 files changed, 103 insertions(+)
>>
>>
>


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

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


Re: [pgAdmin4][Patch]: To make session more secure in web mode

2017-07-20 Thread Dave Page
On Thu, Jul 20, 2017 at 1:34 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> It is based on Flask-Login module but
> 1) Flask-Login will mark a user as logged out when it detects that an
> existing session suddenly appears to come from a different originating IP
> address or a different browser. But it is unfortunate that Flask-Login does
> not enable this option by default.
>

That's just a config change though, to use strong protection instead of
basic.


> 2) It does not support it at all if you want to also use the browsers
> "remember me" functionality.
>

The *browsers* remember me functionality, or Flasks? AFAIK remember me in
the browser is just auto-filling of the username/password anyway, which
will only happen when creating a new session right?



>
> It's just a small wrapper module to overcome above scenarios, It is not
> most necessary thing to include in our project but it will improve the
> session security.
>
> On Thu, Jul 20, 2017 at 5:52 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Hi
>>
>> On Thu, Jul 20, 2017 at 12:59 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Tested it with PEM7 RestApi testsuite and it is working fine :)
>>>
>>
>> The docs for this module say it's based on Flask-Login's session protect
>> mechanism, and was intended to allow session protection in other scenarios.
>> As we are already using Flask-Login, do we need this?
>>
>> See the Session Protection section on https://flask-login.readthe
>> docs.io/en/latest/.
>>
>> --
>> 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


Re: Unified server/desktop config

2017-07-20 Thread Dave Page
LOL!

On Thu, Jul 20, 2017 at 5:53 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Oops sorry my bad, I did not removed it.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jul 20, 2017 at 10:22 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Partial patch for feature test got included in you patch :)
>>
>>
>> On Thu, Jul 20, 2017 at 9:33 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>> All,
>>>
>>> Attached is a patch that aims to allow us to have a standardised config
>>> that will work out of the box for both web and desktop modes. It does this
>>> by doing two things:
>>>
>>> 1) The runtime sets SERVER_MODE in the Python environment before
>>> starting the app. If this value is set, then it overrides the default value
>>> of SERVER_MODE in the config.
>>>
>>> 2) The config file then offers default values for the various file
>>> locations for both server and desktop mode, setting them appropriately
>>> based on the derived SERVER_MODE value.
>>>
>>> The only downsides I can see from this are:
>>>
>>> - You cannot run in server mode in the runtime without manually
>>> reconfiguring SERVER_MODE and likely a bunch of paths in config_local.py
>>>
>>> - If you want to override SERVER_MODE, you'll probably also need to
>>> redefine the various paths in config_local.py.
>>>
>>> I don't see either being something 99.9% of users would need though.
>>>
>>> Can anyone see if the patch breaks anything, or if I missed any side
>>> effects?
>>>
>>> Is it likely to break things during upgrades? I suspect so... so maybe
>>> this should prompt v2.0?
>>>
>>> I'd appreciate multiple reviews of this, as it could break things. Note
>>> that I haven't yet updated the docs.
>>>
>>> --
>>> 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


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Dave Page
Hi

On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find patch attached, There were two issues,
> 1) We removed the default button to clear the editor window, it
> broke _clear_query_tool() functionality.
> 2) The buttons arrangements, we added new Edit button in between Delete
> and Filter button causing the "Explain" -> "Explain Options" sub menu to go
> out of browser visibility in feature test, so it was failing.
>
> I have put Edit button near Clear button for now, until we come up with
> new design for our editor for displaying these options.
>

Hmm, I moved it there intentionally as it's a more traditional position and
thus more discoverable.

Can we just launch the browser with a wider size, say, 1280? It's on line
43 of app_starter.py...


>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I am working on this, will send you patch soon.
>>
>> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>> Did you get a chance to look at this yet Murtuza?
>>>
>>> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>>> Sure, Will take a look.
>>>>
>>>> --
>>>> Regards,
>>>> Murtuza Zabuawala
>>>> EnterpriseDB: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>
>>>>> Except I managed to break a couple of tests :-(. Can you take a look
>>>>> please? I've had some other work come up that I need to deal with.
>>>>>
>>>>> ==
>>>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>>>> ool_journey_test.QueryToolJourneyTest)
>>>>> Tests the path through the query tool
>>>>> --
>>>>> Traceback (most recent call last):
>>>>>   File 
>>>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
>>>>> line 45, in runTest
>>>>> self._test_history_tab()
>>>>>   File 
>>>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
>>>>> line 71, in _test_history_tab
>>>>> self.__clear_query_tool()
>>>>>   File 
>>>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
>>>>> line 91, in __clear_query_tool
>>>>> self.page.click_element(self.page.find_by_xpath("//*[@id='bt
>>>>> n-edit']"))
>>>>>   File 
>>>>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>>>>> line 148, in find_by_xpath
>>>>> return self.wait_for_element(lambda driver:
>>>>> driver.find_element_by_xpath(xpath))
>>>>>   File 
>>>>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>>>>> line 232, in wait_for_element
>>>>> return self._wait_for("element to exist", element_if_it_exists)
>>>>>   File 
>>>>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>>>>> line 282, in _wait_for
>>>>> "Timed out waiting for " + waiting_for_message)
>>>>>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packa
>>>>> ges/selenium/webdriver/support/wait.py", line 80, in until
>>>>> raise TimeoutException(message, screen, stacktrace)
>>>>> TimeoutException: Message: Timed out waiting for element to exist
>>>>>
>>>>>
>>>>> ==
>>>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>>>> ool_tests.QueryToolFeatureTest)
>>>>> Query tool feature test
>>>>> --
>>>>> Traceback (most recent ca

pgAdmin 4 commit: Add the Flask-Paranoid module for a little extra, wel

2017-07-20 Thread Dave Page
Add the Flask-Paranoid module for a little extra, well, paranoia in web mode. 
Fixes #2584

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=64f3a559abadd62b9c49b78e1a937191fb0253ef
Author: Murtuza Zabuawala 

Modified Files
--
requirements.txt| 1 +
web/pgadmin/__init__.py | 6 ++
2 files changed, 7 insertions(+)



Re: Build failed in Jenkins: pgadmin4-master-python27-feature #8

2017-07-19 Thread Dave Page
Surinder; are you looking at this?

On Tue, Jul 18, 2017 at 5:33 PM, Harshal Dhumal <harshaldhuma...@gmail.com>
wrote:

>
>
> On Tue, Jul 18, 2017 at 9:33 PM, pgAdmin 4 Jenkins <jenk...@pgadmin.org>
> wrote:
>
>> See <https://jenkins.pgadmin.org/job/pgadmin4-master-python27-fe
>> ature/8/display/redirect?page=changes>
>>
>> Changes:
>>
>> [Dave Page] Use client-side url_for in the sql editor and data grid
>> modules.
>>
>> [Dave Page] Ensure revoked public privileges are displayed in the RE-SQL
>> for
>>
>> [Dave Page] Ensure saved passwords are effective immediately, not just
>> following a
>>
>> [Dave Page] Un-break query tool feature tests.
>>
>> [Dave Page] Add support for the hostaddr connection parameter. This helps
>> us play
>>
>> [Dave Page] Use on-demand loading for results in the query tool. Fixes
>> #2137
>>
>> [Dave Page] Allow the user to close the dashboard panel. Fixes #2506
>>
>> [Dave Page] Add preferences to enable brace matching and brace closing in
>> the SQL
>>
>> [Dave Page] Revert "Allow the user to close the dashboard panel. Fixes
>> #2506"
>>
>> [Dave Page] Add stylesheet to override brace matching styles, missed from
>> the
>>
>> [Dave Page] Overhaul the query history tab to allow browsing of the
>> history and full
>>
>> [Dave Page] Allow non-superusers to debug their own functions and prevent
>> them from
>>
>> [Dave Page] Update preferences docs.
>>
>> [Dave Page] Fix image size.
>>
>> [Dave Page] Fix encoding issue when saving servers. Fixes #2518
>>
>> [Dave Page] A number of minor cleanups to the recent changes to the query
>> tool.
>>
>> [akshay.joshi] 1) Edit cellEditing function, in some cases grid object is
>> undefined. 2)
>>
>> [Dave Page] Improve speed of Select All in the results grid. Fixes #2522
>>
>> [Dave Page] Allow the dashboard panel to be closed. Fixes #2506
>>
>> [Dave Page] Add support for SCSS building in webpack.
>>
>> [Dave Page] Update alertify alerts to use the styling defined in the
>> styleguide.
>>
>> [Dave Page] Update alertify alerts to use the styling defined in the
>> styleguide
>>
>> [Dave Page] Fix a couple of gripes from the JS linter on Windows.
>>
>> [Dave Page] Fix typo that caused a layout issue with the Edit Grid.
>>
>> [Dave Page] Fix an issue where duplicate entry is made of successful
>> executed query,
>>
>> [Dave Page] Fix a syntax error in the SQL Editor.
>>
>> [Dave Page] Fix clipboard handling with large datasets. Fixes #2489
>>
>> [Dave Page] Improve the debugger's default page layout, and prevent
>> attempts to
>>
>> [Dave Page] Fix deletion of table rows with the column definition having
>> NOT NULL
>>
>> [Dave Page] Allow breakpoints to be set on triggers on views. Fixes #2528
>>
>> [Dave Page] Allow debugging of functions in packages. Fixes #1948
>>
>> [Dave Page] Remove unnecessary whitespace from stored procedure SQL.
>> Fixes #2146
>>
>> [Dave Page] Resolve a number of issues with domains and domain
>> constraints. Fixes
>>
>> [Dave Page] Improve styling for alerts by highlighting the icon.
>>
>> [Dave Page] Prompt the user to save dirty queries rather than discard
>> them for a
>>
>> [Dave Page] Fix alert layout when more than one are shown at once.
>>
>> [Dave Page] Allow use of Shift+Tab to un-indent selected text. Fixes #1988
>>
>> [Dave Page] Add some useful make targets for bundling and linting.
>>
>> [Dave Page] Remove unused minimisation code
>>
>> [Dave Page] UI tweaks for the query history.
>>
>> [Dave Page] In subnodes without dropdowns, the rows had smaller height,
>> making them
>>
>> [Dave Page] Ensure the save password option is enabled when creating a
>> server. Fixes
>>
>> [akshay.joshi] Added support of Declarative Partitioning (Range, List)
>> for PostgreSQL
>>
>> [akshay.joshi] Fixed issue by adding extra check for 'relkind' column
>>
>> [akshay.joshi] Partitioned table does not present in grant wizard. Fixes
>> #2543
>>
>> [Dave Page] Fix clear history.
>>
>> [Dave Page] Enable pretty html output of our karma test results. While
>> running yarn
>>
>> [Dave Page] Fix the formatting of the ROWS option for functions etc.
>> Fixes #2537
>>
>> [Dave Page] Improve spacing around delete icons in backform tab

Unified server/desktop config

2017-07-20 Thread Dave Page
All,

Attached is a patch that aims to allow us to have a standardised config
that will work out of the box for both web and desktop modes. It does this
by doing two things:

1) The runtime sets SERVER_MODE in the Python environment before starting
the app. If this value is set, then it overrides the default value of
SERVER_MODE in the config.

2) The config file then offers default values for the various file
locations for both server and desktop mode, setting them appropriately
based on the derived SERVER_MODE value.

The only downsides I can see from this are:

- You cannot run in server mode in the runtime without manually
reconfiguring SERVER_MODE and likely a bunch of paths in config_local.py

- If you want to override SERVER_MODE, you'll probably also need to
redefine the various paths in config_local.py.

I don't see either being something 99.9% of users would need though.

Can anyone see if the patch breaks anything, or if I missed any side
effects?

Is it likely to break things during upgrades? I suspect so... so maybe this
should prompt v2.0?

I'd appreciate multiple reviews of this, as it could break things. Note
that I haven't yet updated the docs.

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index 40fc414c..8fd2cadb 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -272,9 +272,10 @@ void Server::run()
 return;
 }
 
-// Set the port number
+// Set the port number and key, and force SERVER_MODE off.
 PyRun_SimpleString(QString("PGADMIN_PORT = %1").arg(m_port).toLatin1());
 PyRun_SimpleString(QString("PGADMIN_KEY = '%1'").arg(m_key).toLatin1());
+PyRun_SimpleString(QString("SERVER_MODE = False").toLatin1());
 
 // Run the app!
 QByteArray m_appfile_utf8 = m_appfile.toUtf8();
diff --git a/web/config.py b/web/config.py
index f4609e4e..32df08d5 100644
--- a/web/config.py
+++ b/web/config.py
@@ -11,9 +11,15 @@
 #
 ##
 
+import logging
 import os
 import sys
 
+if sys.version_info[0] >= 3:
+import builtins
+else:
+import __builtin__ as builtins
+
 
 # We need to include the root directory in sys.path to ensure that we can
 # find everything we need when running in the standalone runtime.
@@ -93,46 +99,6 @@ MODULE_BLACKLIST = ['test']
 NODE_BLACKLIST = []
 
 
-# Data directory for storage of config settings etc. This shouldn't normally
-# need to be changed - it's here as various other settings depend on it.
-if IS_WIN:
-# Use the short path on windows
-DATA_DIR = os.path.realpath(
-os.path.join(fs_short_path(env('APPDATA')), u"pgAdmin")
-)
-else:
-DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
-
-
-##
-# Log settings
-##
-
-# Debug mode?
-DEBUG = False
-
-
-import logging
-
-# Application log level - one of:
-#   CRITICAL 50
-#   ERROR40
-#   WARNING  30
-#   SQL  25
-#   INFO 20
-#   DEBUG10
-#   NOTSET0
-CONSOLE_LOG_LEVEL = logging.WARNING
-FILE_LOG_LEVEL = logging.WARNING
-
-# Log format.
-CONSOLE_LOG_FORMAT = '%(asctime)s: %(levelname)s\t%(name)s:\t%(message)s'
-FILE_LOG_FORMAT = '%(asctime)s: %(levelname)s\t%(name)s:\t%(message)s'
-
-# Log file name
-LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
-
-
 ##
 # Server settings
 ##
@@ -142,7 +108,19 @@ LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
 # default login.
 #
 # DO NOT DISABLE SERVER MODE IF RUNNING ON A WEBSERVER!!
-SERVER_MODE = True
+#
+# We only set SERVER_MODE if it's not already set. That's to allow the
+# runtime to force it to False.
+#
+# NOTE: If you change the value of SERVER_MODE in an included config file,
+#   you may also need to redefine any values below that are derived
+#   from it, notably various paths such as LOG_FILE and anything
+#   using DATA_DIR.
+
+if builtins.SERVER_MODE is None:
+SERVER_MODE = True
+else:
+SERVER_MODE = builtins.SERVER_MODE
 
 # User ID (email address) to use for the default user in desktop mode.
 # The default should be fine here, as it's not exposed in the app.
@@ -177,6 +155,52 @@ SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'
 #   has no effect on <= Python 2.7.
 MINIFY_PAGE = True
 
+# Data directory for storage of config settings etc. This shouldn't normally
+# need to be changed - it's here as various other settings depend on it.
+# On Windows, we always store data in %APPDATA%\pgAdmin. On other platforms,
+# if we're in server mode we use /var/lib/pgadmin, otherwise ~/.pgadmin
+if IS_WIN:
+   

pgAdmin 4 commit: Remove debug logging of the URL map which is extremel

2017-07-20 Thread Dave Page
Remove debug logging of the URL map which is extremely long now, and not of a 
great deal of use.

Branch
--
master

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

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



Re: [pgadmin-hackers] [Design update] Style guide for pgAdmin4

2017-07-20 Thread Dave Page


On 20 Jul 2017, at 23:02, Shirley Wang  wrote:

>> 
>> Iirc, we did some back and forth over that about 18 months ago, as dialogues 
>> didn't look quite right without the bold - and I do think that it looks a 
>> little light on your mockup. I don't think there's a hard requirement they 
>> match table headers; they are distinct types of header.
>> 
>> Happy to try out change though if you can workup one or more suggested 
>> patches.
>> 
> 
> Two more things we're going to add to the style guide are the dialog labels 
> and buttons within the dialog.
> 
> Dialog text fields:
> These will have 14px bold labels, and the text field box will be 36px in 
> height 
> 
> 
> 
> Larger text fields should be set to 360px in height and have a draggable 
> corner to adjust height if needed
> 
> 
> 
> Buttons in dialog:
> The should be one solid color to help them stay consistent with the aesthetic 
> of the rest of the application (ex. alerts styling). 
> 
> enabled and disabled versions of buttons:
> 
> 
> In terms of usability, having the most common action in the corner makes it 
> easier to find and click. Rearranging the buttons so that 'save' is at the 
> end would accomplish this.

There are OS conventions for the positioning of those buttons, which I believe 
we should follow. Unfortunately Mac and Windows are exactly opposite which 
complicates things. Iirc, we follow Windows as its more widely used.

I'm hesitant to change that to something we invent, as I've seen people get 
confused by the difference a number of times when moving from Windows to Mac. 
If anything, we should make our behaviour dynamically follow the OS standard of 
whatever the client is running on.

pgAdmin 4 commit: Prevent the Werkzeug reloader from causing a "double

2017-07-21 Thread Dave Page
Prevent the Werkzeug reloader from causing a "double start" at init time.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a49a3103e298fcc4373856abe057dac09bc1df14
Author: Surinder Kumar 

Modified Files
--
web/pgAdmin4.py | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Add an editorconfig file to help maintain coding stan

2017-07-21 Thread Dave Page
Add an editorconfig file to help maintain coding standards.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ede6765f6b2688719349f5d369123acd6c25dcd9
Author: Surinder Kumar 

Modified Files
--
web/.editorconfig | 30 ++
web/package.json  |  1 +
2 files changed, 31 insertions(+)



Re: [pgAdmin4][Patch]: Stop Flask from initialising service twice in Debug mode

2017-07-21 Thread Dave Page
Thanks, applied. The reloader has always been a little temperamental for
me, so I couldn't prove this doesn't break it. If someone finds it does,
please yelp.

On Fri, Jul 21, 2017 at 8:27 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> In this patch, i have added reference to the implementation.
> Please find updated patch and review.
>
> Thanks,
> Surinder
>
> On Fri, Jul 21, 2017 at 12:32 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> When pgAdmin4 runs in DEBUG mode, Flask initialise service twice, while
>> in non-DEBUG mode, once. It is pain while development because `yarn run
>> bundle` also runs twice.
>>
>> It is because the parameter `use_reloader` = True in Debug Mode.
>>
>> If `os.environ` variable `WERKZEUG_RUN_MAIN` is set to None, i.e. app is
>> starting for the first time and then its value is changed to True.
>>
>> Please find attached patch.
>>
>> Thanks
>> Surinder
>>
>>
>>
>>
>


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

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


Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
Hi

On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Currently if user clicks on empty white area below history entry then
> arrow navigation does not work.
> Attached patch fixes this issue.
>

This fixes that problem, but stops it working if I *don't* click on the
white area first. We need both I think :-)

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

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


pgAdmin 4 commit: Ensure arrow keys work correctly when the pane is foc

2017-07-21 Thread Dave Page
Ensure arrow keys work correctly when the pane is focused instead of the tab in 
the query tool history.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=7182b5997627405449bdd0fed65aeb6de19c0a4f
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/static/jsx/history/query_history.jsx| 17 +
web/pgadmin/static/scss/sqleditor/_history.scss |  1 +
.../javascript/history/query_history_spec.jsx   |  8 
3 files changed, 14 insertions(+), 12 deletions(-)



Re: [pgAdmin4][Patch][RM_1918] : Implement the DB restriction field from pgAdmin III

2017-07-21 Thread Dave Page
Thanks, patch applied!

A couple of tips for the future:

- Please ensure screenshots are of a comparable size to the ones around
them or that they replace. We sometimes see extra-large screenshots where
they've been taken on hi-res screens, often in an VM.

- Please be more generous with spaces, e.g.

func_name(a,b) should be func_name(a, b)

or

if (dave.isHungry()){
dave.feed('Sammich')
}

should be

if (dave.isHungry()) {
dave.feed('Sammich')
}

It makes it all a little more readable :-)

Thanks again.

On Fri, Jul 21, 2017 at 11:01 AM, Atul Sharma <atul.sha...@enterprisedb.com>
wrote:

> Hi,
>
> Please find attached patch for RM#1918 : Implement the DB restriction
> field from pgAdmin III
>
> Thanks,
> Atul
>



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

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


Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 12:34 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

>
>
> On Jul 21, 2017 4:23 PM, "Dave Page" <dp...@pgadmin.org> wrote:
>
>
>
> On Fri, Jul 21, 2017 at 11:05 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> On Fri, Jul 21, 2017 at 2:24 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>> Hi
>>>
>>> On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Currently if user clicks on empty white area below history entry then
>>>> arrow navigation does not work.
>>>> Attached patch fixes this issue.
>>>>
>>>
>>> This fixes that problem, but stops it working if I *don't* click on the
>>> white area first. We need both I think :-)
>>>
>> Yes we need both. Please find updated patch
>>
>
> Why all the changes to yarn.lock?
>
> Are there? I can't see any changes.
>

Huh, no, you're right. Looks like my machine is rewriting it for some
reason. I'll dig deeper.

Sorry for the noise.

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

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


Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 11:05 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> On Fri, Jul 21, 2017 at 2:24 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Hi
>>
>> On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Currently if user clicks on empty white area below history entry then
>>> arrow navigation does not work.
>>> Attached patch fixes this issue.
>>>
>>
>> This fixes that problem, but stops it working if I *don't* click on the
>> white area first. We need both I think :-)
>>
> Yes we need both. Please find updated patch
>

Why all the changes to yarn.lock?

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

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


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 8:57 PM, Shirley Wang <sw...@pivotal.io> wrote:

> Until we learn definitively from users that the current implementation of
> commenting/uncommenting in other tools is not working, we should use what
> is common practice. We can use that as a baseline and then if we learn that
> there needs to be another shortcut, we can add additional functionality.
> It's much easier to add something for users than to take away.
>

There isn't really any common practice as far as I can see. In a 20 minute
search I found the following variations (substitute Ctrl for Cmd on
non-Mac):

Tools supporting only one comment mode:

XCode: Cmd+/
Visual Studio: Ctrl+K+C Ctrl+K+U
SQL Server Management Studio: Ctrl+K+C Ctrl+K+U
pgAdmin 3: Cmd+K/Cmd+Shift+K
Editra: Cmd+1
Netbeans: Cmd+Shift+C
Eclipse: Cmd+/
Sublime Text: Cmd+/ Cmd+Shift+/
Toad: Ctrl+b Ctrl+Shift+b
MySQL Workbench: Cmd+/

Tools supporting line and block comment modes:

PyCharms (line comment): Cmd+/
PyCharms (block comment): Cmd+Alt+/
Notepad++ (line comment): Ctrl+q
Notepad++ (block comment): Ctrl+Shift+q

I'd say we should go with Cmd+/ and Cmd+Shift+/ as that seems the most
common by a small margin - however, I'm still not convinced that we don't
need two keys for optimal behaviour of line commenting.

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

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


Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard

2017-07-25 Thread Dave Page
On Tue, Jul 25, 2017 at 6:26 AM, Shirley Wang <sw...@pivotal.io> wrote:

>
>> On Mon, Jul 24, 2017 at 8:11 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>>
>>>
>>> On Mon, Jul 24, 2017 at 3:28 PM, Shirley Wang <sw...@pivotal.io> wrote:
>>>
>>>> 2-3 days is a lot of valuable engineering time. Is this a 'drop
>>>> everything now' kind of feature or can this wait for some user validation
>>>> on a mock up first?
>>>>
>>>
>>> Most of the time will likely be on the infrastructure to change the
>>> display to a subnode control. If you have some cycles to mockup potential
>>> layouts for the subnode view and have them validated, please feel free,
>>> however, that seems like an awful lot of work to me to display some missing
>>> SQL using a standard control.
>>>
>> Regarding SQL display: Developing simple control to show codemirror in
>> disabled state (for now) wont take that much time.
>>
>>
> Part of a product designer's job is to make sure there is a definitive
> need for a feature and that the interface for the feature is designed in
> such a way that the user gets all intended value from it. Time spent
> validating now will decrease the time spent later on redesigning /
> reimplementing.
>
> If everyone is aware of what that value is and confident that how it'll be
> displayed is right, there's little risk in starting to develop it. If we're
> wrong, it'll add to feature bloat and detract from the experience.
>

There are also features that we know are required from nearly 20 years of
experience building pgAdmin. This is one of those "D'oh, how on earth did
we not think of that" features that should have been in the original
release but wasn't. It's painfully obvious that we need this, as a number
of users have pointed out since we first released pgAdmin 4. It's the
equivalent of a tool for deleting files that doesn't tell you the name of
each file.

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

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


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-26 Thread Dave Page
Thanks, applied. I also extended the code you added to ensure the labels
for the Find/Replace options are now platform-correct.

On Wed, Jul 26, 2017 at 10:29 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch for new shortcut keys, I have tested it on all
> three major platforms (macOS, Linux & Windows with Chrome, FF & IE11
> Browsers).
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Jul 21, 2017 at 9:38 PM, Robert Eckhardt <reckha...@pivotal.io>
> wrote:
>
>> Right - we lose the ability to uncomment multiple levels though, which
>>> may also be useful.
>>>
>>
>> Well yes.
>>
>> I would argue that simplicity trumps potential use. I'd also argue that
>> attempting to maintain consistency across environments (IDEs, etc. ) is
>> advantageous. This was the philosophy we were going with when enabling
>> excel like behavior (also why I'm not fully happy with how it is today).
>>
>> -- Rob
>>
>
>


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

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


pgAdmin 4 commit: Store the file dialog view on toggle.

2017-07-26 Thread Dave Page
Store the file dialog view on toggle.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=831c614a60725fb5cc116ee06bdea7bb477d1f2c
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/misc/file_manager/__init__.py  | 14 +-
.../misc/file_manager/templates/file_manager/js/utility.js | 14 ++
2 files changed, 27 insertions(+), 1 deletion(-)



Re: [RM2579][pgAdmin4] Set default file listing layout as list instead of grid

2017-07-26 Thread Dave Page
On Wed, Jul 26, 2017 at 11:06 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> On Mon, Jul 24, 2017 at 4:23 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>> Hi
>>
>> On Mon, Jul 24, 2017 at 11:34 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find attached patch to set default layout of file listing as a
>>> list in file manager.
>>> Also replaced alertify with out custom alertifywrapper in file manager
>>> utils.js
>>>
>>
>> This isn't a bad idea on the face of it, but there are some things to
>> fix/consider:
>>
>> - The HTML file seems to be missing translation markers. Can you add them
>> throughout please?
>> - We should save the users preference in the config database.
>> - The grid view seems to underline the file size and for no apparent
>> reason change the mouse cursor to ? on mouseover. Let's change the text
>> style to be consistent and get rid of the mouseover.
>>
> Please find updated patch
>

Thanks, committed with some naming tweaks... however, I do think the
setting should be updated when the user toggles it within the file
dialogue. Can you add code to set that config option when the user toggles
the mode on the fly please?

Thanks.

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

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


pgAdmin 4 commit: Handle control visibility properly in javascript stri

2017-07-26 Thread Dave Page
Handle control visibility properly in javascript strict mode.

Branch
--
master

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

Modified Files
--
.../servers/roles/templates/role/js/role.js|  4 ++--
web/pgadmin/static/js/backform.pgadmin.js  | 22 +++---
2 files changed, 13 insertions(+), 13 deletions(-)



Re: [pgAdmin4][Patch]: Backform control visibility fix

2017-07-26 Thread Dave Page
Thanks, applied.

On Tue, Jul 25, 2017 at 1:18 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to handle the control visibility even in
> the javascript strict mode.
>
> Thanks,
> Khushboo
>



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

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


pgAdmin 4 commit: Update keyboard shortcuts per discussion. Also, make

2017-07-26 Thread Dave Page
Update keyboard shortcuts per discussion. Also, make the labels platform 
sensitive.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1fa9648a21c980c6ecdd5d87da64783b19dfab73
Author: Murtuza Zabuawala 

Modified Files
--
docs/en_US/keyboard_shortcuts.rst  | 12 
.../static/js/sqleditor/keyboard_shortcuts.js  | 13 
web/pgadmin/tools/datagrid/__init__.py |  7 -
.../tools/datagrid/templates/datagrid/index.html   | 35 +-
4 files changed, 47 insertions(+), 20 deletions(-)



Re: Build failed in Jenkins: pgadmin4-master-python26 #386

2017-07-26 Thread Dave Page
Thanks, applied.

On Wed, Jul 26, 2017 at 1:40 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find a patch to fix the JS tests.
>
> FYI, I have removed the labels like 'Shift+CTRL+/' from test instead used
> 'inlineComment' because key shortcuts are different based on platform.
>
> Please review.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jul 26, 2017 at 5:32 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Looking into it.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jul 26, 2017 at 5:28 PM, pgAdmin 4 Jenkins <jenk...@pgadmin.org>
>> wrote:
>>
>>> See <https://jenkins.pgadmin.org/job/pgadmin4-master-python26/38
>>> 6/display/redirect?page=changes>
>>>
>>> Changes:
>>>
>>> [Dave Page] Update keyboard shortcuts per discussion. Also, make the
>>> labels platform
>>>
>>> --
>>> [...truncated 357.97 KB...]
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 59 of 254 SUCCESS (0
>>> secs / 1.953 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 60 of 254 SUCCESS (0
>>> secs / 1.958 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 61 of 254 SUCCESS (0
>>> secs / 1.964 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 62 of 254 SUCCESS (0
>>> secs / 1.969 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 63 of 254 SUCCESS (0
>>> secs / 1.974 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 254 SUCCESS (0
>>> secs / 1.979 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 65 of 254 SUCCESS (0
>>> secs / 1.988 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 66 of 254 SUCCESS (0
>>> secs / 1.993 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 67 of 254 SUCCESS (0
>>> secs / 1.997 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 68 of 254 SUCCESS (0
>>> secs / 2.002 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 69 of 254 SUCCESS (0
>>> secs / 2.007 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 70 of 254 SUCCESS (0
>>> secs / 2.012 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 71 of 254 SUCCESS (0
>>> secs / 2.017 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 72 of 254 SUCCESS (0
>>> secs / 2.022 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 73 of 254 SUCCESS (0
>>> secs / 2.027 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 74 of 254 SUCCESS (0
>>> secs / 2.033 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 75 of 254 SUCCESS (0
>>> secs / 2.037 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 76 of 254 SUCCESS (0
>>> secs / 2.042 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 77 of 254 SUCCESS (0
>>> secs / 2.078 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 78 of 254 SUCCESS (0
>>> secs / 2.082 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 79 of 254 SUCCESS (0
>>> secs / 2.116 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 80 of 254 SUCCESS (0
>>> secs / 2.142 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 81 of 254 SUCCESS (0
>>> secs / 2.166 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 82 of 254 SUCCESS (0
>>> secs / 2.195 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 83 of 254 SUCCESS (0
>>> secs / 2.219 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 84 of 254 SUCCESS (0
>>> secs / 2.248 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 85 of 254 SUCCESS (0
>>> secs / 2.27 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 86 of 254 SUCCESS (0
>>> secs / 2.29 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 87 of 254 SUCCESS (0
>>> secs / 2.311 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 88 of 254 SUCCESS (0
>>> secs / 2.331 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 89 of 254 SUCCESS (0
>>> secs / 2.351 secs)
>>>  [1A [2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 90 of 254 SUCCESS (0
>>> secs / 2.37 secs)
>>>

pgAdmin 4 commit: Fixup tests following label changes.

2017-07-26 Thread Dave Page
Fixup tests following label changes.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=af26d983e5e20c64f0f73d22ebd998f54dff1e8a
Author: Murtuza Zabuawala 

Modified Files
--
.../sqleditor/keyboard_shortcuts_spec.js   | 37 --
1 file changed, 20 insertions(+), 17 deletions(-)



pgAdmin 4 commit: Add controls and shortcuts for commenting/uncommentin

2017-07-19 Thread Dave Page
Add controls and shortcuts for commenting/uncommenting code in the SQL Editor. 
Fixes #2456.

Take the opportunity to tidy up the menus and add access keys to appropriate 
buttons.

Branch
--
master

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

Modified Files
--
docs/en_US/keyboard_shortcuts.rst  |   6 +
web/pgadmin/static/bundle/codemirror.js|   1 +
.../tools/datagrid/templates/datagrid/index.html   |  65 ++---
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 152 -
4 files changed, 204 insertions(+), 20 deletions(-)



Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-19 Thread Dave Page
Thanks, applied.

I also took the opportunity to tidy up the menus a little and add access
keys for accessibility.

One change I made was to make the Edit and Clear menus not have a default
option - e.g. instead of a button with a drop-down next to it, they're now
a single dropdown button with icon. I think this works better as there are
no obvious candidates for the "default" option for those menus. I'm not
overly enthusiastic about the look of those buttons though, so if anyone
has a better idea how they should be styled, please yelp (CCing Chethana
for his input as well)...



On Wed, Jul 19, 2017 at 9:56 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Just a FYI,
> You need to run yarn bundle for this to be working as Surinder has moved
> all the CodeMirror code into bundle package.
>
> On Wed, Jul 19, 2017 at 2:20 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA updated patch,
>> 1) Added Keyboard shortcuts to comment line, uncomment line and
>> comment/uncomment block of code also added drop-down for the same.
>> 2) Also added options for indent & unindent code in the same drop-down.
>> 3) Updated shortcut documents accordingly.
>>
>> Please review.
>>
>> On Mon, Jul 17, 2017 at 3:05 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>> Hi
>>>
>>> On Mon, Jul 17, 2017 at 10:31 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> On Mon, Jul 17, 2017 at 2:33 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> On Wed, Jul 12, 2017 at 1:16 PM, Murtuza Zabuawala <
>>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> PFA patch which will add functionality to allow user to
>>>>>> comment/uncomment code in query editor.
>>>>>> RM#2456
>>>>>>
>>>>>
>>>>> This is cool, but I'm not sure it's right as-is:
>>>>>
>>>>> * I prefer SQL style commenting, e.g.
>>>>>
>>>>> -- This is a comment
>>>>>
>>>>> Should we make that a config option if CodeMirror can do it? Or a
>>>>> different hotkey?
>>>>>
>>>>>
>>>> I'll check the extension code and update you accordingly, and It will
>>>> be good idea to keep the both the options because with large code block
>>>> current style works the best.
>>>>
>>>
>>> Right.
>>>
>>>
>>>> * You've added it as an option to the Clear XXX dropdown, which really
>>>>> isn't the right place in my opinion. Should we add a new drop down for
>>>>> this, and include some/all of the other Editing options on there? E.g.
>>>>> tab/shift-tab.
>>>>>
>>>>> I thought that is misc options dropdown for our editor, but I don't
>>>> see any point adding new drop down for one single option, Can we add new
>>>> button instead?
>>>>
>>>
>>> I think you missed this bit:  "and include some/all of the other
>>> Editing options on there? E.g. tab/shift-tab.". Essentially, we'd be adding
>>> an Edit menu...
>>>
>>>
>>>> * I think the docs should say Ctrl+Shift+/ rather than Shift+Ctrl+/,
>>>>> and be ordered in the table to reflect that. It seems more natural to me.
>>>>>
>>>>> Initially I wrote ctrl + shift + /only but when I saw all other
>>>> shortcuts starts with Shift , then I changed it to shift + ctrl + / :)
>>>>
>>>
>>> No they don't - Ctrl+Alt+Left for example. I believe it's normal to put
>>> Ctrl first, then Shift as it's a modifier.
>>>
>>>
>>>> Thoughts?
>>>>>
>>>>> --
>>>>> 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
>>>
>>
>>
>


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

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


Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-19 Thread Dave Page
That was a fun one to spot I'm sure!

Thanks, committed.

On Wed, Jul 19, 2017 at 11:21 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> Fix library path reference for `jquery.contextmenu'. This issue was only
> reproducible on Linux machine.
> So, i setup pgAdmin4 on Ubuntu VM and tested the patch and it works.
>
> Please find attached patch.
>
> Thanks,
> Surinder
>
> On Tue, Jul 18, 2017 at 9:05 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Great job Surinder, Load time ~2 sec on browser :)
>>
>> [image: Inline image 1]
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Tue, Jul 18, 2017 at 9:01 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>> Thanks, applied.
>>>
>>> On Tue, Jul 18, 2017 at 4:12 PM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
>>>> Hi
>>>>
>>>> 1. As Slickgrid has dependency of `jQuery-ui`, it was missed. now added.
>>>> 2. Column sorting for collection nodes sometimes failing when clicked
>>>> on different collection nodes.
>>>>
>>>> Please find attached patch.
>>>>
>>>> Thanks
>>>> Surinder
>>>>
>>>> On Tue, Jul 18, 2017 at 8:20 PM, Khushboo Vashi <
>>>> khushboo.va...@enterprisedb.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Jul 18, 2017 at 7:46 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>>
>>>>>> Thanks - applied!
>>>>>>
>>>>>> Awesome work - on an average of 3 tests on my Mac, load time reduced
>>>>>> from 11.55s with v1.6 to 5.53s with GIT Head.
>>>>>>
>>>>> ​Thanks to all​
>>>>
>>>>>
>>>>>> Surinder, great work...
>>>>>
>>>>>
>>>>>> On Mon, Jul 17, 2017 at 5:57 PM, Surinder Kumar <
>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Now all test cases are executing.
>>>>>>> Please find updated patch.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Surinder
>>>>>>>
>>>>>>> On Mon, Jul 17, 2017 at 6:57 PM, Surinder Kumar <
>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>
>>>>>>>> On Mon, Jul 17, 2017 at 4:52 PM, Dave Page <dp...@pgadmin.org>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> No errors now, but do you know why JS tests are being skipped?
>>>>>>>>>
>>>>>>>> ​No errors/warning in console even after settings `logLevel:
>>>>>>>> config.LOG_DEBUG`. I am still debugging.
>>>>>>>>
>>>>>>>>>
>>>>>>>>> PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 4 of 216 (skipped 212)
>>>>>>>>> SUCCESS (0.085 secs / 0.046 secs)
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>>
>>>>>>>>> On Mon, Jul 17, 2017 at 12:07 PM, Surinder Kumar <
>>>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>>>
>>>>>>>>>> ​Hi Dave,
>>>>>>>>>>
>>>>>>>>>> I didn't removed the vendor modules when i ran regression test
>>>>>>>>>> cases, so modules were being referenced from vendor dir and passed 
>>>>>>>>>> for me.
>>>>>>>>>> Now I have fixed path references and test cases are working.
>>>>>>>>>>
>>>>>>>>>> Please find attached patch.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Surinder​
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 17, 2017 at 3:18 PM, Surinder Kumar <
>>>>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>

Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-19 Thread Dave Page
Thanks, applied.

On Wed, Jul 19, 2017 at 2:40 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for few code review comments given by Ashesh.
>
> Thanks,
> Surinder
>
>
> On Wed, Jul 19, 2017 at 4:36 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> On Wed, Jul 19, 2017 at 4:27 PM, Dave Page <dp...@pgadmin.org> wrote:
>>
>>> That was a fun one to spot I'm sure!
>>>
>> ​Indeed, i had setup pgAdmin evn on Linux(as it works on Mac) and then i
>> did `ls path/to/jquery.contextmenu.js`, it was spotted :)
>>
>>>
>>> Thanks, committed.
>>>
>>> On Wed, Jul 19, 2017 at 11:21 AM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
>>>> Hi
>>>>
>>>> Fix library path reference for `jquery.contextmenu'. This issue was
>>>> only reproducible on Linux machine.
>>>> So, i setup pgAdmin4 on Ubuntu VM and tested the patch and it works.
>>>>
>>>> Please find attached patch.
>>>>
>>>> Thanks,
>>>> Surinder
>>>>
>>>> On Tue, Jul 18, 2017 at 9:05 PM, Murtuza Zabuawala <
>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>
>>>>> Great job Surinder, Load time ~2 sec on browser :)
>>>>>
>>>>> [image: Inline image 1]
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Murtuza Zabuawala
>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>> On Tue, Jul 18, 2017 at 9:01 PM, Dave Page <dp...@pgadmin.org> wrote:
>>>>>
>>>>>> Thanks, applied.
>>>>>>
>>>>>> On Tue, Jul 18, 2017 at 4:12 PM, Surinder Kumar <
>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> 1. As Slickgrid has dependency of `jQuery-ui`, it was missed. now
>>>>>>> added.
>>>>>>> 2. Column sorting for collection nodes sometimes failing when
>>>>>>> clicked on different collection nodes.
>>>>>>>
>>>>>>> Please find attached patch.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Surinder
>>>>>>>
>>>>>>> On Tue, Jul 18, 2017 at 8:20 PM, Khushboo Vashi <
>>>>>>> khushboo.va...@enterprisedb.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Jul 18, 2017 at 7:46 PM, Dave Page <dp...@pgadmin.org>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Thanks - applied!
>>>>>>>>>
>>>>>>>>> Awesome work - on an average of 3 tests on my Mac, load time
>>>>>>>>> reduced from 11.55s with v1.6 to 5.53s with GIT Head.
>>>>>>>>>
>>>>>>>> ​Thanks to all​
>>>>>>>
>>>>>>>>
>>>>>>>>> Surinder, great work...
>>>>>>>>
>>>>>>>>
>>>>>>>>> On Mon, Jul 17, 2017 at 5:57 PM, Surinder Kumar <
>>>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> Now all test cases are executing.
>>>>>>>>>> Please find updated patch.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Surinder
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 17, 2017 at 6:57 PM, Surinder Kumar <
>>>>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> On Mon, Jul 17, 2017 at 4:52 PM, Dave Page <dp...@pgadmin.org>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi
>>>>>>>>>>>>
>>>>>>>>>>>> No errors now, but do you know why JS te

pgAdmin 4 commit: Webpacking cleanups

2017-07-19 Thread Dave Page
Webpacking cleanups

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=dfa877262d67a9daaff2597d31217d9d3852
Author: Surinder Kumar 

Modified Files
--
.../js/exclusion_constraint.js |  2 -
.../templates/foreign_key/js/foreign_key.js|  2 -
.../index_constraint/static/js/primary_key.js  |  5 +-
.../static/js/unique_constraint.js |  5 +-
.../server_groups/servers/static/js/privilege.js   |  4 +-
web/pgadmin/browser/templates/browser/js/node.js   | 36 
.../dashboard/templates/dashboard/js/dashboard.js  | 99 +-
7 files changed, 104 insertions(+), 49 deletions(-)



Re: [pgAdmin4][Patch]: Improvise the treeview element selection

2017-07-24 Thread Dave Page
On Mon, Jul 24, 2017 at 8:51 AM, Shirley Wang <sw...@pivotal.io> wrote:

> Hi Surinder,
>
> This change seems to be different from the other patterns for selected /
> highlighted options. Is there a reason why this needs to be more visible
> than it already is? In terms of feedback on the tree, we have not heard any
> pains from users that this is not visible enough.
>

Yeah, I'm inclined to agree. What's your motivation for this change? I've
also never heard of any complaints about this.


>
> Shirley
>
> On Mon, Jul 24, 2017 at 12:47 PM Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi All,
>>
>> Changes:
>>
>> 1. Highlight the full selected tree item instead of highlighting only
>> label.
>> 2. Set selected item background color to dark blue that is more visible
>> to eyes.[same as in pgAdmin3]
>>
>> Please find attached patch and review.
>>
>> Thanks,
>> Surinder
>>
>


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

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


Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-20 Thread Dave Page
Ah, OK - I was working on them one at a time.

Thanks, patches applied!

On Thu, Jul 20, 2017 at 7:01 PM, Matthew Kleiman <mklei...@pivotal.io>
wrote:

> Hi Dave,
>
> In our previous email, the second patch fixed the linting issue from the
> first patch.
> However, we've remade these two patches so they both pass the linting test.
>
> Thanks,
> Matt and João
>
>
> On Thu, Jul 20, 2017 at 12:56 PM, Dave Page <dp...@pgadmin.org> wrote:
>
>>
>>
>> On Thu, Jul 20, 2017 at 2:18 PM, Joao De Almeida Pereira <
>> jdealmeidapere...@pivotal.io> wrote:
>>
>>> Hello Dave,
>>> Did you use the latest one patch we sent?
>>> We realised that this was an issue in the second email we sent.
>>>
>> Just checked again, and yes, that was the third and latest version I've
>> received..
>>
>>
>>
>>> Thanks
>>> Joao
>>>
>>> On Thu, Jul 20, 2017, 8:15 AM Dave Page <dp...@pgadmin.org> wrote:
>>>
>>>> Hi
>>>>
>>>> On Wed, Jul 19, 2017 at 8:33 PM, Shruti Iyer <si...@pivotal.io> wrote:
>>>>
>>>>> Hi again!
>>>>>
>>>>> Attached are the most updated patches. We found an issue with the
>>>>> previous implementation. So we generated the new patches.
>>>>>
>>>>
>>>> The 01 patch fails linting:
>>>>
>>>> /Users/dpage/git/pgadmin4/web/regression/javascript/history/
>>>> query_history_spec.jsx
>>>>   188:9   error  Expected indentation of 10 spaces but found 8   indent
>>>>   196:7   error  Expected indentation of 8 spaces but found 6indent
>>>>   198:7   error  Expected indentation of 8 spaces but found 6indent
>>>>   202:12  error  Expected indentation of 10 spaces but found 11  indent
>>>>   205:11  error  Expected indentation of 8 spaces but found 10   indent
>>>>   212:9   error  Expected indentation of 10 spaces but found 8   indent
>>>>   214:11  error  Expected indentation of 8 spaces but found 10   indent
>>>>   217:11  error  Expected indentation of 12 spaces but found 10  indent
>>>>   219:9   error  Expected indentation of 6 spaces but found 8indent
>>>>
>>>> Can you please fix that up and double-check the tests pass?
>>>>
>>>> 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
>>
>
>


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

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


Re: [pgadmin-hackers][pgaweb][patch] Update SCSS of styleguide

2017-07-20 Thread Dave Page
Thanks, applied.

On Thu, Jul 20, 2017 at 8:23 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
> This patch updates the SCSS files of the styleguide to move all the colors
> into variables to be easier to use in the application.
>
> Thanks
> Joao && Matt
>



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

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


Re: [pgadmin-hackers][patch]

2017-07-24 Thread Dave Page
Thanks, applied.

On Fri, Jul 21, 2017 at 10:38 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi hackers,
> With the last commits, the behavior of focusing on a selected entry when
> entering the History Tab was not working as expected.
> This patch will bring this behavior back.
>
> Thanks
> Joao & Matt
>



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

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


  1   2   3   4   5   6   7   8   9   10   >