Re: [pgadmin-hackers] PATCH: graphical explain

2016-04-13 Thread Dave Page
Hi,

A couple of comments following a quick test:

1) Some of the horizontal lines are not actually horizontal - they
noticeably drop down. Please see the attached screenshot.

2) I thought we were going to use a "viewport" to allow the user to
navigate through the diagram? I was thinking of displaying a thumbnail
with viewport in the top-left, with the main view being synchronised
to the viewport position/zoom level - for example, look at the 2D Zoom
example on http://www.ajax-zoom.com/. Something like Croppie might
help: http://foliotek.github.io/Croppie/ (as ajax-zoom is not free).

On Tue, Apr 12, 2016 at 11:36 AM, Sanket Mehta
 wrote:
> Hi,
>
> Please do ignore previous patch as it contains trailing whitespaces.
> PFA the revised patch after resolving this issue.
>
>
>
> Regards,
> Sanket Mehta
> Sr Software engineer
> Enterprisedb
>
> On Mon, Apr 11, 2016 at 10:04 PM, Sanket Mehta
>  wrote:
>>
>> Hi,
>>
>> PFA the patch for graphical explain feature.
>>
>> It consists of explain.js, __init__.py and demo_explain.html, snap_svg.js
>> and snap_svg-min.js file.
>>
>> Currently I have placed hard coded JSON data in demo_explain.html file to
>> display graphical output; which will be replace by actual output user get
>> from server in JSON format.
>>
>> Use below URL to access graphical output:
>>
>> http://localhost:5050/misc/explain where 5050 is the port your web server
>> is running on
>>
>> To test the patch, user can replace plan data (stored in 'data' variable)
>> in demo_explain.html with other valid plan data in JSON format and run the
>> above URL.
>>
>> Please review the patch and provide comments for the same.
>>
>> TODO: Integration of graphical explain into sql editor
>>
>>
>> Regards,
>> Sanket Mehta
>> Sr Software engineer
>> Enterprisedb
>
>
>
>
> --
> 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


Re: [pgadmin-hackers] Top Menu Link cursor change text to pointer [pgadmin4]

2016-04-13 Thread Dave Page
Thanks - patch applied.

On Tue, Apr 12, 2016 at 10:33 PM, Seçkin Alan  wrote:
> Hi,
> Top Menu Link cursor change text to pointer.
>
> because is does not give the feeling of link.
>
> --
> Seçkin ALAN
> http://sckn.org
>
>
> --
> 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: Fix the mouse pointer on the top-level menus.

2016-04-13 Thread Dave Page
Fix the mouse pointer on the top-level menus.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=de2e7bf8f1680ad321700b99dce45181b7d959e5
Author: Seçkin Alan 

Modified Files
--
web/pgadmin/static/css/overrides.css | 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: Fix label

2016-04-13 Thread Dave Page
Fix label

Branch
--
master

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

Modified Files
--
.../servers/databases/languages/templates/languages/js/languages.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


[pgadmin-hackers] pgAdmin 4 commit: Improvements to frame management.

2016-04-13 Thread Dave Page
Improvements to frame management.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=9e2d349591d2aa8287e13f611d1fb29a90928b16
Author: Ashesh Vashi 

Modified Files
--
web/pgadmin/browser/static/js/frame.js | 19 +--
1 file changed, 17 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: Fix CodeMirror borders on dialogues.

2016-04-13 Thread Dave Page
Fix CodeMirror borders on dialogues.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0fb0820c642c4eab1170d0ff6ac3ef499d4ed2b3
Author: Arun Kollan 

Modified Files
--
web/pgadmin/static/css/overrides.css  | 22 --
web/pgadmin/static/js/backform.pgadmin.js |  4 ++--
2 files changed, 22 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


[pgadmin-hackers] PATCH: Added canAddRow/canEditRow/canDeleteRow functionality for grid

2016-04-13 Thread Murtuza Zabuawala
Hi,

PFA minor patch which will add canAddRow/canEditRow/canDeleteRow
functionality for Backgrid.

This will allow user to check condition on individual
opration(add/edit/delete row) rather than only while rendering the control.


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


added_canAddRow_canEditRow_canDeleteRow.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: Added Node Type & Catalog objects [pgAdmin4]

2016-04-13 Thread Dave Page
Hi

