Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aacgj-00013n-1s for pgadmin-hackers@arkaria.postgresql.org; Tue, 01 Mar 2016 05:17:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aacgh-0000eN-S9 for pgadmin-hackers@arkaria.postgresql.org; Tue, 01 Mar 2016 05:17:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aacgS-0000P4-PD for pgadmin-hackers@postgresql.org; Tue, 01 Mar 2016 05:17:21 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aacgO-0003IB-G1 for pgadmin-hackers@postgresql.org; Tue, 01 Mar 2016 05:17:20 +0000 Received: by mail-wm0-x22d.google.com with SMTP id l68so19359973wml.0 for ; Mon, 29 Feb 2016 21:17:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EML8LXAGibfzILxzGdU8mrr0VnIiMDs3+O1KvjCRjcg=; b=FLr+N5tFTAh4Ua2w+Uwaek1m1VUw9ARQigEzUmlB0rgScPwWRB2E3NbZB6oMAOMFsT pdeTnABsz2ZrIOpRFbAQL1xlX/XUnZkGyjSCsTeoX1Pqmd7QSiTCrJyWMIeDGDu91HUy o4wF4/A5wsipaXg5Ig+zx4nHLrhMgb5/mqVHn9U8VAxMOSMuXwg6BoY1hAnGjxgQ2Tp6 Y4Zd2ZVt0dtxhEC77bSk1PHfulwtIuue7Jv3Z1m/7rlFyssiC9FyN3FWkBINgjXxPgJm QElArAMlQsMA/tL/UdmIIS4kZr8I5XJ3sZILUH4QJ9ehG91IVLcTwzSRhdFPOKFdG0Ii 79sg== 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:from:date :message-id:subject:to:cc; bh=EML8LXAGibfzILxzGdU8mrr0VnIiMDs3+O1KvjCRjcg=; b=Q0y3mQ7adPJxs+fCNyzM0JwVdGw0r9IhYxpXf3e6VfiBLbhgDdvjbggh3UkbAsQ73X xXMMYnq4RirpfjFfh+Y0wrxe/9IvmmwIkse21JMVDdH9svZ0R4FD9d1jw3/c7jQbIq+x k4r79E07AEWoAm3c4qP1v4JE/BEC227DShwmluhe6dktV6aGq8Xuu/3Z3nyy5eFierCq aD8zORy2jnmISRocZUerWE/mZZYxknzjbvHsuFvLJ9MCRGVnDXxkbV2WOknbyfnoAHa8 ulOsAM0eiUUQKiOLBtHfx/AQ6ioxES1WdOtsEsWv0Q+p8xXzxWqmFUD9fTi0osiZR1bo x5uA== X-Gm-Message-State: AD7BkJL3ERLDmr5rf5hhHoy08YHqf6lJY5a/uu2b+ET1vFz9aC6ZYLYMlmggWAgtv+DO3NuXg5QO+6brYkN6H1Hc X-Received: by 10.28.189.212 with SMTP id n203mr1586398wmf.50.1456809435066; Mon, 29 Feb 2016 21:17:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.55.74 with HTTP; Mon, 29 Feb 2016 21:16:45 -0800 (PST) In-Reply-To: References: From: Surinder Kumar Date: Tue, 1 Mar 2016 10:46:45 +0530 Message-ID: Subject: Re: [pgAdmin4] PATCH: View and Role Node To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a114b0e12e20ab1052cf5e0dd X-Pg-Spam-Score: -2.6 (--) 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 --001a114b0e12e20ab1052cf5e0dd Content-Type: text/plain; charset=UTF-8 Dave you forgot to attach patch. Can you please attach it ? On Thu, Feb 25, 2016 at 4:33 PM, Dave Page wrote: > 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 > --001a114b0e12e20ab1052cf5e0dd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dave you forgot to attach patch. Can you please attac= h it ?

On Thu, Feb 25, 2016 at 4:33 PM, Dave Page <dpage@pgadmin.org>= wrote:
Hi

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

Please find the updated patch = with following changes:

1. Integrated dependents a= nd dependency tabs with view and rule node.
2. Added "Create= Rule" option for Table node.
3. Added node_inode property f= or 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 =C2=A0for rule node=C2=A0
due = to typo mistake, It is fixed.

Please review it and Let me know for any comments.<= /div>

Please find an up= dated patch attached, in which I tweaked some comments and fixed a few mino= r 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 mod= ule for 9.1+?

- The TRUNCATE ACL flag is not recog= nised, 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 SQ= L templates?

- There should be no special casing o= f 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:

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

=C2=A0 - = 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= ).

=C2=A0 - The "Definition" input box s= hould be displayed below the label at all times (unlike other controls), to= maximise available space
=C2=A0=C2=A0
- The SQL tab vi= ew is broken for views (tested on PG 9.4), likely due to the TRUNCATE ACL i= ssue:

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):
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/= 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/site-pa= ckages/flask/app.py", line 1820, in wsgi_app
=C2=A0 =C2=A0 r= esponse =3D self.make_response(self.handle_exception(e))
=C2=A0 F= ile "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", line 1403, in handle_exception
=C2=A0 =C2=A0 re= raise(exc_type, exc_value, tb)
=C2=A0 File "/Users/dpage/.vi= rtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 181= 7, in wsgi_app
=C2=A0 =C2=A0 response =3D self.full_dispatch_requ= est()
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/py= thon2.7/site-packages/flask/app.py", line 1477, in full_dispatch_reque= st
=C2=A0 =C2=A0 rv =3D self.handle_user_exception(e)
= =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py", line 1381, in handle_user_exception
=C2= =A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 File "/Us= ers/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py&qu= ot;, line 1475, in full_dispatch_request
=C2=A0 =C2=A0 rv =3D sel= f.dispatch_request()
=C2=A0 File "/Users/dpage/.virtualenvs/= pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1461, in disp= atch_request
=C2=A0 =C2=A0 return self.view_functions[rule.endpoi= nt](**req.view_args)
=C2=A0 File "/Users/dpage/.virtualenvs/= pgadmin4/lib/python2.7/site-packages/flask/views.py", line 84, in view=
=C2=A0 =C2=A0 return self.dispatch_request(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils= .py", line 248, in dispatch_request
=C2=A0 =C2=A0 return met= hod(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/= web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.= py", line 242, in wrap
=C2=A0 =C2=A0 return f(*args, **kwarg= s)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browse= r/server_groups/servers/databases/schemas/views/__init__.py", line 646= , in sql
=C2=A0 =C2=A0 result['datacl'] =3D self.parse_pr= ivileges(result['datacl'])
=C2=A0 File "/Users/dpage= /git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/v= iews/__init__.py", line 540, in parse_privileges
=C2=A0 =C2= =A0 db_privileges[privilege['privilege_type']])
KeyError:= 'UNKNOWN'


Thanks!=C2=A0

-- <= br>
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

Ent= erpriseDB UK: htt= p://www.enterprisedb.com
The Enterprise PostgreSQL Company

--001a114b0e12e20ab1052cf5e0dd--