[pgadmin-hackers] pgAdmin 4 commit: Load the collection node sorted on order by 'label'.

2016-06-02 Thread Ashesh Vashi
Load the collection node sorted on order by 'label'.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/utils.py | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Do proper validation of the server node.

2016-06-02 Thread Ashesh Vashi
Do proper validation of the server node.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8313bc9b8aeba2eb564622094c1ac4d03494e119

Modified Files
--
.../servers/templates/servers/servers.js   | 42 +++---
1 file changed, 29 insertions(+), 13 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Select parent node when deleting/dropping the last ch

2016-06-02 Thread Ashesh Vashi
Select parent node when deleting/dropping the last children.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=57f3cbfa3b01277ae99d7eb39b0a330b4ceaf547

Modified Files
--
web/pgadmin/browser/templates/browser/js/node.js | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fixes #1104 - Load the first level node properly, whe

2016-06-02 Thread Ashesh Vashi
Fixes #1104 - Load the first level node properly, whenever we add first
node under it, and select that node.

This fixes the problem of adding first server.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=05a3d509bc36cc500af07793b6af7ebf11668843

Modified Files
--
web/pgadmin/browser/templates/browser/js/node.js | 68 +++-
1 file changed, 67 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: pgAdmin4 debian installer

2016-06-02 Thread Dave Page
Devrim only works on Redhat, so I'll take a look at this myself.

Thanks.

BTW - I need the completed and working Windows build scripts tomorrow AM,
my time!

On Thu, Jun 2, 2016 at 5:16 PM, Paresh More 
wrote:

> Hello Dave and Devrim,
>
>
> Changes are done as per discussed with Sandeep.
>
> There are some python modules which are not available on ubuntu (through
> apt-get) which is mentioned in the sheet here , We could find some packages
> on web and the URLs of same have been updated in the sheet. For the
> packages that are not available, we have to build them on our own.
>
>
> https://docs.google.com/spreadsheets/d/13CIYR82twj0LIUteFSZR7RE8ZbtUfvCqykXw1wy3gzE/edit#gid=1213443181
>
>
> Attached is the patch for pgadmin4 debian package.  I have also attached
> runtime server patch separately (This is already included in the rpm patch
> sent by Sandeep)
>
>
>
>
> On Mon, May 9, 2016 at 6:45 PM, Dave Page 
> wrote:
>
>> Hi
>>
>> Please see my earlier comments regarding the RPM packages - many of them
>> apply to this patch as well:
>> http://www.postgresql.org/message-id/ca+ocxoxbdt82p75q4cy4fbkznkpbw3yjwpz+wfarbbbsoi3...@mail.gmail.com
>>
>> By way of additional comment, why does pkg/deb/README include a bunch of
>> boiler-plate text that I wrote long ago for the top-level README? It's out
>> of date now, and shouldn't be in a packaging README anyway.
>>
>> Thanks.
>>
>> On Tue, Apr 26, 2016 at 4:20 PM, Paresh More <
>> paresh.m...@enterprisedb.com> wrote:
>>
>>> Hi Team, Dave,
>>>
>>> debian package is located @ location
>>>
>>> pgadmin4-web
>>>
>>> https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284
>>>
>>> pgadmin4-runtime
>>>
>>> https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5
>>>
>>> Attached herewith are two patches.
>>>
>>> pgadmin4_debian.patch - This is the main patch that includes
>>> Makefile,README,debian scripts
>>>
>>> It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
>>> The  pgadmin4-runtime depends on web and the web debian depends on the
>>> python packages.
>>> I have listed some packages which are not available on some systems so
>>> that Devrim can build them.
>>>
>>> The installation path for pgadmin4 is "/usr/pgadmin4/."
>>> and pgadmin4-web is the site-packages/pgadmin4-web
>>>
>>> As per rpm patch (*sandeep mentioned*) below is the comment which
>>> applies same for debian.
>>>
>>> *pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp.
>>> As said pgadmin4-web and runtime installation directories are different and
>>> that means web does not exists in parallel to runtime like in sources.
>>>
>>> *Sandeep comments*
>>>
>>> *“I observed that the location of application settings was not defined
>>> in*
>>> *Server.cpp. As per QSettings doc, the default location on Unix is the*
>>> *$HOME/.config//.conf. Here, $HOME depends on the
>>> user*
>>> *that runs the application. So, I thought why not to define the
>>> application*
>>> *settings in application directory itself. RPM then knows where to
>>> define*
>>> *the ApplicationPath. I tested it and it worked fine with me. I haven't
>>> done*
>>> *this change for platform dependent*
>>>
>>> *Another change that I did in this file is that, I observed that
>>> canonicalPath()*
>>> *was not giving the absolute path (by removing the sym link and the*
>>> *redundant ".." as per doc). Hence, I used absolutePath() for the
>>> paths[i]*
>>> *that are relative (../web, etc) and not for the already absolute path
>>> (ex.*
>>> *ApplicationPath like /usr/lib/python2.7/site-packages/pgadmin4-web)”*
>>>
>>> What the patch will create ?
>>> - It would create deb folder in pkg
>>> - It would create Makefile, README and debian scripts
>>>
>>>
>>> --
>>>
>>> Thanks & Regards
>>>
>>> *Paresh More*
>>>
>>> [image: NEW-EDB-logo-4c]
>>>
>>> Pune, India.
>>> Cell :  +919922000564 |  www.enterprisedb.com
>>>
>>
>>
>>
>> --
>> Dave Page
>> VP, Chief Architect, Tools & Installers
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>
>
>
> --
>
> Thanks & Regards
>
> *Paresh More*
>
> [image: NEW-EDB-logo-4c]
>
> Pune, India.
> Cell :  +919922000564 |  www.enterprisedb.com
>



-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


Re: [pgadmin-hackers] PATCH: pgAdmin4 debian installer

2016-06-02 Thread Paresh More
Hello Dave and Devrim,


Changes are done as per discussed with Sandeep.

There are some python modules which are not available on ubuntu (through
apt-get) which is mentioned in the sheet here , We could find some packages
on web and the URLs of same have been updated in the sheet. For the
packages that are not available, we have to build them on our own.

https://docs.google.com/spreadsheets/d/13CIYR82twj0LIUteFSZR7RE8ZbtUfvCqykXw1wy3gzE/edit#gid=1213443181


Attached is the patch for pgadmin4 debian package.  I have also attached
runtime server patch separately (This is already included in the rpm patch
sent by Sandeep)




On Mon, May 9, 2016 at 6:45 PM, Dave Page 
wrote:

> Hi
>
> Please see my earlier comments regarding the RPM packages - many of them
> apply to this patch as well:
> http://www.postgresql.org/message-id/ca+ocxoxbdt82p75q4cy4fbkznkpbw3yjwpz+wfarbbbsoi3...@mail.gmail.com
>
> By way of additional comment, why does pkg/deb/README include a bunch of
> boiler-plate text that I wrote long ago for the top-level README? It's out
> of date now, and shouldn't be in a packaging README anyway.
>
> Thanks.
>
> On Tue, Apr 26, 2016 at 4:20 PM, Paresh More  > wrote:
>
>> Hi Team, Dave,
>>
>> debian package is located @ location
>>
>> pgadmin4-web
>>
>> https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284
>>
>> pgadmin4-runtime
>>
>> https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5
>>
>> Attached herewith are two patches.
>>
>> pgadmin4_debian.patch - This is the main patch that includes
>> Makefile,README,debian scripts
>>
>> It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
>> The  pgadmin4-runtime depends on web and the web debian depends on the
>> python packages.
>> I have listed some packages which are not available on some systems so
>> that Devrim can build them.
>>
>> The installation path for pgadmin4 is "/usr/pgadmin4/." and
>> pgadmin4-web is the site-packages/pgadmin4-web
>>
>> As per rpm patch (*sandeep mentioned*) below is the comment which
>> applies same for debian.
>>
>> *pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp.
>> As said pgadmin4-web and runtime installation directories are different and
>> that means web does not exists in parallel to runtime like in sources.
>>
>> *Sandeep comments*
>>
>> *“I observed that the location of application settings was not defined in*
>> *Server.cpp. As per QSettings doc, the default location on Unix is the*
>> *$HOME/.config//.conf. Here, $HOME depends on the
>> user*
>> *that runs the application. So, I thought why not to define the
>> application*
>> *settings in application directory itself. RPM then knows where to define*
>> *the ApplicationPath. I tested it and it worked fine with me. I haven't
>> done*
>> *this change for platform dependent*
>>
>> *Another change that I did in this file is that, I observed that
>> canonicalPath()*
>> *was not giving the absolute path (by removing the sym link and the*
>> *redundant ".." as per doc). Hence, I used absolutePath() for the
>> paths[i]*
>> *that are relative (../web, etc) and not for the already absolute path
>> (ex.*
>> *ApplicationPath like /usr/lib/python2.7/site-packages/pgadmin4-web)”*
>>
>> What the patch will create ?
>> - It would create deb folder in pkg
>> - It would create Makefile, README and debian scripts
>>
>>
>> --
>>
>> Thanks & Regards
>>
>> *Paresh More*
>>
>> [image: NEW-EDB-logo-4c]
>>
>> Pune, India.
>> Cell :  +919922000564 |  www.enterprisedb.com
>>
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>