I'm seeing some more issues now, some related to new functionality:

- Please don't include the descriptive header for shell types in create.sql.

- Shell types can (and should) have owner/comments set if specified.

- The Type dropdown should just say "Shell" for shell types (no
additional text).

- Privileges and labels grids should be disabled for shell types.

- When I select External type, I see the following error (and a 500
error in the browser console):

2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
(execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
Error Message:ERROR:  syntax error at or near "and"
LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname) !=...

- Length/Precision and scale are not shown in the dialogue for existing types.

Thanks.


On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> Please find updated patches to fix all the mentioned issues.
>
> There are three patches,
> 1) One for fixing rendering issue when selecting type
> 2) Added utility function to fetch full type name with length & precision
> 3) Added new Shell type for External types.
>
>
> Regards,
> Murtuza
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:
>>
>> Hi Murtuza
>>
>> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page  wrote:
>> > Hi
>> >
>> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
>> >  wrote:
>> >> Hi Dave,
>> >>
>> >> We can create new external type using below method, By running all of
>> >> below
>> >> queries at the same time , we can not create separate external type by
>> >> only
>> >> using create type statement.
>> >>
>> >> So as per my discussion with Ashesh, We should not allow user to create
>> >> external type in pgAdmin4 but only show definition in edit mode.
>> >
>> > Hmm, would it not make sense to allow the user to create the shell
>> > type as well (perhaps, with a new type of "SHELL")? Then they could do
>> > what is needed (and that should be easy, as it's just CREATE TYPE
>> > foo;)
>> >
>> > For example:
>> >
>> > CREATE TYPE box;
>> >
>> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
>> > CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
>> >
>> > CREATE TYPE box (
>> > INTERNALLENGTH = 16,
>> > INPUT = my_box_in_function,
>> > OUTPUT = my_box_out_function
>> > );
>> >
>> > CREATE TABLE myboxes (
>> > id integer,
>> > description box
>> > );
>>
>> In the interests of making progress, I've committed the most recent
>> patch, with a number of minor changes most significantly, the Postgres
>> docs and system catalogs seem to have different ideas about what to
>> call length, precision and scale. pgAdmin 3 followed the catalogs and
>> used length and precision, however I've updated pgAdmin 4 to use
>> "Length/precision" and "Scale" which is inline with the Postgres docs.
>> That's only in the UI though - the code follows the catalogs.
>>
>> There are still a couple of issues - please provide fixes ASAP:
>>
>> 1) If you create a composite type that contains a sized type (e.g.
>> numeric(5, 4), the precision and scale are not shown if you later open
>> the properties dialogue, or in the reverse engineered SQL.
>>
>> E.g. what pgAdmin3 shows as:
>>
>> CREATE TYPE pem.blergh AS
>>(c1 text COLLATE pg_catalog."C",
>> c2 numeric(5));
>>
>> Is shown by pgAdmin4 as:
>>
>> CREATE TYPE pem.blergh AS
>> (c1 text COLLATE pg_catalog."C", c2 numeric);
>>
>> (adding the \n's would be good too).
>>
>> 2) If you select a different type of type in create mode, the new
>> options are shown below those for the previously selected type,
>> instead of replacing them. Please see the attached screenshot.
>>
>> 3) I would still like us to support External types. I believe the
>> simple option here is to re-add the code you had previously, and to
>> add a new type of type called "SHELL" as discussed in my previous
>> email above. The user would then be able to create a SHELL type, add
>> the required functions, then come back and create the EXTERNAL type.
>>
>> I'll add cards to our internal kanban chart for these issues.
>>
>> 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


-- 
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: Added canAddRow/canEditRow/canDeleteRow functionality for grid

2016-04-13 Thread Dave Page
Thanks, applied.

On Wed, Apr 13, 2016 at 1:35 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch which will add canAddRow/canEditRow/canDeleteRow
> functionality for Backgrid.
>
> This will allow user to check condition on individual
> opration(add/edit/delete row) rather than only while rendering the control.
>
>
> --
> 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: Add canAddRow/canEditRow/canDeleteRow functionality f

2016-04-13 Thread Dave Page
Add canAddRow/canEditRow/canDeleteRow functionality for Backgrid.

This will allow user to check condition on individual opration(add/edit/delete 
row) rather than only while rendering the control.

