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 1l42Yc-0003js-Ta for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jan 2021 14:09:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l42Ya-0001Uy-Ue for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jan 2021 14:09:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l42Ya-0001Ur-Bl for pgadmin-hackers@lists.postgresql.org; Mon, 25 Jan 2021 14:09:28 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l42YV-0003Al-Gs for pgadmin-hackers@postgresql.org; Mon, 25 Jan 2021 14:09:26 +0000 Received: by mail-lj1-x22d.google.com with SMTP id a25so14296780ljn.0 for ; Mon, 25 Jan 2021 06:09:23 -0800 (PST) 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=PKiOiXKFxE5Ix9d51oVGVunGPMKdKfzyly8DLeVOh9c=; b=Iai4BVLXo4IVqFyTfHvyNLgncFPeQZfUrcnNjwzXq2NKvHuBnROeIhQo0utuMsnz0Z Hqhxng8X4RdQXn56FDB6JU8KPPNNAHqVZBl8CbRSZXjESrUHqxfdss+SXsImiK2Evyfl +tR1m5dKnYircgkk9Q0qezyIZe5mqq0o2m51031oBIakTiiQYCEFcCaT4QMKENp8TyRh SYv0XjVTLmUq4RE/6RM/byqzW7lzD4J7N1sygby9Pa77f5NFy27h3kmndQS9L2iud3N9 OeCjxPiUNKJvFFHp+oCLXJcjvpE1m5V75gafRyA2cKSmUNGch1+SmHG5BdGctZvGNsFO xUpA== 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=PKiOiXKFxE5Ix9d51oVGVunGPMKdKfzyly8DLeVOh9c=; b=mvq2JOE1Ro3WnSjKxMyN89HfpmvEJ38/IxitvmKmqMY/40LSZcVUAwn5dX1CoNeCW8 38126sM+zCPZ3ueWuaFDWPq+rMTnUvwgTEbn0qyIMeOf5IPlDcA4jJzrelXMCwNsOK8L 17BAc/5aj5oWNOOyum7ed/i18QoSHQUpNPb6+hZBcCYQA7TMlq6D+UFnw16Zm69VnKon c28yYxBs/DpaSz1TTybtKglTBjhm95e8twuXMx9ziUTjtxV69Y5fClgJo3piaoGJsPLX asJH/HQygQyLGEw7ak9xpS5NW23kkVdQgjdJuJCalwD+XO9B5yip93BYFFkYipZT91vp uBgQ== X-Gm-Message-State: AOAM531wELTTWHFkObK2KdoJufSR4PO2ZGWXggLFWDN+8ktGMB3UUmIh sVUkzwW6M0obAZc1wH0We+lG59v/1BpJupYJ7PJJYfMDqIJB6h0Q5/dmGe02jmlsG8cURKkzeDF pFO8kg7DNM0kV1W40n7a8UucsYgqg6LH3484YzzkW2B4MpEGHNphNf8htBc68tepHr1XTT4yih+ urM15+E3nAu7G0QOeZrC2OPgX4h+BE8vCVxgndkA+xLZNRr98RTg3E9D4wjA== X-Google-Smtp-Source: ABdhPJxdHNghaSCxAQqjtGbo4hWNOz3/ScXeQugR1v0PrakKUZJBhDojzs3az1LnnHWkeH+RGHsSQEo85pCpSI+D0II= X-Received: by 2002:a2e:8749:: with SMTP id q9mr282685ljj.442.1611583761590; Mon, 25 Jan 2021 06:09:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Mon, 25 Jan 2021 19:38:43 +0530 Message-ID: Subject: Re: [pgAdmin][RM1802] ERD Tool (Beta) To: Akshay Joshi Cc: pgadmin-hackers , Khushboo Vashi , Dave Page Content-Type: multipart/mixed; boundary="000000000000a2e02105b9ba1509" 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 --000000000000a2e02105b9ba1509 Content-Type: multipart/alternative; boundary="000000000000a2e02005b9ba1507" --000000000000a2e02005b9ba1507 Content-Type: text/plain; charset="UTF-8" Hi, The attached patch fixes an issue created by existing table name check. Please review. On Mon, Jan 25, 2021 at 5:34 PM Akshay Joshi wrote: > Thanks, patch applied. > > On Mon, Jan 25, 2021 at 5:18 PM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi, >> >> Please find the rebased patch from the latest pull. >> >> On Mon, Jan 25, 2021 at 5:12 PM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the patch to fix below issues in ERD: >>> >>> 1. After opening an existing project, the first table is already >>> selected but edit, clone, delete buttons are disable. Fixed. >>> 2. ERD project title gets changed when 2 ERD projects are open & >>> anyone of it edited. Fixed. >>> 3. Closing ERD tab, does not ask for confirmation pop up. Added. >>> 4. Shortcut for 'Show more/Fewer details' is missing. Added. >>> 5. Deleting primary key does not delete associated links. Fixed. >>> 6. Long table & schema name are getting out of box. Fixed. >>> 7. Long table name in notes pop-up need re-alignment. Fixed. >>> 8. Same table name present in ERD/canvas is allowed in Add Table >>> dialogue. Added validation in the dialog. >>> 9. Download image option is added, but it is not perfect yet. Image >>> icons (table, schema, etc.) are not showing up. >>> 10. Rename panel option should be disabled by default. It should be >>> enabled for the tools which implement rename functionality. >>> 11. The Toolbar is not visible in Safari for the ERD tool. Fixed. >>> >>> Please review. >>> >>> On Thu, Jan 21, 2021 at 4:32 PM Aditya Toshniwal < >>> aditya.toshniwal@enterprisedb.com> wrote: >>> >>>> Hi, >>>> >>>> >>>> On Thu, Jan 21, 2021 at 3:08 PM Dave Page wrote: >>>> >>>>> >>>>> >>>>> On Thu, Jan 21, 2021 at 4:48 AM Aditya Toshniwal < >>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>> >>>>>> Hi Dave, >>>>>> >>>>>> On Wed, Jan 20, 2021 at 9:20 PM Dave Page wrote: >>>>>> >>>>>>> Hi >>>>>>> >>>>>>> Where's the Save Image button gone? I know Aditya was removing it >>>>>>> whilst working on other things, but it's still required for phase 1 release. >>>>>>> >>>>>> It was not working 100% right. :( >>>>>> So I've removed it for the time being. I'm still working on it. >>>>>> >>>>> >>>>> OK, so that work will be completed in time for the build next week? >>>>> >>>> I'm trying my best to make it available before release. I'm struggling >>>> to make it work perfectly. >>>> >>>>> >>>>> >>>>>> >>>>>>> On Mon, Jan 18, 2021 at 11:45 AM Akshay Joshi < >>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>> >>>>>>>> Thanks, patch applied. >>>>>>>> >>>>>>>> On Mon, Jan 18, 2021 at 5:08 PM Aditya Toshniwal < >>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>> >>>>>>>>> OK, So the changes have worked. But still failing at one more >>>>>>>>> place. >>>>>>>>> Attached the patch fixes it. >>>>>>>>> >>>>>>>>> On Mon, Jan 18, 2021 at 4:40 PM Akshay Joshi < >>>>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>>>> >>>>>>>>>> Thanks, patch applied. >>>>>>>>>> >>>>>>>>>> On Mon, Jan 18, 2021 at 2:58 PM Aditya Toshniwal < >>>>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> The jasmine test cases are working fine on my local machine. The >>>>>>>>>>> test cases are successful on jenkins other than on linux, not sure why. >>>>>>>>>>> I have made some fixes by looking at the log. Please review and >>>>>>>>>>> try. >>>>>>>>>>> >>>>>>>>>>> On Mon, Jan 18, 2021 at 1:10 PM Akshay Joshi < >>>>>>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Thanks, patch applied. >>>>>>>>>>>> >>>>>>>>>>>> On Mon, Jan 18, 2021 at 10:34 AM Aditya Toshniwal < >>>>>>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Akshay, >>>>>>>>>>>>> >>>>>>>>>>>>> I forgot to remove few of the dependencies which are not >>>>>>>>>>>>> required as of now (may be in future). Attached patch removes those >>>>>>>>>>>>> dependencies from package.json. >>>>>>>>>>>>> >>>>>>>>>>>>> On Sat, Jan 16, 2021 at 5:08 PM Akshay Joshi < >>>>>>>>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, patch applied. >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Fri, Jan 15, 2021 at 7:01 PM Aditya Toshniwal < >>>>>>>>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I've fixed the issues. You can find the comments inline. >>>>>>>>>>>>>>> I've also added PropTypes for the components for increased >>>>>>>>>>>>>>> validation. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Tue, Jan 12, 2021 at 12:18 PM Khushboo Vashi < >>>>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi Aditya, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> The functionalities and the code looks good to me, however some of the comments as below: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - Correct the comments at some places (3 occurrences found in /erd/__init__.py) which mention Schema diff instead of ERD. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Some comments in the JS/JSX file regarding components/functions (For example, IconButton (forwardRef), Bodywidget etc.) would >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> be great help as we all are new to React. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Done. Added comments to the components. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - Remove the unused imports (for ex bad_request) in /erd/__init__.py >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Removed. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - Remove commented code >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> # req_args = request.args >>>>>>>>>>>>>>>> # if ('recreate' in req_args and >>>>>>>>>>>>>>>> # req_args['recreate'] == '1'): >>>>>>>>>>>>>>>> # connect = False >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Removed. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - TableNode.jsx, below two lines can be combined. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> import { PortModelAlignment, DefaultNodeModel } from >>>>>>>>>>>>>>>> '@projectstorm/react-diagrams'; >>>>>>>>>>>>>>>> import { PortWidget } from '@projectstorm/react-diagrams'; >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Done. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - onImageClick function in BodyWidget.jsx is no use I think, so it should be removed. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I wanted to keep the code as it will be used in future. >>>>>>>>>>>>>>> Anyway, I've removed the code. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - I got some console errors while adding/editing tables. Refer to the attached screenshot. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I tried but I didn't get any. Looking at the screenshot, >>>>>>>>>>>>>>> the error is from the underlying library. Can't do much in this. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - In the column Edit Mode, while deleting the primary key, it gives the error, which does not go away with any further modifications. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Fixed. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - While generating the SQL, if the server is disconnected, a proper error message should be thrown, right now some server side error is coming. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> It will show connection lost error now. Fixed. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - Please remove ... from the menu title (New ERD Project(Beta)...) as it is not opening a dialog. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Done. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - For large data sets, generate ERD hangs. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> It shows the spinner and waits for the response to come >>>>>>>>>>>>>>> from the back end. I've used the existing table fetching code which is used >>>>>>>>>>>>>>> at other places. I'll create an RM to improve the back end code for >>>>>>>>>>>>>>> fetching the tables data which will help the schema diff tool as well. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - Opening the ERD panel in a new window is not working, it opens in the same tab even if you have set the Preference "Open in new browser tab" to True. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Fixed. Added the setting in "Tab settings". >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - No shortcut is provided to open the ERD Tool. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> A shortcut is helpful if we are using it frequently. ERD >>>>>>>>>>>>>>> tool won't be used that frequently. We already have a >>>>>>>>>>>>>>> limited number of keys available for shortcuts. I think we should roll out >>>>>>>>>>>>>>> without shortcut for now. If there is a user demand for it then we can >>>>>>>>>>>>>>> think of adding it. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - SonarQube fixes required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Fixed. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *Suggestion:* >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> While removal of the FK link, If any of the table is selected, it is being deleted with FK link. >>>>>>>>>>>>>>>> Either we should warn the user OR make 2 different buttons for FK removal and table removal as the user may be confused if the selected table is also removed with the FK. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I've added a confirmation dialog which will show the number >>>>>>>>>>>>>>> of tables and links selected. This way user will know what he has selected >>>>>>>>>>>>>>> before deleting. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *Observations:* >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Lodash has been used in this module in place of Underscore, >>>>>>>>>>>>>>>> though the dependency is already introduced by another module, >>>>>>>>>>>>>>>> but we have mentioned it in the package.json file, which is >>>>>>>>>>>>>>>> somewhat not convincing to me. >>>>>>>>>>>>>>>> Lodash is more advanced than Underscore but we should pick >>>>>>>>>>>>>>>> anyone as it will be easy to manage. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> TL;DR; we cannot. >>>>>>>>>>>>>>> lodash is a peer dependency for react-diagrams (and some >>>>>>>>>>>>>>> existing modules in pgAdmin) so it will come to package.json without >>>>>>>>>>>>>>> choice. We cannot remove underscore because it is a dependency of backbone. >>>>>>>>>>>>>>> Underscore is outdated, and I cannot migrate the complete pgAdmin code. So, >>>>>>>>>>>>>>> I decided to go with 100/0 method. All the new codes will use lodash only >>>>>>>>>>>>>>> as we'll phase out underscore with time. Just like jQuery vs ReactJS. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Table dialog code is duplicate of the table node, as it was >>>>>>>>>>>>>>>> difficult to extend it because it was attached to the tree. >>>>>>>>>>>>>>>> So, we need to keep in mind that while implementing React >>>>>>>>>>>>>>>> in pgAdmin, the nodes should be properly detached from the tree itself, so >>>>>>>>>>>>>>>> we can reuse it. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Yes. I agree. We need to separate out data source from UI >>>>>>>>>>>>>>> going forward with React. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>> Khushboo >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Mon, Dec 28, 2020 at 10:53 AM Khushboo Vashi < >>>>>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Fri, Dec 25, 2020 at 4:34 PM Akshay Joshi < >>>>>>>>>>>>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hi Khushboo, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Can you please review it? >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On it. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Fri, Dec 25, 2020 at 3:31 PM Aditya Toshniwal < >>>>>>>>>>>>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hi Hackers, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Attached patch introduces ERD Tool(Beta) to pgAdmin. >>>>>>>>>>>>>>>>>>> Below are the details: >>>>>>>>>>>>>>>>>>> 1) Create a diagram from scratch or generate for an >>>>>>>>>>>>>>>>>>> existing DB. >>>>>>>>>>>>>>>>>>> 2) Generate "Create" DDL from the diagram. >>>>>>>>>>>>>>>>>>> 3) Save the diagram and resume it later. >>>>>>>>>>>>>>>>>>> 4) Supports basic table fields, one-to-many >>>>>>>>>>>>>>>>>>> relationships, many-to-many relationships, adding notes. >>>>>>>>>>>>>>>>>>> 5) Test cases added with 75-80% test coverage. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Please review. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>> Aditya Toshniwal >>>>>>>>>>>>>>>>>>> pgAdmin hacker | Sr. Software Engineer | >>>>>>>>>>>>>>>>>>> *edbpostgres.com* >>>>>>>>>>>>>>>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> *Thanks & Regards* >>>>>>>>>>>>>>>>>> *Akshay Joshi* >>>>>>>>>>>>>>>>>> *pgAdmin Hacker | Principal Software Architect* >>>>>>>>>>>>>>>>>> *EDB Postgres * >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> *Mobile: +91 976-788-8246* >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> Aditya Toshniwal >>>>>>>>>>>>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> *Thanks & Regards* >>>>>>>>>>>>>> *Akshay Joshi* >>>>>>>>>>>>>> *pgAdmin Hacker | Principal Software Architect* >>>>>>>>>>>>>> *EDB Postgres * >>>>>>>>>>>>>> >>>>>>>>>>>>>> *Mobile: +91 976-788-8246* >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> Aditya Toshniwal >>>>>>>>>>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>>>>>>>>>>>> >>>>>>>>>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> *Thanks & Regards* >>>>>>>>>>>> *Akshay Joshi* >>>>>>>>>>>> *pgAdmin Hacker | Principal Software Architect* >>>>>>>>>>>> *EDB Postgres * >>>>>>>>>>>> >>>>>>>>>>>> *Mobile: +91 976-788-8246* >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Thanks, >>>>>>>>>>> Aditya Toshniwal >>>>>>>>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>>>>>>>>>> >>>>>>>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> *Thanks & Regards* >>>>>>>>>> *Akshay Joshi* >>>>>>>>>> *pgAdmin Hacker | Principal Software Architect* >>>>>>>>>> *EDB Postgres * >>>>>>>>>> >>>>>>>>>> *Mobile: +91 976-788-8246* >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Thanks, >>>>>>>>> Aditya Toshniwal >>>>>>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>>>>>>>> >>>>>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> *Thanks & Regards* >>>>>>>> *Akshay Joshi* >>>>>>>> *pgAdmin Hacker | Principal Software Architect* >>>>>>>> *EDB Postgres * >>>>>>>> >>>>>>>> *Mobile: +91 976-788-8246* >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Dave Page >>>>>>> Blog: http://pgsnake.blogspot.com >>>>>>> Twitter: @pgsnake >>>>>>> >>>>>>> EDB: http://www.enterprisedb.com >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> Thanks, >>>>>> Aditya Toshniwal >>>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>>>>> >>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>> >>>>> >>>>> >>>>> -- >>>>> Dave Page >>>>> Blog: http://pgsnake.blogspot.com >>>>> Twitter: @pgsnake >>>>> >>>>> EDB: http://www.enterprisedb.com >>>>> >>>>> >>>> >>>> -- >>>> Thanks, >>>> Aditya Toshniwal >>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>>> >>>> "Don't Complain about Heat, Plant a TREE" >>>> >>> >>> >>> -- >>> Thanks, >>> Aditya Toshniwal >>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >>> >>> "Don't Complain about Heat, Plant a TREE" >>> >> >> >> -- >> Thanks, >> Aditya Toshniwal >> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* >> >> "Don't Complain about Heat, Plant a TREE" >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > *pgAdmin Hacker | Principal Software Architect* > *EDB Postgres * > > *Mobile: +91 976-788-8246* > -- Thanks, Aditya Toshniwal pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* "Don't Complain about Heat, Plant a TREE" --000000000000a2e02005b9ba1507 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

The attached patch fixes an issue created by existing = table name check. Please review.

=
On Mon, Jan 25, 2021 at 5:34 PM Aksha= y Joshi <akshay.joshi@e= nterprisedb.com> wrote:
Thanks, patch applied.

On Mon, Jan 25, 2021= at 5:18 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrot= e:
H= i,

Please find the rebased patch from the latest pull.
=
On Mon= , Jan 25, 2021 at 5:12 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.co= m> wrote:
Hi Hackers,

Attached is the patch to fix below issues in = ERD:
  1. After opening an ex= isting project, the first table is already selected but edit, clone, del= ete buttons are disable. Fixed.
  2. ERD project title gets changed when 2 ERD projects are open &= anyone of it edited. Fixed.
  3. Closing ERD tab, does not ask for confirmation pop up. Added.
  4. Shortcut for 'Show more/= Fewer details' is missing. Added.
  5. Deleting primary key does not delete associated links. Fixed.
  6. Long table & sc= hema name are getting out of box. Fixed.
  7. Long table name in notes pop-up need re-alignment. Fixed.
  8. Same table name pres= ent in ERD/canvas is allowed in Add Table dialogue. Added validation in the dia= log.
  9. Download imag= e option=C2=A0is added, but it is not perfect yet. Image icons (table, schema, = etc.) are not showing up.
  10. Rename panel option should be disabled by default. It should be enab= led for the tools which implement rename functionality.
  11. <= li>The Toolbar is not visible in Safari = for the ERD tool. Fixed.
Please review.

On Thu, Jan 21, 2021 at 4:32 PM Adit= ya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
= Hi,


On Thu, Jan 21, 2021 at 3:08 PM Dave Page <dpage@pgadmin.org> wrote:<= br>


On Thu, Jan 21, 2021 at 4:48 AM Aditya Toshniwal <= adit= ya.toshniwal@enterprisedb.com> wrote:
Hi Dave,

On Wed, Jan 20, 2021 at 9= :20 PM Dave Page <dpage@pgadmin.org> wrote:
Hi

Where's the Sa= ve Image button gone? I know Aditya was removing it whilst working on other= things, but it's still required for phase 1 release.
It was not working 100% right. :(
So I've removed = it for the time being. I'm still working on it.=C2=A0

OK, so that work will be complet= ed in time for the build next week?
I'm = trying my best to make it available before release. I'm struggling to m= ake it work perfectly.
=C2=A0

On Mon, Jan 18= , 2021 at 11:45 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
T= hanks, patch applied.

On Mon, Jan 18, 2021 at 5:08 PM Aditya Toshniwal <<= a href=3D"mailto:aditya.toshniwal@enterprisedb.com" target=3D"_blank">adity= a.toshniwal@enterprisedb.com> wrote:
OK, So the changes have worked. But still failing at one mo= re place.
Attached the p= atch fixes it.

On Mon, Jan 18, 2021 at 4:40 PM Akshay Joshi <akshay.joshi@e= nterprisedb.com> wrote:
Thanks, patch applied.

On Mon, Jan 18, 2021= at 2:58 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrot= e:
Hi,

The jasmine test cases are working=C2=A0fine on my local machine= . The test cases are successful on jenkins other than on linux, not sure wh= y.
I have made some fixe= s by looking at the log. Please review and try.

On Mon, Jan 18, 2021= at 1:10 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
=
Thanks, = patch applied.

On Mon, Jan 18, 2021 at 10:34 AM Aditya Toshniwal <aditya.= toshniwal@enterprisedb.com> wrote:
Hi Akshay,

I forgot to remove= few of the dependencies which are not required as of now (may be in future= ). Attached patch removes those dependencies from package.json.
=
On Sat= , Jan 16, 2021 at 5:08 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wr= ote:
Thanks, patch applied.

On Fri, Jan 15, 2021 at 7:01 PM Aditya Toshni= wal <aditya.toshniwal@enterprisedb.com> wrote:
Hi,

I've fixed the issues. You can find th= e comments inline.
I've also added PropTypes for the compo= nents for increased validation.

On Tue, Jan 12, 2021 at 12:= 18 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
=
H=
i Aditya,
The functionalities and the code looks good to me, however some=
 of the comments as below:
    =
  • Correct the comments at some places (3= occurrences found in /erd/__in= it__.py) which mention Schema diff instead of ERD.
<= /div>
=
Some comments in the JS/JSX file regarding components/functions (For=
 example, IconButton (forwardRef), Bodywidget etc.) would
be great help a=
s we all are new to React. 
Done. Added comments to the components.
  • Remove the= unused imports (for ex bad_request) in /erd/__init__.py
Removed.=C2=A0
  • Remove com= mented code
# req_args = =3D request.args
# if ('recreate' in req_args and
# =C2=A0 = =C2=A0 req_args['recreate'] =3D=3D '1'):
# =C2=A0 =C2=A0= connect =3D False
Removed= .=C2=A0
  • = TableNode.jsx, below two lines can be combined.
import { PortModelAlignment, DefaultNodeModel } from= '@projectstorm/react-diagrams';
import { PortWidget } from '= ;@projectstorm/react-diagrams';
Done.=C2=A0
    =
  • onImageClick function in BodyWidget.js= x is no use I think, so it should be removed.
<= /div>
I wanted to keep the code as it will be used in future. = Anyway, I've removed the code.
  • I got some console er= rors while adding/editing tables. Refer to the attached screenshot.<= /li>
I tried but I didn't get any. = Looking at the screenshot, the error is from the underlying library. Can= 9;t do much in this.=C2=A0
  • In the column Edit Mode, whil= e deleting the primary key, it gives the error, which does not go away with= any further modifications.
=
Fixed.=C2=A0
  • = While generating the SQL, if the server is= disconnected, a proper error message should be thrown, right now some serv= er side error is coming.
I= t will show connection lost error now. Fixed.=C2=A0
  • Plea= se remove ... from the menu title (New ERD Project(Beta)...) as it is not o= pening a dialog.
Done.=C2=A0
  • For large data sets, generate ERD hangs.
  • =
It shows the spinner and waits for the= response to come from the back end. I've used the existing table fetch= ing code which is used at other places. I'll create an RM to improve th= e back end code for fetching the tables data which will help the schema dif= f tool as well.
    Opening the ERD panel in a new window is= not working, it opens in the same tab even if you have set the Preference = "Open in new browser tab" to True.
Fixed. Added the setting in "Tab settings".
  • No shortcut is provided to open the ERD Tool.
A shortcut is helpful if we are using i= t frequently. ERD tool won't be used that frequently.=C2=A0We alread= y have a limited number of keys available for shortcuts. I think we should = roll out without shortcut for now. If there is a user demand for it then we= can think of adding it.
  • SonarQube fixes required.
Fixed.=C2=A0
  • =
Suggestion:
While removal of the= FK link, If any of the table is selected, it is being deleted with FK link= .
Either we should warn the user OR make 2 different buttons for FK remov= al and table removal as the user may be confused if the selected table is a= lso removed with the FK.
I've added= a confirmation dialog which will show the number of tables and links selec= ted. This way user will know what he has selected before deleting.
Observations:
Lodash has been used in this module in place of Un= derscore, though the dependency is already introduced by another module,but we have mentioned it in the package.json file, which is somewhat not c= onvincing to me.
Lodash is more advanced than Underscore but we should p= ick anyone as it will be easy to manage.
TL;DR; we cannot.
lodash is a peer dependency for rea= ct-diagrams (and some existing modules in pgAdmin) so it will come to packa= ge.json without choice. We cannot remove underscore because it is a depende= ncy of backbone. Underscore is outdated, and I cannot migrate the complete = pgAdmin code.=C2=A0So, I decided to go with 100/0 method. All the new co= des will use lodash only as we'll phase out underscore with time. Just = like jQuery vs ReactJS.


Table dialog code is duplicate of the = table node, as it was difficult to extend it because it was attached to the= tree.
So, we need to keep in mind that while implementing React in pgAd= min, the nodes should be properly detached from the tree itself, so we can = reuse it.
Yes. I agree. We need = to separate out data source from UI going forward=C2=A0with React.

Thanks,
Khushboo


On Mon, Dec 28, 2020 at 10:53 AM Khush= boo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Fri, Dec 25, 2020 at 4:= 34 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Khushboo,

Can you plea= se review it?

On it.=C2=A0
= On Fri, Dec 25, 2020 at 3:31 PM Aditya Toshniwal <aditya.toshniwal@enterpris= edb.com> wrote:
Hi Hac= kers,

Attached patch introduces ERD Tool(Beta= ) to pgAdmin. Below are the details:
1) Create a diagram from scratch or generate for an existing DB= .
2) Generate "Creat= e" DDL from the diagram.
3) Save the diagram and resume it later.
4) Supports basic table fields, one-to-many relation= ships, many-to-many relationships, adding notes.
5) Test cases added with 75-80% test coverage.

Please review.

--
Thanks,
Ad= itya Toshniwal
<= /font>
pgAdmin hacker=C2=A0| = Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
= pgAdmin Hacker | Principal Software Ar= chitect
EDB Po= stgres
Mobile: +91 976-788-8246

<= /div>


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--
Thanks,
Aditya Toshniwal
pgAdmin hacker=C2=A0| Sr. Softwa= re Engineer | edbpostgres.com<= /font>
"Don't Complain about Heat, Plant a TREE&qu= ot;
--000000000000a2e02005b9ba1507-- --000000000000a2e02105b9ba1509 Content-Type: application/octet-stream; name="RM1802.fixes_v3.patch" Content-Disposition: attachment; filename="RM1802.fixes_v3.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kkcnc50p0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3Rvb2xzL2VyZC9zdGF0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