Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aYtiQ-000864-8G for pgadmin-hackers@arkaria.postgresql.org; Thu, 25 Feb 2016 11:04:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aYtiP-0003aG-E6 for pgadmin-hackers@arkaria.postgresql.org; Thu, 25 Feb 2016 11:04:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aYtiA-0003LU-RT for pgadmin-hackers@postgresql.org; Thu, 25 Feb 2016 11:03:59 +0000 Received: from mail-ig0-x22c.google.com ([2607:f8b0:4001:c05::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aYti7-0003yF-7K for pgadmin-hackers@postgresql.org; Thu, 25 Feb 2016 11:03:57 +0000 Received: by mail-ig0-x22c.google.com with SMTP id xg9so10668823igb.1 for ; Thu, 25 Feb 2016 03:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=xSyLawVPMg5kK8fFYsxObdRvfDs8TeggxhHX8iZm/Ts=; b=MTr21aXuIrdMgppsx7rRHYzymipx5HPS9SOQRXwH01bsprwgzBxjyYcpWD8vfn/wMp upPlxme3JLZaKZ8Tv96uNvxdGbptRwv1n3DdLg3vQ3NXo0IJWh+/hyJKSGN3RqDAkpT0 WoK7nG3spDXkoKvYwkxk60MrTgkN2HweFcM6yFXLJ+2ZAFZ/9BGiSObJxZcQLh4UbqBt I/lSzLttEveovV01PZg2uHFCBm5c+iL9tuovOJVaQtd2uUpUk0h4yDyQCe4+chJrAcv/ TCTr3cy/neOMUTxqtLkIKNkaYI/y5Aa/O96AQxw2qGbtUGWgnaiWIqeihQcj+isLXNVW 2p8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=xSyLawVPMg5kK8fFYsxObdRvfDs8TeggxhHX8iZm/Ts=; b=MXYhD+oVJyDonTNMM03ZessTXWZ8dN1mmzzCWpezHsYb7GaEJweACKbiPcavwOzYzs J4H508BC+EXMYx5a2rS3pwP29+nPADAfgI8cl5tkD28vES8N17/uNTHWpSltT5ETk4Tp 6dAjhlyhvP0f1YalPVA+J7GvjXK1xsPKjM5I6jEcgkBNURuxz2ooxlQFmsTOmE0TTDab N2XMmeTHxPjCifb+798++JlQGyukGlkhkBrTUcmHrzK0Q4nxXLSHKTF/j4C+Z6rJL7N2 JO2qDGZFSXyzBKNh1xilAvrjxJ8CfL8dCnL4A8dBlzuVMXeMl3mWDIaFp08wOteVTNJO rHwA== X-Gm-Message-State: AG10YOTpXLf/L+841yJmNrR+JCSx4v5BFWRYsamOgS+xFLyOM9MRUKYLDt6yRGF3uERM4Cuj2GtFRwz99UL2NQ== MIME-Version: 1.0 X-Received: by 10.50.73.233 with SMTP id o9mr1651649igv.96.1456398233577; Thu, 25 Feb 2016 03:03:53 -0800 (PST) Received: by 10.64.90.3 with HTTP; Thu, 25 Feb 2016 03:03:53 -0800 (PST) In-Reply-To: References: Date: Thu, 25 Feb 2016 11:03:53 +0000 Message-ID: Subject: Re: [pgAdmin4] PATCH: View and Role Node From: Dave Page To: Surinder Kumar Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=089e013a230a5db7f2052c96238c X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --089e013a230a5db7f2052c96238c Content-Type: text/plain; charset=UTF-8 Hi On Wed, Feb 24, 2016 at 1:31 PM, Surinder Kumar < surinder.kumar@enterprisedb.com> wrote: > Hi, > > Please find the updated patch with following changes: > > 1. Integrated dependents and dependency tabs with view and rule node. > 2. Added "Create Rule" option for Table node. > 3. Added node_inode property for rule node as it has no child node. > 4. Improved javascript code commenting and added pydoc in python files. > 5. Name column under dependents tab showing wrong name for rule node > due to typo mistake, It is fixed. > > Please review it and Let me know for any comments. > Please find an updated patch attached, in which I tweaked some comments and fixed a few minor issues as I reviewed the code. The following issues need to be addressed please, then I'll take another look: - Don't show the definition SQL in the main properties tab. - Check Options is missing from the properties tab. - Views were made function in PostgreSQL v6.4! Why only load the module for 9.1+? - The TRUNCATE ACL flag is not recognised, leading to ACLs being shown as: arwdUNKNOWNxt - 4 character indents are not applied consistently to SQL templates - Why do servers pre-9.3 have VACUUM options in the SQL templates? - There should be no special casing of Slony schemas (backend_support.sql) - Don't include \'s on line ends of multiline comments or docstrings. - I can't create a Materialised View On the dialogs: - The "Definition" input box should have a border. - The "Definition" input box fill the vertical space assigned to it, such that the border on the left runs top to bottom (see the main SQL tab). - The "Definition" input box should be displayed below the label at all times (unlike other controls), to maximise available space - The SQL tab view is broken for views (tested on PG 9.4), likely due to the TRUNCATE ACL issue: 2016-02-25 10:59:00,118: INFO werkzeug: 127.0.0.1 - - [25/Feb/2016 10:59:00] "GET /browser/view/sql/1/1/24587/27424/27555 HTTP/1.1" 500 - Traceback (most recent call last): File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) 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/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line 248, in dispatch_request return method(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py", line 242, in wrap return f(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py", line 646, in sql result['datacl'] = self.parse_privileges(result['datacl']) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py", line 540, in parse_privileges db_privileges[privilege['privilege_type']]) KeyError: 'UNKNOWN' Thanks! -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --089e013a230a5db7f2052c96238c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi

On Wed, Feb 24, 2016 at 1:31 PM, Surinder Kumar <surinder.= kumar@enterprisedb.com> wrote:
Hi,

Please find the updated patch with followin= g changes:

1. Integrated dependents and dependency= tabs with view and rule node.
2. Added "Create Rule" o= ption for Table node.
3. Added node_inode property for rule node = as it has no child node.
4. Improved javascript code commenting a= nd added pydoc in python files.
5. Name column under dependents t= ab showing wrong name =C2=A0for rule node=C2=A0
due to typo mista= ke, It is fixed.

Please review it and Let me know for any comments.

Please find an updated pat= ch attached, in which I tweaked some comments and fixed a few minor issues = as I reviewed the code. The following issues need to be addressed please, t= hen I'll take another look:

- Don't show t= he definition SQL in the main properties tab.

- Ch= eck Options is missing from the properties tab.

- = Views were made function in PostgreSQL v6.4! Why only load the module for 9= .1+?

- The TRUNCATE ACL flag is not recognised, le= ading to ACLs being shown as: arwdUNKNOWNxt

- 4 ch= aracter indents are not applied consistently to SQL templates
- Why do servers pre-9.3 have VACUUM options in the SQL templat= es?

- There should be no special casing of Slony s= chemas (backend_support.sql)

- Don't include \= 's on line ends of multiline comments or docstrings.

- I can't create a Materialised View

On= the dialogs:

=C2=A0 - The "Definition" = input box should have a border.

=C2=A0 - The "= ;Definition" input box fill the vertical space assigned to it, such th= at the border on the left runs top to bottom (see the main SQL tab).
<= div>
=C2=A0 - The "Definition" input box should be = displayed below the label at all times (unlike other controls), to maximise= available space
=C2=A0=C2=A0
- The SQL tab view is bro= ken for views (tested on PG 9.4), likely due to the TRUNCATE ACL issue:

2016-02-25 10:59:00,118: INFO werkzeug: 127.0.0.1 - - [25/Feb/2016 10:59:00] "GET /browser/view/= sql/1/1/24587/27424/27555 HTTP/1.1" 500 -
Traceback (most re= cent call last):
=C2=A0 File "/Users/dpage/.virtualenvs/pgad= min4/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__=
=C2=A0 =C2=A0 return self.wsgi_app(environ, start_response)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/si= te-packages/flask/app.py", line 1820, in wsgi_app
=C2=A0 =C2= =A0 response =3D self.make_response(self.handle_exception(e))
=C2= =A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packag= es/flask/app.py", line 1403, in handle_exception
=C2=A0 =C2= =A0 reraise(exc_type, exc_value, tb)
=C2=A0 File "/Users/dpa= ge/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", li= ne 1817, in wsgi_app
=C2=A0 =C2=A0 response =3D self.full_dispatc= h_request()
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/= lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch= _request
=C2=A0 =C2=A0 rv =3D self.handle_user_exception(e)
=
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/sit= e-packages/flask/app.py", line 1381, in handle_user_exception
=C2=A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 File &quo= t;/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.= py", line 1475, in full_dispatch_request
=C2=A0 =C2=A0 rv = =3D self.dispatch_request()
=C2=A0 File "/Users/dpage/.virtu= alenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1461, = in dispatch_request
=C2=A0 =C2=A0 return self.view_functions[rule= .endpoint](**req.view_args)
=C2=A0 File "/Users/dpage/.virtu= alenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py", line 84, = in view
=C2=A0 =C2=A0 return self.dispatch_request(*args, **kwarg= s)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browse= r/utils.py", line 248, in dispatch_request
=C2=A0 =C2=A0 ret= urn method(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pg= admin4/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__= init__.py", line 242, in wrap
=C2=A0 =C2=A0 return f(*args, = **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin= /browser/server_groups/servers/databases/schemas/views/__init__.py", l= ine 646, in sql
=C2=A0 =C2=A0 result['datacl'] =3D self.p= arse_privileges(result['datacl'])
=C2=A0 File "/User= s/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/sc= hemas/views/__init__.py", line 540, in parse_privileges
=C2= =A0 =C2=A0 db_privileges[privilege['privilege_type']])
Ke= yError: 'UNKNOWN'


Thanks!= =C2=A0

--
Dave= Page
Blog: ht= tp://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: = http://www.enterp= risedb.com
The Enterprise PostgreSQL Company
--089e013a230a5db7f2052c96238c--