Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aVH0P-0000ou-5d for pgadmin-hackers@arkaria.postgresql.org; Mon, 15 Feb 2016 11:07:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aVH0O-0004EQ-Ba for pgadmin-hackers@arkaria.postgresql.org; Mon, 15 Feb 2016 11:07:48 +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 1aVH09-0003yq-UT for pgadmin-hackers@postgresql.org; Mon, 15 Feb 2016 11:07:33 +0000 Received: from mail-ig0-x230.google.com ([2607:f8b0:4001:c05::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aVH05-00011A-C5 for pgadmin-hackers@postgresql.org; Mon, 15 Feb 2016 11:07:32 +0000 Received: by mail-ig0-x230.google.com with SMTP id 5so53377867igt.0 for ; Mon, 15 Feb 2016 03:07:28 -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:content-type; bh=yKkfXqkgxefGPUHAleu2zrWj4Ysk97TkBDbauPIdFBM=; b=bDM87kujGZUCUdtk6BMMtb5JtuS3xP68pZ2KIgykonPr0bP27xFgflpxRRmMCFHx4Z wRqqwHsv2+ie1yLH8BZdl2BJi/MM++2d+NBjJuJiZdXz5bQstpqGxJ4a96dRb5vNL7U0 UxN1P7I6yMrUWRMxOiT20AioSxf8P3SNk06YoQhd3bb4v2tAH9/zLFRVkycwb2rFNhEa TLwsu0VZ+dtSEsuQ3FsYVX1qcoqc50q4EaMMdPol2qXoODf17lPLQWlBKfNGy0RtgJsR PdGrGRyGmkYEDn2EsLAU+mIOYK91sHRaBN1IHnT+lJ/9wF+V4fyiaJi4LHiAg6hxbtct yNQA== 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:content-type; bh=yKkfXqkgxefGPUHAleu2zrWj4Ysk97TkBDbauPIdFBM=; b=S1oeQ5NZ+bDlEBpYL1yEIOoCSDwdAPR+0j+mvnjAp3f3c8eSyNHtcm9Ddw0NzMnYUo 5e5ysA/+Buc5iWIRAo3kU16GXSZuzeVo715nXqmrRupENhS8VfUOei3Bm6sWRtRCqKxa BNpVyzaVsv0gW1CQHfF3eQEjrQvvSmW2hKVcjYB9TT6A1z5kI3J2hp5NQr+ABaCTi2yq lylrDslp+SVNeYeoxzznWisFzBkgOi5y8/tGEByx24jEE/7/iyrFzAUgSuZmwhXjfwBp 8PwjCfsaKTjn93FCLyg4pphszSP4MLYqKk5tsF8ROrgjVr+nDplvq3cvgPWYT48bqBfY unuQ== X-Gm-Message-State: AG10YOSq3mmkh++6klRb824+uaBwHvrAhMe0t2Vc5g23bDXA7UYQf2olkDi3/5lrX6KGorRqcYrjVDG/UF68FA== MIME-Version: 1.0 X-Received: by 10.50.155.71 with SMTP id vu7mr11932867igb.69.1455534446208; Mon, 15 Feb 2016 03:07:26 -0800 (PST) Received: by 10.64.76.137 with HTTP; Mon, 15 Feb 2016 03:07:26 -0800 (PST) In-Reply-To: References: Date: Mon, 15 Feb 2016 11:07:26 +0000 Message-ID: Subject: Re: [pgAdmin4] [Patch]: Extension Module From: Dave Page To: Surinder Kumar Cc: Neel Patel , pgadmin-hackers Content-Type: multipart/alternative; boundary=001a11339b949ffeda052bcd0531 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 --001a11339b949ffeda052bcd0531 Content-Type: text/plain; charset=UTF-8 Hi On Mon, Feb 15, 2016 at 9:55 AM, Surinder Kumar < surinder.kumar@enterprisedb.com> wrote: > Hi, > > PFA patch with following changes: > > 1. Added "Create Extension" menu item in context menu of Database node. > 2. Added a new method "node_node" in ExtensionModule class. If a node > has child, returns True, otherwise False. > 3. Fixed an issue in which icon won't display in create extension link > in context menu. > 4. Added Docstring for the class and methods in python file and proper > commenting in js file. > 5. Followed PEP-08 coding conventions. > > I haven't tested this, but a few initial comments: - The commenting of the JS code is better than I've seen in other patches \o/, but the commenting style is inconsistent. We should use /* */ for multi-line comments, and // for single line. - The JS code could use some carefully introduced blank lines to help make it more readable. - s/}else{/} else {/ - Dependency/depends display is missing (see previous email to Akshay). This is essential for this node! - There's no pydoc comment introducing __init__.py - Shouldn't "data='-- Modified SQL --'," be "data=gettext('-- Modified SQL --'),"? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a11339b949ffeda052bcd0531 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi

On Mon, Feb 15, 2016 at 9:55 AM, Surinder Kumar <surinder.= kumar@enterprisedb.com> wrote:
Hi,=C2=A0

PFA patch with following changes:
  1. Added "Create Extension" menu item in context menu= of Database node.
  2. Added a new method "node_node" in Exte= nsionModule class. If a node has child, returns True, otherwise False.
  3. =
  4. Fixed an issue in which icon won't display in create extension link= in context menu.
  5. Added Docstring for the class and methods in pyth= on file and proper commenting in js file.
  6. Followed PEP-08 coding co= nventions.

I haven= 9;t tested this, but a few initial comments:

- The= commenting of the JS code is better than I've seen in other patches \o= /, but the commenting style is inconsistent. We should use /* */ for multi-= line comments, and // for single line.
- =C2=A0The JS code could = use some carefully introduced blank lines to help make it more readable.
- s/}else{/} else {/
- Dependency/depends display is miss= ing (see previous email to Akshay). This is essential for this node!
<= div>- There's no pydoc comment introducing __init__.py
- Shou= ldn't "data=3D'-- Modified SQL --'," be "data=3D= gettext('-- Modified SQL --'),"?


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

EnterpriseDB UK: http://www.enterprisedb.com
The= Enterprise PostgreSQL Company
--001a11339b949ffeda052bcd0531--