public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: Warren Chan <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: pgAdmin4 - help adding new node to Browser Tree
Date: Wed, 2 Sep 2020 13:48:49 +0530
Message-ID: <CAM9w-_=qrfDPYSpKinSYdgwbJNzMNUbK-eH-wPa=9zj-r8TRew@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

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 <[email protected]> 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*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: pgAdmin4 - help adding new node to Browser Tree
  In-Reply-To: <CAM9w-_=qrfDPYSpKinSYdgwbJNzMNUbK-eH-wPa=9zj-r8TRew@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox