Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDNzy-0006al-Pr for pgadmin-hackers@arkaria.postgresql.org; Wed, 02 Sep 2020 08:20:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDNzx-0005NV-Oi for pgadmin-hackers@arkaria.postgresql.org; Wed, 02 Sep 2020 08:20:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDNzx-0005NO-I3 for pgadmin-hackers@lists.postgresql.org; Wed, 02 Sep 2020 08:20:05 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kDNzq-0008C7-P5 for pgadmin-hackers@lists.postgresql.org; Wed, 02 Sep 2020 08:20:05 +0000 Received: by mail-ej1-x62c.google.com with SMTP id e23so5397656eja.3 for ; Wed, 02 Sep 2020 01:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V9dDxKGjsD+rIJ2h3WfTOMeeeBtHtnmhuq4OoOyU3KA=; b=bv1oJD4sSgiddG38Udt+XiJ889EF7/XbJ12pMb53fGdtu4tWVGe1nKEQI2x6/qPiXR Linh5AVmF5cmmbY0VzSYwsczy+pMX7s7LPg4kBW3ZCXeyzagxRUyqeOBs8blUofWn1GM ibfkn+mlFSDWV3bAqtMEUE5jvuJmKSE/SZw5HZI+IErSwEPWpU1M9PGFquW9qusKSNx2 T4ald/aI4S3/ZxRw/J7zF67ntUiTzK1G3ixdmapVTtSCvYioNTNJwUrtWftDQ1wOrl2U SaWYN40S+ExcdDS/S3iY+hHa6nhtYwXD7yRDv//sWYkR9KImodMZXMflayuKEsOJqmJ2 YWlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V9dDxKGjsD+rIJ2h3WfTOMeeeBtHtnmhuq4OoOyU3KA=; b=Jd1JHwLtT840D69LJLB3pwGSPbpYN/6V/WS1aOha9Fbw59X1CRFWNc9H87jCD1dpvh eqKa7A9x7e/v0uVjX4ZBr+LIYAbQlNqd8IFz6mdYrpTpP/5fwMObMT8vIVMEJ3m9g4Qt prsmwf0fYVFIQB4+b1g+c8VzyO4ftt3rSXq/vnssJp9EGAx0ttSFi0OYefXrlAFAko/Y NiFOmXeGWEtQ871jNJ8bulUOKvBMYpI0fS6+6J0fSQZCdFMia1NsXn+8dCX5mfhtfMED Qb0U9mvq+97H1qoV6T9kNDb2ak0jZXLEbz0OfCN3oRDc2fF4URqkZ6twlMW+XnDjsKXC CwgA== X-Gm-Message-State: AOAM530Box1w440Kq61zQQ+fdHLlygkT2qigu7o4LyjSbpF7I0/L86sf djz4ugQ7GnrD1pkS7VCoB5+EVOozv8/BX4QKTYddJxFzEZCiURizf4TJ8Za+nWOh6o2Yi9+11EA wK0idWeqddFnXLsnVbQ8FCukFimwcPZ5b0Tk9PAfAXg29aweZ27nlNmFLg6oo1VwoLcU04XJBmT ZHTjdJ1yrWFdNrHKMvli7eeE1VjCCrkUyCMqgeq0QK20HW2zd+FnV0MRX3lLUBf5+7802mLQh3L A== X-Google-Smtp-Source: ABdhPJzJUGXNCksyRXYF3k/Z/DE1T0nlEmNfiqIu8CWwWHBrJtaHFnfbRG/F2Ozm6puJUpi0v1CY3wo3v6oBBbiy3V0= X-Received: by 2002:a17:907:9c3:: with SMTP id bx3mr5301404ejc.164.1599034797634; Wed, 02 Sep 2020 01:19:57 -0700 (PDT) MIME-Version: 1.0 References: <1872014587.1397537.1599020446172.ref@mail.yahoo.com> <1872014587.1397537.1599020446172@mail.yahoo.com> In-Reply-To: <1872014587.1397537.1599020446172@mail.yahoo.com> From: Aditya Toshniwal Date: Wed, 2 Sep 2020 13:48:49 +0530 Message-ID: Subject: Re: pgAdmin4 - help adding new node to Browser Tree To: Warren Chan Cc: "pgadmin-hackers@lists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000018c9ea05ae504dd3" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000018c9ea05ae504dd3 Content-Type: text/plain; charset="UTF-8" Hi Warren, Can you check the browser console if any errors ? Can you also share the patch so that I can help you further by debugging at my end ? On Wed, Sep 2, 2020 at 9:51 AM Warren Chan wrote: > Hi, > > I'm trying to learn about the pgAdmin4 project and am hoping to make some > contributions sometime in the future. > > I'm new to Flask and python but am keen to learn. > > While trying to familiarize myself with the application and the way it > works, I've tried to create a 'test' node under the schema node, I want to > list test items under this node - not listing anything particular at the > moment but wanted to get an understanding of how the application ties > together). In order to just get a new node added under schema, I've > copied the sequence folder under > \web\pgadmin\browser\server_groups\servers\databases\schemas and renamed > the applicable folders to tests (I want a test node to appear under schema). > > I've updated the \tests\_init_.py file so that the SequenceModule has been > changed to TestModule (updated the NODE_TYPE etc). I've also updated the > SequenceView to become TestView and other parts of the view like the > template path etc. > > In addition to this I've changed the name in the > \tests\static\js\sequence.js file to \tests\static\js\test.js and have > also updated the test.js file so that any references to sequence has been > changed to test and have added 'pgadmin.node.tests' to the > webpack.config.js and 'pgadmin.node.test': path.join(__dirname, > './pgadmin/browser/server_groups/servers/databases/schemas/tests/static/js/test') > to the webpack.shim.js file > > Doing this I was hoping that a new 'Test' node would appear under the > schema directory and opening this node, would render all the sequences (as > I haven't changed any of the sql). However I only get the new 'Test' node > being rendered, and when I open this, I get a Server Node with the server > I'm connected to being added, not the list of sequences I was hoping for. > > Is there an additional setting / steps I need to add somewhere in order to > get the TestView to render under the TestModule node? > > I'd appreciate any pointers to get this working as the next thing I'd > like, would be to start modifying the sql and getting different database > objects being listed. > > Best regards, > Warren Chan > > > -- Thanks, Aditya Toshniwal pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* "Don't Complain about Heat, Plant a TREE" --00000000000018c9ea05ae504dd3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Warren,

Can you check the browser console if any errors= ? Can you also share the patch so that I can help you further by debugging= at my end ?

On Wed, Sep 2, 2020 at 9:51 AM Warren Chan <wchan_syd@yahoo.com.au> wrote:
=
Hi,

I'm trying to learn about the pgAdmin4 project and= am hoping to make some contributions sometime in the future.

I'm new to Flask and python but am = keen to learn.

While tryin= g to familiarize myself with the application and the way it works, I've= tried to create a 'test' node under the schema node, I want to lis= t test items under this node - not listing anything particular at the momen= t but wanted to get an understanding of how the application ties together).= In order to just get a new node added under schema, I've copied = the sequence folder under=20 \web\pgadmin\browser\server_groups\servers\databases\schemas and=20 renamed the applicable folders to tests (I want a test node to appear under= schema).

I've updated the \tests\_init_.py file so that the SequenceMo= dule has been changed to TestModule (updated the NODE_TYPE etc). I've a= lso updated the SequenceView to become TestView and other parts of the view= like the template path etc.

In addition to this I've changed the = name in the \tests\static\js\sequence.js file to \tests\static\= js\test.js and have also updated the test.js file so that any references to= sequence has been changed to test and have added 'pgadmin.node.tests&#= 39; to the webpack.config.js and 'pgadmin.node.test': path.jo= in(__dirname, './pgadmin/browser/server_groups/servers/databases/schema= s/tests/static/js/test') to the webpack.shim.js file

<= /span>
Doing this I wa= s hoping that a new 'Test' node would appear under the schema direc= tory and opening this node, would render all the sequences (as I haven'= t changed any of the sql). However I only get the new 'Test' node b= eing rendered, and when I open this, I get a Server Node with the server I&= #39;m connected to being added, not the list of sequences I was hoping for.=
<= span>
Is there an additional setting / steps I need to add somewhere in = order to get the TestView to render under the TestModule node?

I'= ;d appreciate any pointers to get this working as the next thing I'd li= ke, would be to start modifying the sql and getting different database obje= cts being listed.
<= span>
Best regards,
Warren Chan


<= /div>


--
Thanks,
Aditya Toshniwal
pgAdmin hacker=C2=A0| Sr. Software Engineer | edb= postgres.com
"Don't Complain about Heat= , Plant a TREE"
--00000000000018c9ea05ae504dd3--