-- 

Thanks & Regards

*Paresh More*

[image: NEW-EDB-logo-4c]

Pune, India.
Cell :  +919922000564 |  www.enterprisedb.com


pgadmin4_debian_1_June_16.patch
Description: Binary data


pgadmin_server_debian_1_June_16.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Patch for pgAdmin4 RPM package

2016-06-02 Thread Sandeep Thakkar
Hi Devrim, Hi Dave,

I have updated the patch. The earlier patch may fail because of app bundle
commit in git.

For testing, you may define the source tarball location as :
Source0:
http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz

Known issue that I'm still working on:
1. web rpm has a dependency on doc. But, even if I install doc, the web
still complains. Here is the scenario:
[root@localhost tmp]# rpm -ivh
dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
error: Failed dependencies:
*pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch*
... ( trimmed the python dependencies list here...)

[root@localhost tmp]# rpm -ivh
dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
Preparing...  #
[100%]
Updating / installing...
   1:pgadmin4-docs-1.0_dev-1.rhel7#
[100%]


[root@localhost tmp]# yum list | grep pgadmin4-docs
pgadmin4-docs.noarch1.0_dev-1.rhel7
 installed


[root@localhost tmp]# rpm -ivh
dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
error: Failed dependencies:
*pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch*
--

Thanks!

On Thu, Jun 2, 2016 at 6:29 PM, Sandeep Thakkar <
sandeep.thak...@enterprisedb.com> wrote:

> Hi
>
> Few changes in the updated patch:
> - added the missing modules in the specfile. The unavailable modules are
> still commented.
> - added changelog in specfile
> - added dependency of pgadmin4-doc on pgadmin4-web
>
> On Wed, Jun 1, 2016 at 2:57 PM, Sandeep Thakkar <
> sandeep.thak...@enterprisedb.com> wrote:
>
>> Hi Devrim,
>>
>> I have attached the patch for review. Please note that right now I have
>> commented the python dependencies (in Requires) which you are building.
>> Please review and let me know if specfile or anything else needs some
>> changes. Once the rpms are built, please let me know how to install them so
>> that I will enable those dependencies and do the testing.
>>
>> Hi Dave,
>>
>> The rpm will be built in $SRC/rpm-build. Inside this, we have the
>> directories for sources (where tarball will be downloaded - for testing, I
>> have mentioned the path of Bugatti :) ), build, etc.
>>
>> The html docs was not building and I had to make changes in docs/conf.py
>> and install sphinx_rtd_theme. I have added this dependency and the Sphinx
>> in the specfile. May be should add it in the requirements also? I tested
>> this change on OS X and make docs is building fine.
>>
>> Since web package is installed in the default python site-packages as
>> pgadmin4-web-v1 (for release "1"), with the help of Neel, I could made
>> changes in Server.cpp to find that location. But, couldn't understand how
>> to get the app release info, hence right now hard-coded the string as
>> 'pgadmin4-web-v1".
>>
>> Note: In the patch, the Makefile and .gitignore also contains the mac
>> related changes. This is just to see how they will look finally after mac
>> and rpm changes are done. I will remove them from the rpm patch once the
>> mac appbundle patch is committed.
>>
>> Questions:
>> 1. Should we add 'docs' dependency target for 'rpm' like we did for
>> appbundle?
>> 2. Should web rpm require doc rpm? I guess so, otherwise online help
>> won't work. Right?
>>
>> On Fri, May 27, 2016 at 6:35 PM, Dave Page  wrote:
>>
>>> [Adding Devrim]
>>>
>>> On Fri, May 27, 2016 at 1:55 PM, Sandeep Thakkar
>>>  wrote:
>>> >
>>> >
>>> > On Mon, May 9, 2016 at 6:35 PM, Dave Page  wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> Initial eyeball review comments below...
>>> >>
>>> >> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar
>>> >>  wrote:
>>> >>>
>>> >>> Hi Team, Dave,
>>> >>>
>>> >>> Attached herewith are two patches.
>>> >>>
>>> >>> pgadmin4-rpm.patch - This is the main patch that includes scripts,
>>> >>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>>> >>
>>> >>
>>> >> Can we keep the directory names in lower case?
>>> >>
>>> >
>>> > Sure. Will do that.
>>> >>>
>>> >>> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4
>>> tpm
>>> >>> depends on web and the web rpm depends on the python packages. I have
>>> >>> commented the list of packages which are not available on some
>>> systems so
>>> >>> that Devrim can build them.
>>> >>>
>>> >>> The installation path for pgadmin4 is
>>> "/usr/pgadmin4-." and
>>> >>> pgadmin4-web is the site-packages/pgadmin4-web
>>> >>
>>> >> Shouldn't the -web package also have the major.minor version number
>>> in the
>>> >> path, to allow side-by-side installation?
>>> >
>>> > Right. Now that we don't have major/minor, so, will it be
>>> /usr/pgadmin4-v1
>>> > and pgadmin4-web-v1 ? Or?
>>>
>>> I think that's fine.
>>>
>>> >>
>>> >>
>>> >>>
>>> >>> pgadmin4-server-ini.patch - This is the patch for
>>> runtime/Server.cpp. As
>>> >>> said 

Re: [pgadmin-hackers] PATCH: To fix expanding server if server inaccessible (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi Dave/Ashesh,

Please find patch for the dashboard issue, Please review it.

I tried with both config options "threaded=True" & "threaded=False", In
both cases this fix working fine.



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

On Thu, Jun 2, 2016 at 7:02 PM, Ashesh Vashi 
wrote:

> I will look into it..
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
> On Thu, Jun 2, 2016 at 6:23 PM, Dave Page  wrote:
>
>> On Tue, May 31, 2016 at 3:43 PM, Murtuza Zabuawala
>>  wrote:
>> > Hi,
>> >
>> > As advised by Ashesh, I have tried flask 'threaded' options for this
>> issues
>> > & it fixed the issue.
>> >
>> > PFA patches to fix long load delay when expanding server if server is
>> > inaccessible.
>> > (RM#1185).
>>
>> This appears to have broken the dashboards - the graphs now
>> periodically flash up error messages. On the console this coincides
>> with:
>>
>> 2016-06-02 13:50:37,494: ERROR pgadmin: Exception on
>> /dashboard/tps_stats/1 [GET]
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1817, in wsgi_app
>> response = self.full_dispatch_request()
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1477, in full_dispatch_request
>> rv = self.handle_user_exception(e)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1381, in handle_user_exception
>> reraise(exc_type, exc_value, tb)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1475, in full_dispatch_request
>> rv = self.dispatch_request()
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1461, in dispatch_request
>> return self.view_functions[rule.endpoint](**req.view_args)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py",
>> line 758, in decorated_view
>> return func(*args, **kwargs)
>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
>> line 147, in wrap
>> return f(*args, **kwargs)
>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
>> line 258, in tps_stats
>> return get_data(sid, did, 'tps_stats.sql')
>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
>> line 220, in get_data
>> "/".join([server_info['template_path'], template]), did=did
>> KeyError: 'template_path'
>>
>> (or a similar error about another member in server_info).
>>
>> I'm guessing this means that data is not being made available to each
>> thread? We need to fix this ASAP so we're ready to release tomorrow.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>


Fix_dashborad.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Re: [pgAdmin4][Patch]: RM#1293 - SQL pane is not displaying GRANT queries in Function, Procedure and Trigger node

2016-06-02 Thread Surinder Kumar
Please ignore this patch. I will send another patch.

On Thu, Jun 2, 2016 at 7:25 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch for RM#1293.
> Add support to display GRANT privilege query in SQL Pane.
>
> Please review.
>
> Thanks,
> Surinder Kumar
>


[pgadmin-hackers] [pgAdmin4][Patch]: RM#1293 - SQL pane is not displaying GRANT queries in Function, Procedure and Trigger node

2016-06-02 Thread Surinder Kumar
Hi,

Please find attached patch for RM#1293.
Add support to display GRANT privilege query in SQL Pane.

Please review.

Thanks,
Surinder Kumar


display_GRANT_queries_in_SQL_PANE.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] User management functionality patch [pgadmin4]

2016-06-02 Thread Harshal Dhumal
Hi,

This patch requires backgrid password cell for I have sent patch yesterday.

-- 
*Harshal Dhumal*
*Software Engineer*

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

On Thu, Jun 2, 2016 at 7:12 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for user management functionality.
>
> Major changes in this patch are:
>
> 1. In-place editing of user and saving on server.
> 2. Removed dependency on marshmallow python package.
> 3. UI improvements.
> 4. Search by email.
>
>
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Tue, May 31, 2016 at 4:24 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Tue, May 31, 2016 at 2:45 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, May 31, 2016 at 9:52 AM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>



 On Tue, May 31, 2016 at 1:26 PM, Dave Page  wrote:

> Yeah, I was about to reply on this too;
>
> - Why do we need Marshmallow?
>
> - Why do we need a role system? Perhaps in the future we might have
> shared servers, and roles that cannot modify them, but not now.
>
 Hmm..
 He just added one more role - 'Standard'.
 'Administrator' role was already presents in it.

>>>
>>> Oh yes, sorry, misread that. 'pgAdmin User Role' would be a better
>>> description though I think.
>>>
>> Yeah - that can be done. :-)
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