Branch
--
master

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

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 143 +-
1 file changed, 80 insertions(+), 63 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: Grant wizard.

2016-04-13 Thread Dave Page
Grant wizard.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/static/css/wizard.css  |  143 +++
web/pgadmin/browser/static/js/node.ui.js   |3 +-
web/pgadmin/browser/static/js/wizard.js|  233 +
web/pgadmin/static/css/overrides.css   |4 +
web/pgadmin/tools/grant_wizard/__init__.py |  461 
.../tools/grant_wizard/static/css/grant_wizard.css |  109 ++
.../templates/grant_wizard/js/grant_wizard.js  | 1101 
.../templates/grant_wizard/pg/9.1_plus/acl.json|   30 +
.../grant_wizard/pg/9.1_plus/sql/function.sql  |   23 +
.../grant_wizard/pg/9.1_plus/sql/get_schemas.sql   |   19 +
.../pg/9.1_plus/sql/grant_function.sql |   10 +
.../pg/9.1_plus/sql/grant_sequence.sql |9 +
.../grant_wizard/pg/9.1_plus/sql/grant_table.sql   |9 +
.../grant_wizard/pg/9.1_plus/sql/sequence.sql  |   15 +
.../grant_wizard/pg/9.1_plus/sql/table.sql |   19 +
.../grant_wizard/pg/9.1_plus/sql/view.sql  |   28 +
.../templates/grant_wizard/ppas/9.1_plus/acl.json  |   30 +
.../grant_wizard/ppas/9.1_plus/sql/function.sql|   23 +
.../grant_wizard/ppas/9.1_plus/sql/get_schemas.sql |   19 +
.../ppas/9.1_plus/sql/grant_function.sql   |   10 +
.../ppas/9.1_plus/sql/grant_sequence.sql   |9 +
.../grant_wizard/ppas/9.1_plus/sql/grant_table.sql |9 +
.../grant_wizard/ppas/9.1_plus/sql/sequence.sql|   15 +
.../grant_wizard/ppas/9.1_plus/sql/table.sql   |   19 +
.../grant_wizard/ppas/9.1_plus/sql/view.sql|   28 +
25 files changed, 2377 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] grant_wizard py3 bug

2016-04-13 Thread Seçkin Alan
Hi,
I want the run pgadmin4 on python3, throw unquote module not found.

In python3 unquote method moved root to parse class

https://docs.python.org/3.4/library/urllib.parse.html#urllib.parse.unquote


Maybe isn't clear patch.


-- 
Seçkin ALAN
http://sckn.org
diff --git a/web/pgadmin/tools/grant_wizard/__init__.py b/web/pgadmin/tools/grant_wizard/__init__.py
index f53b979..4002e4e 100644
--- a/web/pgadmin/tools/grant_wizard/__init__.py
+++ b/web/pgadmin/tools/grant_wizard/__init__.py
@@ -20,7 +20,10 @@ from pgadmin.browser.server_groups.servers.utils import parse_priv_to_db
 from pgadmin.utils import PgAdminModule
 from flask import Response, url_for
 from flask.ext.security import login_required
-from urllib import unquote
+try:
+from urllib import unquote
+except:
+from urllib.parse import unquote
 from pgadmin.utils.ajax import precondition_required
 from functools import wraps
 from pgadmin.utils.preferences import Preferences


-- 
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: [Python 3 compability] Fixed the issue introduced by

2016-04-13 Thread Ashesh Vashi
[Python 3 compability] Fixed the issue introduced by the Grant Wizard,
which fixes a issue with the Python 3.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=af1e38a97a70c3b668f4ae87559d114fdbbd5604
Author: Seçkin Alan 

Modified Files
--
web/pgadmin/tools/grant_wizard/__init__.py | 5 -
1 file changed, 4 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] grant_wizard py3 bug

2016-04-13 Thread Ashesh Vashi
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Thu, Apr 14, 2016 at 12:40 AM, Seçkin Alan  wrote:

> Hi,
> I want the run pgadmin4 on python3, throw unquote module not found.
>
> In python3 unquote method moved root to parse class
>
> https://docs.python.org/3.4/library/urllib.parse.html#urllib.parse.unquote
>
>
> Maybe isn't clear patch.
>
>
> --
> Seçkin ALAN
> http://sckn.org
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>