Re: [pgadmin-hackers] User management functionality patch [pgadmin4]

2016-06-02 Thread Harshal Dhumal
Hi,

PFA patch for user management functionality.

Major changes in this patch are:

1. In-place editing of user and saving on server.
2. Removed dependency on marshmallow python package.
3. UI improvements.
4. Search by email.





-- 
*Harshal Dhumal*
*Software Engineer*

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

On Tue, May 31, 2016 at 4:24 PM, Ashesh Vashi  wrote:

> On Tue, May 31, 2016 at 2:45 PM, Dave Page  wrote:
>
>>
>>
>> On Tue, May 31, 2016 at 9:52 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>>
>>> On Tue, May 31, 2016 at 1:26 PM, Dave Page  wrote:
>>>
 Yeah, I was about to reply on this too;

 - Why do we need Marshmallow?

 - Why do we need a role system? Perhaps in the future we might have
 shared servers, and roles that cannot modify them, but not now.

>>> Hmm..
>>> He just added one more role - 'Standard'.
>>> 'Administrator' role was already presents in it.
>>>
>>
>> Oh yes, sorry, misread that. 'pgAdmin User Role' would be a better
>> description though I think.
>>
> Yeah - that can be done. :-)
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
diff --git a/TODO.txt b/TODO.txt
index 93abba0..1df1305 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -45,3 +45,11 @@ Graphical Explain
 * Explanation on the statistic for the graphical explain plan.
 * Arrow colouring based on the percentage of the cost, and time taken on each
   explain node.
+
+User management
+---
+1. Pagination should be there if there are large number of users.
+2. There should be a way of notifying the user once its password is changed by any administrator.
+3. We can add 'created by' column.
+4. User creation and last modified time.
+5. If current user changes its own name/email, main page should reflect new changes.
\ No newline at end of file
diff --git a/web/config.py b/web/config.py
index 4dd6c76..8f043b2 100644
--- a/web/config.py
+++ b/web/config.py
@@ -150,7 +150,7 @@ MAX_SESSION_IDLE_TIME = 60
 
 # The schema version number for the configuration database
 # DO NOT CHANGE UNLESS YOU ARE A PGADMIN DEVELOPER!!
-SETTINGS_SCHEMA_VERSION = 10
+SETTINGS_SCHEMA_VERSION = 11
 
 # The default path to the SQLite database used to store user accounts and
 # settings. This default places the file in the same directory as this
diff --git a/web/pgadmin/static/css/overrides.css b/web/pgadmin/static/css/overrides.css
index 55d83e0..d746a10 100755
--- a/web/pgadmin/static/css/overrides.css
+++ b/web/pgadmin/static/css/overrides.css
@@ -1232,3 +1232,37 @@ form[name="change_password_form"] .help-block {
 visibility: hidden;
   }
 }
+
+.subnode-footer {
+  text-align: right;
+  border-color: #a9a9a9;
+  border-style: inset inset inset solid;
+  border-width: 2px 1px 0;
+  margin-top: -10px;
+}
+
+.subnode-footer .ajs-button {
+  margin: 2px 2px 0;
+}
+
+.user_management {
+  margin: 0 10px !important;
+  border: 1px solid #ccc;
+  width: calc(100% - 20px);
+  height: 100%;
+  overflow: hidden;
+}
+
+.user_management .search_users form {
+  margin: 0;
+}
+
+.user_management table {
+  display: block;
+  height: 100%;
+  overflow: auto;
+}
+
+.user_management .backform-tab {
+  height: calc(100% - 75px);
+}
\ No newline at end of file
diff --git a/web/pgadmin/tools/user_management/__init__.py b/web/pgadmin/tools/user_management/__init__.py
new file mode 100644
index 000..324ea4d
--- /dev/null
+++ b/web/pgadmin/tools/user_management/__init__.py
@@ -0,0 +1,327 @@
+##
+#
+# pgAdmin 4 - PostgreSQL Tools
+#
+# Copyright (C) 2013 - 2016, The pgAdmin Development Team
+# This software is released under the PostgreSQL Licence
+#
+##
+
+"""Implements pgAdmin4 User Management Utility"""
+
+import json
+import re
+
+from flask import render_template, request, \
+url_for, Response, abort
+from flask.ext.babel import gettext as _
+from flask.ext.security import login_required, roles_required, current_user
+
+from pgadmin.utils.ajax import make_response as ajax_response,\
+make_json_response, bad_request, internal_server_error
+from pgadmin.utils import PgAdminModule
+from pgadmin.model import db, Role, User, UserPreference, Server,\
+ServerGroup, Process, Setting
+from flask.ext.security.utils import encrypt_password
+
+# set template path for sql scripts
+MODULE_NAME = 'user_management'
+server_info = {}
+
+
+class UserManagementModule(PgAdminModule):

Re: [pgadmin-hackers] PATCH: To fix expanding server if server inaccessible (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
I will look into it..

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Thu, Jun 2, 2016 at 6:23 PM, Dave Page  wrote:

> On Tue, May 31, 2016 at 3:43 PM, Murtuza Zabuawala
>  wrote:
> > Hi,
> >
> > As advised by Ashesh, I have tried flask 'threaded' options for this
> issues
> > & it fixed the issue.
> >
> > PFA patches to fix long load delay when expanding server if server is
> > inaccessible.
> > (RM#1185).
>
> This appears to have broken the dashboards - the graphs now
> periodically flash up error messages. On the console this coincides
> with:
>
> 2016-06-02 13:50:37,494: ERROR pgadmin: Exception on
> /dashboard/tps_stats/1 [GET]
> Traceback (most recent call last):
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1817, in wsgi_app
> response = self.full_dispatch_request()
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1477, in full_dispatch_request
> rv = self.handle_user_exception(e)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1381, in handle_user_exception
> reraise(exc_type, exc_value, tb)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1475, in full_dispatch_request
> rv = self.dispatch_request()
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1461, in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py",
> line 758, in decorated_view
> return func(*args, **kwargs)
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
> line 147, in wrap
> return f(*args, **kwargs)
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
> line 258, in tps_stats
> return get_data(sid, did, 'tps_stats.sql')
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
> line 220, in get_data
> "/".join([server_info['template_path'], template]), did=did
> KeyError: 'template_path'
>
> (or a similar error about another member in server_info).
>
> I'm guessing this means that data is not being made available to each
> thread? We need to fix this ASAP so we're ready to release tomorrow.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


Re: [pgadmin-hackers] Patch for pgAdmin4 package on Mac OS X

2016-06-02 Thread Sandeep Thakkar
okay. Thanks again!

On Thu, Jun 2, 2016 at 6:37 PM, Dave Page  wrote:

> On Thu, Jun 2, 2016 at 2:05 PM, Sandeep Thakkar
>  wrote:
> > Thanks Dave!
> >
> > I saw the runtime code and observed one change (prepend -> append) . Was
> it
> > not saving the location because of this?
>
> No - I changed that because if the value is prepended, the user cannot
> override it. This way anything explicitly defined by the user will
> take priority.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar


Re: [pgadmin-hackers] Patch for pgAdmin4 package on Mac OS X

2016-06-02 Thread Dave Page
On Thu, Jun 2, 2016 at 2:05 PM, Sandeep Thakkar
 wrote:
> Thanks Dave!
>
> I saw the runtime code and observed one change (prepend -> append) . Was it
> not saving the location because of this?

No - I changed that because if the value is prepended, the user cannot
override it. This way anything explicitly defined by the user will
take priority.

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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Patch for pgAdmin 4 docs

2016-06-02 Thread Dave Page
Thanks - pushed!

On Wed, Jun 1, 2016 at 1:24 PM, Susan Douglas
 wrote:
> Hi All,
>
> I've attached a patch for the pgAdmin 4 docs... let me know if there are any 
> problems!
>
> Thanks!
>
> -- Susan
>



-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Patch for pgAdmin4 package on Mac OS X

2016-06-02 Thread Sandeep Thakkar
Thanks Dave!

I saw the runtime code and observed one change (prepend -> append) . Was it
not saving the location because of this?

On Thu, Jun 2, 2016 at 6:27 PM, Dave Page  wrote:

> Thanks - applied with some tweaks to the runtime code (i.e. not saving
> the location of the venv in the appbundle).
>
> On Tue, May 31, 2016 at 6:37 PM, Sandeep Thakkar
>  wrote:
> > Hi Dave,
> >
> >
> > On Tue, May 31, 2016 at 9:29 PM, Dave Page  wrote:
> >>
> >> Hi,
> >>
> >> On the first run, I get:
> >>
> >> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/pgAdmin
> >> 4.app
> >> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directory
> >> Cleaning up
> >> Copying data into temporary directory
> >> cp: ./../mac-build/pgAdmin 4.app: No such file or directory
> >> create-dmg.sh failed
> >> make: *** [appbundle] Error 1
> >>
> >> If I run it again, I get:
> >>
> >> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/pgAdmin
> >> 4.app
> >> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directory
> >> Directory ./pgadmin4-1.0-dev.dmg.src already exists. Please delete it
> >> manually.
> >> create-dmg.sh failed
> >> make: *** [appbundle] Error 1
> >>
> >> If I manually create $SRC/dist, it's much happier.
> >>
> > I have used variable for dist. It will create the directory if doesn't
> > exist. The clean-appbunde will also remove the .src directory in dist
> just
> > in case it is present.
> >
> >> Other issues:
> >>
> >> - Your changes to the runtime don't seem to help. I've been staring at
> >> the code for an hour or so now, and I can't see the issue though. We
> >> may need some fresh eyes.
> >>
> > yeah, I also spent more time to see the code and test it. Infact, I could
> > hardly reproduce it 1 or 2 times.
> >
> >>
> >> - pkg/mac/create-dmg.sh is mixing upper and lower case variable names
> >> and with/without _, e.g. $dmgname vs $DMG_NAME
> >>
> > not sure, why I used lower case, I prefer upper case always. I have made
> the
> > changes now to use upper case for all variables.
> >
> >>
> >> - Shoudn't DMG_NAME be initialised to `grep "^APP_NAME" web/config.py
> >> | cut -d"=" -f2 | sed "s/'//g"` ?
> >>
> > yes, I have used the couple of more variables that gives proper
> > understanding.
> >
> > Thanks! I have attached the updated patch. (runtime changes remains
> same).
> >>
> >>
> >> On Tue, May 31, 2016 at 1:19 PM, Sandeep Thakkar
> >>  wrote:
> >> > Somehow the patch skipped the Makefile changes. Attached is the
> updated
> >> > patch.
> >> >
> >> > On Mon, May 30, 2016 at 6:00 PM, Sandeep Thakkar
> >> >  wrote:
> >> >>
> >> >> Thanks. I have fixed all the issues.
> >> >>
> >> >> Regarding the app not running from within the DMG for the first
> time, I
> >> >> was unable to reproduce it on Zilan's machine which didn't have the
> >> >> development env. On Murali's machine, it was reproducible for 1 time
> >> >> after
> >> >> couple of attempts.
> >> >>
> >> >> So, I just added the sync statement after settings the pythonpath
> value
> >> >> in
> >> >> the settings. May be this will resolve the issue. Please confirm.
> >> >> settings.sync();
> >> >>
> >> >> Attached is the updated patch. Thanks.
> >> >>
> >> >> On Fri, May 27, 2016 at 9:28 PM, Dave Page 
> wrote:
> >> >>>
> >> >>> On Fri, May 27, 2016 at 4:48 PM, Dave Page 
> wrote:
> >> >>> >
> >> >>> >
> >> >>> > On Fri, May 27, 2016 at 1:11 PM, Sandeep Thakkar
> >> >>> >  wrote:
> >> >>> >>
> >> >>> >> Sure. Thanks.
> >> >>> >>
> >> >>> >> There is a typo in pkg/mac/build.sh. i.e
> >> >>> >>
> >> >>> >> s/HTML_HELP/HELP_PATH/
> >> >>> >>
> >> >>> >>
> >> >>> >> On Fri, May 27, 2016 at 5:26 PM, Dave Page 
> >> >>> >> wrote:
> >> >>> >>>
> >> >>> >>> Not entirely - we definitely need to improve it. I'll review the
> >> >>> >>> code
> >> >>> >>> as
> >> >>> >>> it is now though.
> >> >>> >
> >> >>> >
> >> >>> > OK, review time :-)
> >> >>> >
> >> >>> > - The appbundle name should be created from APP_NAME.app in
> >> >>> > config.py,
> >> >>> > e.g.
> >> >>> > 'pgAdmin 4.app'
> >> >>> >
> >> >>> > - The DMG name should be created from
> >> >>> > to_lower(remove_spaces(APP_NAME-APP_VERSION)) in config.py, e.g.
> >> >>> > pgadmin4-1.0-dev.dmg
> >> >>> >
> >> >>> > - Use #ifdef Q_OS_MAC in the QT code for Mac-specific code.
> There's
> >> >>> > no
> >> >>> > need
> >> >>> > to define another macro.
> >> >>> >
> >> >>> > - Please add "MINIFY_HTML = False" to config_local.py (and have
> >> >>> > Paresh
> >> >>> > do
> >> >>> > the same on his packages). This works around a code issue with the
> >> >>> > docs
> >> >>> > that
> >> >>> > I'll log a bug for.
> >> >>> >
> >> >>> > - In testing, I found that running the app from within the DMG
> >> >>> > doesn't
> >> >>> > seem
> >> >>> > to work 

[pgadmin-hackers] pgAdmin 4 commit: Table dialog and backup tool docs

2016-06-02 Thread Dave Page
Table dialog and backup tool docs

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e47671edaa3ae9e0b6db6ebb96468029b1d26095
Author: Susan Douglas 

Modified Files
--
docs/en_US/backup_dialog.rst   | 113 
docs/en_US/images/backup_disable.png   | Bin 0 -> 22217 bytes
docs/en_US/images/backup_do_not_save.png   | Bin 0 -> 27911 bytes
docs/en_US/images/backup_general.png   | Bin 0 -> 47417 bytes
docs/en_US/images/backup_messages.png  | Bin 0 -> 37279 bytes
docs/en_US/images/backup_miscellaneous.png | Bin 0 -> 31401 bytes
docs/en_US/images/backup_objects.png   | Bin 0 -> 26553 bytes
docs/en_US/images/backup_process_watcher.png   | Bin 0 -> 141087 bytes
docs/en_US/images/backup_queries.png   | Bin 0 -> 31859 bytes
docs/en_US/images/backup_sections.png  | Bin 0 -> 25545 bytes
docs/en_US/images/table_advanced.png   | Bin 0 -> 60150 bytes
docs/en_US/images/table_auto_vacuum.png| Bin 0 -> 68787 bytes
docs/en_US/images/table_check.png  | Bin 0 -> 55401 bytes
docs/en_US/images/table_columns.png| Bin 0 -> 44680 bytes
docs/en_US/images/table_exclude.png| Bin 0 -> 61348 bytes
docs/en_US/images/table_foreign_key.png| Bin 0 -> 59644 bytes
docs/en_US/images/table_general.png| Bin 0 -> 39679 bytes
docs/en_US/images/table_primary_key.png| Bin 0 -> 56633 bytes
docs/en_US/images/table_security.png   | Bin 0 -> 46246 bytes
docs/en_US/images/table_sql.png| Bin 0 -> 75496 bytes
docs/en_US/images/table_unique.png | Bin 0 -> 58170 bytes
docs/en_US/index.rst   |   2 +-
docs/en_US/table_dialog.rst| 292 +
.../schemas/tables/templates/table/js/table.js |   1 +
24 files changed, 407 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Patch for pgAdmin4 RPM package

2016-06-02 Thread Sandeep Thakkar
Hi

Few changes in the updated patch:
- added the missing modules in the specfile. The unavailable modules are
still commented.
- added changelog in specfile
- added dependency of pgadmin4-doc on pgadmin4-web

On Wed, Jun 1, 2016 at 2:57 PM, Sandeep Thakkar <
sandeep.thak...@enterprisedb.com> wrote:

> Hi Devrim,
>
> I have attached the patch for review. Please note that right now I have
> commented the python dependencies (in Requires) which you are building.
> Please review and let me know if specfile or anything else needs some
> changes. Once the rpms are built, please let me know how to install them so
> that I will enable those dependencies and do the testing.
>
> Hi Dave,
>
> The rpm will be built in $SRC/rpm-build. Inside this, we have the
> directories for sources (where tarball will be downloaded - for testing, I
> have mentioned the path of Bugatti :) ), build, etc.
>
> The html docs was not building and I had to make changes in docs/conf.py
> and install sphinx_rtd_theme. I have added this dependency and the Sphinx
> in the specfile. May be should add it in the requirements also? I tested
> this change on OS X and make docs is building fine.
>
> Since web package is installed in the default python site-packages as
> pgadmin4-web-v1 (for release "1"), with the help of Neel, I could made
> changes in Server.cpp to find that location. But, couldn't understand how
> to get the app release info, hence right now hard-coded the string as
> 'pgadmin4-web-v1".
>
> Note: In the patch, the Makefile and .gitignore also contains the mac
> related changes. This is just to see how they will look finally after mac
> and rpm changes are done. I will remove them from the rpm patch once the
> mac appbundle patch is committed.
>
> Questions:
> 1. Should we add 'docs' dependency target for 'rpm' like we did for
> appbundle?
> 2. Should web rpm require doc rpm? I guess so, otherwise online help won't
> work. Right?
>
> On Fri, May 27, 2016 at 6:35 PM, Dave Page  wrote:
>
>> [Adding Devrim]
>>
>> On Fri, May 27, 2016 at 1:55 PM, Sandeep Thakkar
>>  wrote:
>> >
>> >
>> > On Mon, May 9, 2016 at 6:35 PM, Dave Page  wrote:
>> >>
>> >> Hi
>> >>
>> >> Initial eyeball review comments below...
>> >>
>> >> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar
>> >>  wrote:
>> >>>
>> >>> Hi Team, Dave,
>> >>>
>> >>> Attached herewith are two patches.
>> >>>
>> >>> pgadmin4-rpm.patch - This is the main patch that includes scripts,
>> >>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>> >>
>> >>
>> >> Can we keep the directory names in lower case?
>> >>
>> >
>> > Sure. Will do that.
>> >>>
>> >>> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4
>> tpm
>> >>> depends on web and the web rpm depends on the python packages. I have
>> >>> commented the list of packages which are not available on some
>> systems so
>> >>> that Devrim can build them.
>> >>>
>> >>> The installation path for pgadmin4 is "/usr/pgadmin4-."
>> and
>> >>> pgadmin4-web is the site-packages/pgadmin4-web
>> >>
>> >> Shouldn't the -web package also have the major.minor version number in
>> the
>> >> path, to allow side-by-side installation?
>> >
>> > Right. Now that we don't have major/minor, so, will it be
>> /usr/pgadmin4-v1
>> > and pgadmin4-web-v1 ? Or?
>>
>> I think that's fine.
>>
>> >>
>> >>
>> >>>
>> >>> pgadmin4-server-ini.patch - This is the patch for runtime/Server.cpp.
>> As
>> >>> said pgadmin4-web and runtime installation directories are different
>> and
>> >>> that means web does not exists in parallel to runtime like in sources.
>> >>>
>> >>> I observed that the location of application settings was not defined
>> in
>> >>> Server.cpp. As per QSettings doc, the default location on Unix is the
>> >>> $HOME/.config//.conf. Here, $HOME depends on
>> the user
>> >>> that runs the application. So, I thought why not to define the
>> application
>> >>> settings in application directory itself. RPM then knows where to
>> define the
>> >>> ApplicationPath. I tested it and it worked fine with me. I haven't
>> done this
>> >>> change for platform dependent.
>> >>
>> >> Doesn't that prevent non-root users from changing the settings? Or (if
>> you
>> >> widen the permissions on the ini file), allow one user to
>> mis-configure the
>> >> app for others? I think what is needed here is a search path change,
>> much
>> >> like you added for the Mac app bundle.
>> >>
>> > Right. Will use python command to find the site-packages path and then
>> > concatenate pgadmin4-web directory name.
>>
>> OK.
>>
>> >> Other thoughts:
>> >>
>> >> - Please rename the README to README.txt
>> >>
>> >> - The code to build the RPMs should be entirely confined to pkg/rpm. A
>> >> Makefile target should be added to /Makefile to build/clean the targets
>> >> (this mistake was made with the Mac package too, but was one of the
>> original
>> >> 

[pgadmin-hackers] pgAdmin 4 commit: Add Mac Appbundle generation support.

2016-06-02 Thread Dave Page
Add Mac Appbundle generation support.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=3074af101bd118772b6fe98553bed7b2096c40bb
Author: Sandeep Thakkar 

Modified Files
--
.gitignore|   1 +
Makefile  |  20 +-
pkg/mac/.gitignore|   3 +
pkg/mac/PkgInfo   |   1 +
pkg/mac/README.txt|  32 +
pkg/mac/build.sh  | 153 ++
pkg/mac/complete-bundle.sh| 140 ++
pkg/mac/create-dmg.sh |  38 +++
pkg/mac/licence.r |  42 
pkg/mac/pgadmin.Info.plist.in |  28 
runtime/Server.cpp|  27 +++-
11 files changed, 482 insertions(+), 3 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Patch for pgAdmin4 package on Mac OS X

2016-06-02 Thread Dave Page
Thanks - applied with some tweaks to the runtime code (i.e. not saving
the location of the venv in the appbundle).

On Tue, May 31, 2016 at 6:37 PM, Sandeep Thakkar
 wrote:
> Hi Dave,
>
>
> On Tue, May 31, 2016 at 9:29 PM, Dave Page  wrote:
>>
>> Hi,
>>
>> On the first run, I get:
>>
>> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/pgAdmin
>> 4.app
>> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directory
>> Cleaning up
>> Copying data into temporary directory
>> cp: ./../mac-build/pgAdmin 4.app: No such file or directory
>> create-dmg.sh failed
>> make: *** [appbundle] Error 1
>>
>> If I run it again, I get:
>>
>> App completed: /Users/dpage/git/pgadmin4/pkg/mac/../../mac-build/pgAdmin
>> 4.app
>> ./pkg/mac/create-dmg.sh: line 6: cd: dist: No such file or directory
>> Directory ./pgadmin4-1.0-dev.dmg.src already exists. Please delete it
>> manually.
>> create-dmg.sh failed
>> make: *** [appbundle] Error 1
>>
>> If I manually create $SRC/dist, it's much happier.
>>
> I have used variable for dist. It will create the directory if doesn't
> exist. The clean-appbunde will also remove the .src directory in dist just
> in case it is present.
>
>> Other issues:
>>
>> - Your changes to the runtime don't seem to help. I've been staring at
>> the code for an hour or so now, and I can't see the issue though. We
>> may need some fresh eyes.
>>
> yeah, I also spent more time to see the code and test it. Infact, I could
> hardly reproduce it 1 or 2 times.
>
>>
>> - pkg/mac/create-dmg.sh is mixing upper and lower case variable names
>> and with/without _, e.g. $dmgname vs $DMG_NAME
>>
> not sure, why I used lower case, I prefer upper case always. I have made the
> changes now to use upper case for all variables.
>
>>
>> - Shoudn't DMG_NAME be initialised to `grep "^APP_NAME" web/config.py
>> | cut -d"=" -f2 | sed "s/'//g"` ?
>>
> yes, I have used the couple of more variables that gives proper
> understanding.
>
> Thanks! I have attached the updated patch. (runtime changes remains same).
>>
>>
>> On Tue, May 31, 2016 at 1:19 PM, Sandeep Thakkar
>>  wrote:
>> > Somehow the patch skipped the Makefile changes. Attached is the updated
>> > patch.
>> >
>> > On Mon, May 30, 2016 at 6:00 PM, Sandeep Thakkar
>> >  wrote:
>> >>
>> >> Thanks. I have fixed all the issues.
>> >>
>> >> Regarding the app not running from within the DMG for the first time, I
>> >> was unable to reproduce it on Zilan's machine which didn't have the
>> >> development env. On Murali's machine, it was reproducible for 1 time
>> >> after
>> >> couple of attempts.
>> >>
>> >> So, I just added the sync statement after settings the pythonpath value
>> >> in
>> >> the settings. May be this will resolve the issue. Please confirm.
>> >> settings.sync();
>> >>
>> >> Attached is the updated patch. Thanks.
>> >>
>> >> On Fri, May 27, 2016 at 9:28 PM, Dave Page  wrote:
>> >>>
>> >>> On Fri, May 27, 2016 at 4:48 PM, Dave Page  wrote:
>> >>> >
>> >>> >
>> >>> > On Fri, May 27, 2016 at 1:11 PM, Sandeep Thakkar
>> >>> >  wrote:
>> >>> >>
>> >>> >> Sure. Thanks.
>> >>> >>
>> >>> >> There is a typo in pkg/mac/build.sh. i.e
>> >>> >>
>> >>> >> s/HTML_HELP/HELP_PATH/
>> >>> >>
>> >>> >>
>> >>> >> On Fri, May 27, 2016 at 5:26 PM, Dave Page 
>> >>> >> wrote:
>> >>> >>>
>> >>> >>> Not entirely - we definitely need to improve it. I'll review the
>> >>> >>> code
>> >>> >>> as
>> >>> >>> it is now though.
>> >>> >
>> >>> >
>> >>> > OK, review time :-)
>> >>> >
>> >>> > - The appbundle name should be created from APP_NAME.app in
>> >>> > config.py,
>> >>> > e.g.
>> >>> > 'pgAdmin 4.app'
>> >>> >
>> >>> > - The DMG name should be created from
>> >>> > to_lower(remove_spaces(APP_NAME-APP_VERSION)) in config.py, e.g.
>> >>> > pgadmin4-1.0-dev.dmg
>> >>> >
>> >>> > - Use #ifdef Q_OS_MAC in the QT code for Mac-specific code. There's
>> >>> > no
>> >>> > need
>> >>> > to define another macro.
>> >>> >
>> >>> > - Please add "MINIFY_HTML = False" to config_local.py (and have
>> >>> > Paresh
>> >>> > do
>> >>> > the same on his packages). This works around a code issue with the
>> >>> > docs
>> >>> > that
>> >>> > I'll log a bug for.
>> >>> >
>> >>> > - In testing, I found that running the app from within the DMG
>> >>> > doesn't
>> >>> > seem
>> >>> > to work the first time - it prompts for the path, then exits. Once I
>> >>> > save
>> >>> > the path it offers, it's fine on subsequent runs.
>> >>> >
>> >>> > - Once copied to my laptop, I saw the same issue as above.
>> >>> >
>> >>> > Once these issues are resolved, I think we're good to commit.
>> >>>
>> >>> Oh, a couple more things:
>> >>>
>> >>> - There should not be a copy of the app bundle in dist/ following the
>> >>> build. Only the dmg should be there.
>> >>>
>> >>> - I think mac-build/ 

Re: [pgadmin-hackers] PATCH: To fix expanding server if server inaccessible (pgAdmin4)

2016-06-02 Thread Dave Page
On Tue, May 31, 2016 at 3:43 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> As advised by Ashesh, I have tried flask 'threaded' options for this issues
> & it fixed the issue.
>
> PFA patches to fix long load delay when expanding server if server is
> inaccessible.
> (RM#1185).

This appears to have broken the dashboards - the graphs now
periodically flash up error messages. On the console this coincides
with:

2016-06-02 13:50:37,494: ERROR pgadmin: Exception on
/dashboard/tps_stats/1 [GET]
Traceback (most recent call last):
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1817, in wsgi_app
response = self.full_dispatch_request()
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1475, in full_dispatch_request
rv = self.dispatch_request()
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py",
line 758, in decorated_view
return func(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
line 147, in wrap
return f(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
line 258, in tps_stats
return get_data(sid, did, 'tps_stats.sql')
  File "/Users/dpage/git/pgadmin4/web/pgadmin/dashboard/__init__.py",
line 220, in get_data
"/".join([server_info['template_path'], template]), did=did
KeyError: 'template_path'

(or a similar error about another member in server_info).

I'm guessing this means that data is not being made available to each
thread? We need to fix this ASAP so we're ready to release tomorrow.

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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: To fix minor patches (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi,

PFA updated patch for RM#1234.


Regards,
Murtuza

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

On Thu, Jun 2, 2016 at 3:38 PM, Ashesh Vashi 
wrote:

>
> On Wed, Jun 1, 2016 at 1:23 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA minor patches to fix RM#1234, RM#1279.
>>
> I've committed the fix for RM#1276.
>
> But - Proposed fix for RM#1234 does not look right to me.
>
> Consider a name, value has ';' (semicolon) within it, the SQL will
> generated will be wrong.
> i.e. Put a semicolon in comments.
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>


RM_1234.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] PATCH: Fixed issue in Index node (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi,

PFA patches to fixed the issue mentioned in

RM#1283
RM#1285
RM#1287

Additionally I have fixed the issue where Columns collection was not
disable in edit mode, adding new column was disabled but we were able to
change the value of existing columns.

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


RM_1285.patch
Description: Binary data


RM_1283_1287.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: Fix the issue in JSON decoding (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi,

I was not sure about all the internal representation of psycopg date/time 
format against python’s datetime for JSON decoding format, so I used logical OR.

Thanks,
Murtuza
> On 02-Jun-2016, at 3:10 pm, Ashesh Vashi  
> wrote:
> 
> On Thu, Jun 2, 2016 at 12:04 PM, Murtuza Zabuawala 
>  > wrote:
> Hi,
> 
> PFA patch to fix the issue in json decoding while dealing with date format, 
> causing QueryTool to fail to render data.
> RM#1280
> Shouldn't the check have 'and' instead of 'or' bitwise operator here?
> --
> Thanks & Regards,
> 
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company 
> 
> 
> http://www.linkedin.com/in/asheshvashi 
> 
>  
> 
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com 
> The Enterprise PostgreSQL Company
> 
> 
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org 
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers 
> 
> 
> 



Re: [pgadmin-hackers] PATCH: To fix the issue in type node (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi,

We had condition where we were validating some model objects only if it’s in 
sessAttrs, which I have removed it now.
Issue: we were not getting error for required fields.


Regards,
Murtuza

> On 02-Jun-2016, at 3:55 pm, Ashesh Vashi  
> wrote:
> 
> On Thu, Jun 2, 2016 at 3:53 PM, Murtuza Zabuawala 
>  > wrote:
> Hi Ashesh,
> 
> I have fixed the issue and also corrected some validations as well in 
> privileges.js where we were using object before validation it.
> Can you please give some details about those validations?
> 
> What was the issue, and how did you fix it?
>  
> 
> Thanks,
> Murtuza.
>  
>> On 02-Jun-2016, at 3:40 pm, Ashesh Vashi > > wrote:
>> 
>> On Wed, Jun 1, 2016 at 6:25 PM, Murtuza Zabuawala 
>> > > wrote:
>> Hi,
>> 
>> PFA patch to fix the issue when throwing "Internal server error" on adding 
>> Privileges
>> (RM#1273)
>> 
>> The patch contains multiple fixes in the Type node.
>> Can you please explain, what these changes are for?
>> 
>> --
>> Thanks & Regards,
>> 
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company 
>> 
>> 
>> http://www.linkedin.com/in/asheshvashi 
>>  
>> 
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com 
>> The Enterprise PostgreSQL Company
>> 
>> 
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org 
>> )
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers 
>> 
>> 
>> 
> 
> 



Re: [pgadmin-hackers] PATCH: To fix the issue in type node (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
On Thu, Jun 2, 2016 at 3:53 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> I have fixed the issue and also corrected some validations as well in
> privileges.js where we were using object before validation it.
>
Can you please give some details about those validations?

What was the issue, and how did you fix it?


>
> Thanks,
> Murtuza.
>
>
> On 02-Jun-2016, at 3:40 pm, Ashesh Vashi 
> wrote:
>
> On Wed, Jun 1, 2016 at 6:25 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch to fix the issue when throwing "Internal server error" on
>> adding Privileges
>> (RM#1273)
>>
>
> The patch contains multiple fixes in the Type node.
> Can you please explain, what these changes are for?
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>


Re: [pgadmin-hackers] PATCH: To fix the issue in type node (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi Ashesh,

I have fixed the issue and also corrected some validations as well in 
privileges.js where we were using object before validation it.

Thanks,
Murtuza.
 
> On 02-Jun-2016, at 3:40 pm, Ashesh Vashi  
> wrote:
> 
> On Wed, Jun 1, 2016 at 6:25 PM, Murtuza Zabuawala 
>  > wrote:
> Hi,
> 
> PFA patch to fix the issue when throwing "Internal server error" on adding 
> Privileges
> (RM#1273)
> 
> The patch contains multiple fixes in the Type node.
> Can you please explain, what these changes are for?
> 
> --
> Thanks & Regards,
> 
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company 
> 
> 
> http://www.linkedin.com/in/asheshvashi 
>  
> 
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com 
> The Enterprise PostgreSQL Company
> 
> 
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org 
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers 
> 
> 
> 



Re: [pgadmin-hackers] PATCH: Fix issue in Query tool not showing correct output (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
Akshay,

Can you please review it?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Wed, Jun 1, 2016 at 4:07 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue in Query tool where it was not showing correct
> output for PPAS procedure output.
> (RM#1275)
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


Re: [pgadmin-hackers] PATCH: To fix the issue in type node (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
On Wed, Jun 1, 2016 at 6:25 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue when throwing "Internal server error" on adding
> Privileges
> (RM#1273)
>

The patch contains multiple fixes in the Type node.
Can you please explain, what these changes are for?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


Re: [pgadmin-hackers] PATCH: To fix minor patches (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
On Wed, Jun 1, 2016 at 1:23 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patches to fix RM#1234, RM#1279.
>
I've committed the fix for RM#1276.

But - Proposed fix for RM#1234 does not look right to me.

Consider a name, value has ';' (semicolon) within it, the SQL will
generated will be wrong.
i.e. Put a semicolon in comments.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*



>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] pgAdmin 4 commit: Fixes #1276 - Resolved an issue - 'TypeError: c is un

2016-06-02 Thread Ashesh Vashi
Fixes #1276 - Resolved an issue - 'TypeError: c is undefined on removing
member type from Type=composite'.

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/types/templates/type/js/type.js | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Rename the 'Auto Vacuum' tab to 'Parameter' as it rep

2016-06-02 Thread Ashesh Vashi
Rename the 'Auto Vacuum' tab to 'Parameter' as it represents 'Storage
Parameters'.

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/tables/templates/table/js/table.js | 5 +++--
.../servers/databases/schemas/views/templates/mview/js/mview.js  | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][runtime]: Checkbox and radiobutton rendering issue on Mac OS

2016-06-02 Thread Ashesh Vashi
Thanks - committed!

I've added the following link as reference:
https://bugreports.qt.io/browse/QTBUG-43366

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Wed, Jun 1, 2016 at 6:36 PM, Neel Patel 
wrote:

> Hi,
>
> We have observed that Checkbox and RadioButtons are not painted properly
> on QWebView widget when we run pgAdmin4 in desktop mode in Mac OS.
>
> Please find attached patch file for the fix. Do review it and let us know
> for comments.
>
> Thanks,
> Neel Patel
>
>
>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] pgAdmin 4 commit: QWebView does not render checkbox, and radio button p

2016-06-02 Thread Ashesh Vashi
QWebView does not render checkbox, and radio button propoerly on
MacOSX.

In order to fix it, we need to set 'style' to 'funsion' on MacOSX.

Reference:
https://bugreports.qt.io/browse/QTBUG-43366

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=b64868079ab35a314744bd44f525e21157059eae
Author: Neel Patel 

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: Fix the issue in JSON decoding (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
On Thu, Jun 2, 2016 at 12:04 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue in json decoding while dealing with date
> format, causing QueryTool to fail to render data.
> RM#1280
>
Shouldn't the check have 'and' instead of 'or' bitwise operator here?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*



>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1290 - unknown error displayed if add comments on Materialized view that contain special characters

2016-06-02 Thread Ashesh Vashi
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Thu, Jun 2, 2016 at 12:09 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch for RM#1290
> The text for comment in SQL query should be wrapped by qtIdent instead of
> single quotes.
>
> Please review.
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] pgAdmin 4 commit: Fixes# 1290 - Use qtLiteral with parameterized values

2016-06-02 Thread Ashesh Vashi
Fixes# 1290 - Use qtLiteral with parameterized values.

When not using qtLiteral, it was result into an error - "unknown
error displayed when modify comments which may special characters on
Materialized view".

Branch
--
master

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

Modified Files
--
.../databases/schemas/views/templates/mview/pg/9.3_plus/sql/view_id.sql | 2 +-
.../databases/schemas/views/templates/mview/pg/9.4_plus/sql/view_id.sql | 2 +-
.../schemas/views/templates/mview/ppas/9.3_plus/sql/view_id.sql | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: To fix expanding server if server inaccessible (pgAdmin4)

2016-06-02 Thread Ashesh Vashi
Thanks - all patches are committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Wed, Jun 1, 2016 at 11:04 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> On 01-Jun-2016, at 12:03 am, Ashesh Vashi 
> wrote:
>
> On Tue, May 31, 2016 at 11:56 PM, Dave Page  wrote:
>
>>
>> On 31 May 2016, at 19:08, Ashesh Vashi 
>> wrote:
>>
>> On Tue, May 31, 2016 at 8:28 PM, Dave Page  wrote:
>>
>> Hi
>>>
>>> On Tue, May 31, 2016 at 3:43 PM, Murtuza Zabuawala
>>>  wrote:
>>> > Hi,
>>> >
>>> > As advised by Ashesh, I have tried flask 'threaded' options for this
>>> issues
>>> > & it fixed the issue.
>>> >
>>> > PFA patches to fix long load delay when expanding server if server is
>>> > inaccessible.
>>> > (RM#1185).
>>>
>>> That'll only affect users running under Werkzeug. What about Apache?
>>> Is it an issue there?
>>>
>> A while ago - we discussed about the connection management issue, and we
>> decided to write a deployment guide about using pgAdmin 4 as WSGI
>> application under HTTPD using mod_wsgi.
>> And, while configuring Apache, we will need to use the WSGIDaemon option
>> with mod_wsgi, which will allow us to specify the number of threads to be
>> used for request handling at a time.
>>
>> Reference:
>> http://flask.pocoo.org/docs/0.11/deploying/mod_wsgi/#configuring-apache
>>
>>
>> Right, and I wrote that guide - it's in the docs :-)
>>
> :-).
>
> Good - I was thinking - you would ask me to write.. :P
>
>>
>> I just wanted to be sure that this particular issue isn't a problem in
>> such a configuration.
>>
>
> It is not.
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Ashesh Vashi
>>
>>>
>>> > --
>>> > Additional patches to enhance misc validations in
>>> > menu.js/schema.js/dashboard.js.
>>>
>>> Please detail what these are intended to fix.
>>>
>>>
>>>
> Here, we have added validation checks before accessing object.
> Mostly we get object 'XYZ is undefined' OR 'XYZ Null' errors.
>
> PFA screenshot for example.
>
>
>
>
> > (There are no RM's for these fixes, these are just enhancements)
>>> >
>>> >
>>> > --
>>> > Regards,
>>> > Murtuza Zabuawala
>>> > EnterpriseDB: http://www.enterprisedb.com
>>> > The Enterprise PostgreSQL Company
>>> >
>>> >
>>> > --
>>> > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> > To make changes to your subscription:
>>> > http://www.postgresql.org/mailpref/pgadmin-hackers
>>> >
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>
>>
>
>


[pgadmin-hackers] pgAdmin 4 commit: Check valid DOMElement existance before accessing it

2016-06-02 Thread Ashesh Vashi
Check valid DOMElement existance before accessing it while updating the
menu updation.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/static/js/menu.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fixes an issue rendering the dashboard, when data obj

2016-06-02 Thread Ashesh Vashi
Fixes an issue rendering the dashboard, when data object is missing.

Also, fixed an issue checking the existence of the data object before
accessing it in schema javascript module.

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/templates/schema/js/schema.js   | 2 +-
web/pgadmin/dashboard/templates/dashboard/js/dashboard.js | 4 
2 files changed, 5 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fixes #1185 - While connecting to the server, applica

2016-06-02 Thread Ashesh Vashi
Fixes #1185 - While connecting to the server, application becomes almost
inaccessible.

In stand (without threaded) mode, flask application is not able to
process more than one request at a time. Hence - even the client
(browser) send multiple request, when connecting the server (which is
inaccessible), rest of operations get blocked, as making the connection
with the database server is blocking operation.

In order to fix the issue, we're starting the application with thread
support, in which it will create a separate thread of each request.

Branch
--
master

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

Modified Files
--
web/config.py   | 5 +
web/pgAdmin4.py | 7 +--
2 files changed, 10 insertions(+), 2 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fixes #1295 - Added menu for the 'Grant Wizard' for t

2016-06-02 Thread Ashesh Vashi
Fixes #1295 - Added menu for the 'Grant Wizard' for the trigger function
nodes.

Branch
--
master

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

Modified Files
--
.../tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1295 - Grant wizard should also added with Trigger function node through Right Click

2016-06-02 Thread Ashesh Vashi
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Thu, Jun 2, 2016 at 2:43 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch for RM#1295
> Support was already added for trigger function but its option was missing
> in menu.
>
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] pgAdmin 4 commit: Fixes #1243 - Allow to resize the columns of the resu

2016-06-02 Thread Ashesh Vashi
Fixes #1243 - Allow to resize the columns of the result table in the
Query editor.

Branch
--
master

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

Modified Files
--
.../css/backgrid/backgrid-sizeable-columns.css |  35 ++
.../js/backgrid/backgrid-sizeable-columns.js   | 501 +
web/pgadmin/templates/base.html|   5 +
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 182 +++-
4 files changed, 704 insertions(+), 19 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] [pgAdmin4][Patch]: RM#1295 - Grant wizard should also added with Trigger function node through Right Click

2016-06-02 Thread Surinder Kumar
Hi,

Please find attached patch for RM#1295
Support was already added for trigger function but its option was missing
in menu.


Thanks,
Surinder Kumar


add_grant_wizard_option_for_trigger_function.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

2016-06-02 Thread Ashesh Vashi
On Tue, May 31, 2016 at 1:56 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> Please find updated patch with following changes:
> 1. the sizeHandler is not calculating the position without resizing
> 2. Apply sizeable columns to history grid in query tool.
> 3. Table column *Label and Type* should not be in single line. Currently
> *Backgrid* displays column and type in a single line considering it as
> text.
> we have to extend *headerCell* class and override its render method to
> fix this.
>
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


>
> Please review.
>
> On Mon, May 30, 2016 at 11:36 AM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Fri, May 27, 2016 at 6:27 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> Please find updated patch with following changes:
>>>
>>>1. Replaced the outdated code for *Backgrid Sizeable Columns plugin *with
>>>https://github.com/FortesSolutions/backgrid-sizeable-columns library
>>>because the updated code is available here.
>>>2. I have figured out to calculate *offset* using the parameters of
>>>listener provided, so we need not to tweak the original library code.
>>>
>>> As per our conversation, the sizeHandler is not calculating the position
>> without resizing.
>> It should calculate the position even after rendering is completed.
>>
> Fixed.
>
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
>>> On Fri, May 27, 2016 at 5:00 PM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>


 On Fri, May 27, 2016 at 4:43 PM, Dave Page  wrote:

> Hi
>
> On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
>  wrote:
> > Hi
> >
> > Added support for Columns resizable in query tool. It allows user to
> resize
> > the table columns as much as needed.
> >
> > We are using Backgrid Sizeable Columns plugin:
> > https://github.com/WRidder/backgrid-sizeable-columns
> >
> > with one change in library on line no 185:
> > moved the following trigger event out of if condition:
> >
> > if (newWidth != oldWidth) {
> >
> > }
> >
> >
> > and added one additional parameter offset.
> > //Trigger event
> >
> > view.columns.trigger("resize", columnModel, newWidth, oldWidth,
> offset);
> >
> >
> > We are listening to this trigger event in sqleditor.js file where we
> need
> > offset
> > to calculate new table width on every resize event.
>
> Please ensure any changes to third party libraries are submitted
> upstream.
>
 yes, sure.

>
> > hence, here is the patch attached.
>
> ENOATTACHMENT!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>


Re: [pgadmin-hackers] Regarding issue 1241

2016-06-02 Thread Dave Page
On Tue, May 31, 2016 at 8:53 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi Dave,
>
> Regarding Issue 1241 :
>
> We have added header section for parameter tab deliberately so that we can
> force user to select parameter name (and therefore parameter's data type)
> before adding new row. This is required because behavior of second cell
> (Value cell) is dependent on what parameter name user has selected in first
> cell (Name cell). See attached screen-shot.
>
> For example:
> 1. If user selects parameter 'array_nulls' then value for this should be
> either true or false (and hence switch cell).
> 2. If user selects parameter 'cpu_index_tuple_cost' then value for this
> should be Integer (and hence Integer cell).
>
> Without the custom header (and forcing user to select parameter) we cannot
> decide what type of cell we need in second column.
>
> Let me know your opinion on this.
>

We need to figure out a way to fix it. Our difficulties encountered writing
code should not dictate usability compromises. In this case, something that
needs some thought and maybe some tricky code has caused us to create an
inconsistent UI workflow to side-step the problem, which is not appropriate
as it leads to a poor look and feel and potentially confusion for the user.


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

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


[pgadmin-hackers] pgAdmin 4 commit: [Runtime] Adding python libs in the LIBS build enviro

2016-06-02 Thread Ashesh Vashi
[Runtime] Adding python libs in the LIBS build environment.

Branch
--
master

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

Modified Files
--
runtime/pgAdmin4.pro | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fixed issue only coming in the runtime.

2016-06-02 Thread Ashesh Vashi
Fixed issue only coming in the runtime.

* Do not need to translate an empty string. (that results into the
  translation header inclusion in the javacript module).
* String.prototype.StartsWith is not an well received function, it has
  not been available in the QWebkit for linux.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=486da5e12c607c1ffd6efb3b669b00dd10294f2c

Modified Files
--
.../tables/rules/templates/rules/js/rules.js   |  4 +-
.../schemas/types/templates/type/js/type.js|  2 +-
.../schemas/views/templates/mview/js/mview.js  |  2 +-
web/pgadmin/misc/templates/explain/js/explain.js   |  6 +-
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 95 +-
5 files changed, 80 insertions(+), 29 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] [pgAdmin4][Patch]: RM#1290 - unknown error displayed if add comments on Materialized view that contain special characters

2016-06-02 Thread Surinder Kumar
Hi,

Please find attached patch for RM#1290
The text for comment in SQL query should be wrapped by qtIdent instead of
single quotes.

Please review.

Thanks,
Surinder Kumar


RM#1290.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] PATCH: Fix the issue in JSON decoding (pgAdmin4)

2016-06-02 Thread Murtuza Zabuawala
Hi,

PFA patch to fix the issue in json decoding while dealing with date format,
causing QueryTool to fail to render data.
RM#1280

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


RM_1280.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers