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 1jLOQk-0003fg-GP for pgadmin-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 09:52:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLOQj-0008Q1-1m for pgadmin-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 09:52:33 +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 1jLOQi-0008Pu-Lm for pgadmin-hackers@lists.postgresql.org; Mon, 06 Apr 2020 09:52:32 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jLOQc-00088S-LZ for pgadmin-hackers@postgresql.org; Mon, 06 Apr 2020 09:52:31 +0000 Received: by mail-lj1-x22a.google.com with SMTP id p14so13932089lji.11 for ; Mon, 06 Apr 2020 02:52:26 -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=rCiCXgRL9FvzePY9kK6oxTV60cCxx6qQiiQzb6UkHqU=; b=hPOSKBxStGm6tfZJLcZ4fLyaWtMfoijq/ZI8o1bo27s56OUkYHhyDBgL+kerLllget p9yc3p05xeFItCQ1ZhXB16+W93Nhnz5qfU2HyUxERaLoguJ21DYB2bP/7VTWOd7o4Xgd 9s2jzu5gLIo+9hGgjtuIhmXHdkdzawGB3908UqDaBNtP3aSMpcBXwgilZ9pAryGqYz4U 2fBwI11EK2ruEg2Zwz1lsLuJa7T+CFsmfFk9e0crZhOPAdyO9SZJFLvuFOzeMHhp70LY rpnAsmkcf1qzaL8GaicDccfYu3q8FcztGMTz+Tyre4O7J2YJjjnBlfY3I4s+Fi+oKhBi qatQ== 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=rCiCXgRL9FvzePY9kK6oxTV60cCxx6qQiiQzb6UkHqU=; b=eH44pAwzlV4BM2TDz3RUjBNDMgnJj6pCZ0n++7Gdmhj2U1VR9/iPlpX8adMcOEnQ+O 5VTRPfDYRaGp0dSUuFlInA5ua4z9e8GyFkGKtnFLuy330a7J9FLhByNPJRFhSJGIEbe8 R4tnPUmMBWzWoZnef5cSsdvR1WzWcDyISVy9o4BRsxEz5+jpOV0dbmh+g+lJ0+szTrWl eW/XoK1NaQT1i2tYUIOGjWkzl781mCwkzDSB71pDsOqbzET1/vxI/GYjGqF1Zdu1BlnO Lt1n/wmpKxlgO8DTHrhWDDX41SqcckAVBE/TPfhBN9vTn1Rv38i1T+liWH6ckqzAbiOs J25w== X-Gm-Message-State: AGi0Pub95pPGinCJId9TH3IejDIEjPF/X5jVIg0DK5yhkXM65JLUxjyD KL/MCLB4mTZZNR8C4EeTNV+ijCI/1rp0sxL1z4PjbiDPxQBIM6Ub3JEzGFFYPOqqTZ9ZTD/mesi azeDO36o+JBWbtmn1K59osUXLQuV4kwrL8Kv2/UlinQRl/eDgqgKIlU3jwSV1feepuwaJH1bodN BNp8f0le0w/v65A7YTqqNB1h8Bo2LdNPXcdz6PaOn3dZslzmUx6b0sWA== X-Google-Smtp-Source: APiQypLevS/0a3ELH4SzBF2caek7tp8Ls4OntXU5E8LtPVnTZAVkCi1usypTDd6HMmwTisda5lX+lbCNgJMrXEAEzWk= X-Received: by 2002:a2e:151e:: with SMTP id s30mr11953320ljd.92.1586166744148; Mon, 06 Apr 2020 02:52:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Khushboo Vashi Date: Mon, 6 Apr 2020 15:22:17 +0530 Message-ID: Subject: Re: [pgAdmin][RM2172] Search Objects Functionality To: Aditya Toshniwal Cc: pgadmin-hackers , Akshay Joshi Content-Type: multipart/alternative; boundary="00000000000057065905a29c3986" X-CLOUD-SEC-AV-Info: edb,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 --00000000000057065905a29c3986 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Aditya, Please resend the rebased patch, it does not apply. Thanks, Khushboo On Fri, Apr 3, 2020 at 2:44 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the updated patch. > With this, > 1) I've displayed the rows count detail at the bottom of the dialog. This > will help in both cases, when there are rows and when there are none. > 2) As discussed, a user can now apply object types dropdown filter on > already loaded data. > 3) I've not made changes for the multilevel partition icon because it > would be too much to do for an icon. We're already showing the type name = in > the grid. Adding extra SQL joins and making the query slower for the icon > is not desirable. > 4) Fixed some gettext issues as mentioned in the review. > > Please review. > > > On Thu, Apr 2, 2020 at 5:54 PM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi Khushboo, >> >> On Thu, Apr 2, 2020 at 4:49 PM Khushboo Vashi < >> khushboo.vashi@enterprisedb.com> wrote: >> >>> >>> >>> On Thu, Apr 2, 2020 at 4:30 PM Aditya Toshniwal < >>> aditya.toshniwal@enterprisedb.com> wrote: >>> >>>> Hi Khushboo, >>>> >>>> Thank you for reviewing. >>>> >>>> >>>> On Thu, Apr 2, 2020 at 4:09 PM Khushboo Vashi < >>>> khushboo.vashi@enterprisedb.com> wrote: >>>> >>>>> Hi Aditya, >>>>> >>>>> Review comments: >>>>> >>>>> *UI:* >>>>> >>>>> 1. When no object is found, the default message should be given, >>>>> currently no message displayed. >>>>> 2. Can we have a tooltip on the row "Double click to locate the objec= t >>>>> in the browser" ? >>>>> 3. Full stop is missing in the message column objects are disabled in >>>>> the browser. You can enable them in the preferences dialog ( :D ) >>>>> and also, we should start the statement with the capital letter. >>>>> 4. If possible, use the multilevel partition table symbol same as the >>>>> browser tree. >>>>> 5. gettext is missing from the search grid header. >>>>> >>>> I'll fix all above. >>>> >>>>> 6. Suggestion: The search button should be at the end (after type >>>>> combobox). The current position of the controls suggest that search = for >>>>> the objects and then filter it out but that's not the case. >>>>> >>>> I've actually kept the most frequently used controls together. The >>>> probability of using the types filter is less and a user would general= ly go >>>> for full search. This is how even we generally do. We search first and= then >>>> apply filter if required >>>> >>> Right, so type based search on slickgrid data would be useful. >>> >> =F0=9F=91=8D >> >>> After changing the type, we have to click on the search button. >>>>> In the current positioning, we should fetch all the records from the >>>>> backend and then filter those out depending on the type at the client= side >>>>> only, so that will reduce the server requests and slickgrid is effici= ent it >>>>> do so. >>>>> >>>> I'll look into this. My only concern is the data may be outdated, but = I >>>> agree to filter in slickgrid on type change. The user can hit search a= gain >>>> if required. >>>> >>> >>>>> *Backend:* >>>>> >>>>> 1. We do have the list of blueprint, so we can use that list instead >>>>> of taking the hard coe list in the init method of SearchObjectsHelper >>>>> class. >>>>> >>>> The reason is, we do not support all objects for search objects. Only >>>> objects under a database are supported. The probability of node type c= hange >>>> is very less. >>>> >>> True but we can maintain the skip list (which would be less) and we do >>> have bluprint start with NODE, so it will be easier to fetch. >>> >> I would prefer the "in" list rather than "skip" list. Each time a new >> node is added to pgAdmin, we will have to update the skip list in search >> objects. With the "in" list, search objects has better control. >> >>> 2. While searching the object, we create an object of SearchObjectsHelp= er >>>>> on each request. We can create it once while initializing and utilize= it on >>>>> every search. >>>>> >>>> The intention is to keep SearchObjectsHelper stateless. The object is >>>> created based on the request data and it is easier to maintain >>>> independently. >>>> >>>>> >>>>> Note: The functionality is working fine. >>>>> >>>> Great. Thanks. >>>> >>>>> >>>>> Thanks, >>>>> Khushboo >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Thu, Apr 2, 2020 at 9:31 AM Khushboo Vashi < >>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Wed, Apr 1, 2020 at 6:00 PM Akshay Joshi < >>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>> >>>>>>> Hi Khushboo, >>>>>>> >>>>>>> Can you please review it. >>>>>>> >>>>>> I am on it. >>>>>> >>>>>>> >>>>>>> On Mon, Mar 30, 2020 at 2:39 PM Aditya Toshniwal < >>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>> >>>>>>>> Hi Hackers, >>>>>>>> >>>>>>>> Attached is the patch to implement search objects functionality in >>>>>>>> pgadmin. >>>>>>>> The feature will allow a user to search for any object in a >>>>>>>> database. >>>>>>>> Highlights of the feature: >>>>>>>> 1) Search any object with user input text with at least 3 >>>>>>>> characters. >>>>>>>> 2) Search can be done on a specific object type by selecting from >>>>>>>> the types dropdown. >>>>>>>> 3) The search results grid will show object name, object type and >>>>>>>> the object path on the browser tree. On double clicking the record= , it will >>>>>>>> locate that object on the browser tree. The columns object name an= d type >>>>>>>> are sortable. >>>>>>>> 4) The object nodes which are disabled (hidden) using preferences >>>>>>>> will not be visible in the types dropdown. However, in the case of= all >>>>>>>> types, the search records will be visible for those types greyed o= ut. >>>>>>>> 5) You can also access search objects dialog using the button on >>>>>>>> the browser toolbar. >>>>>>>> >>>>>>>> Python and JS test cases added. Docs updated. >>>>>>>> Please review. >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks and Regards, >>>>>>>> Aditya Toshniwal >>>>>>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >>>>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Thanks & Regards* >>>>>>> *Akshay Joshi* >>>>>>> >>>>>>> *Sr. Software Architect* >>>>>>> *EnterpriseDB Software India Private Limited* >>>>>>> *Mobile: +91 976-788-8246* >>>>>>> >>>>>> >>>> >>>> -- >>>> Thanks and Regards, >>>> Aditya Toshniwal >>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >>>> "Don't Complain about Heat, Plant a TREE" >>>> >>> >> >> -- >> Thanks and Regards, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >> "Don't Complain about Heat, Plant a TREE" >> > > > -- > Thanks and Regards, > Aditya Toshniwal > pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > --00000000000057065905a29c3986 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Aditya,

Please resend the rebased pa= tch, it does not apply.

Thanks,
Khushboo=

On Fri, Apr 3, 2020 at 2:44 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com&g= t; wrote:
Hi Hackers,

Attached is the updated patch.
With this,
1) I'v= e displayed the rows count detail at the bottom=C2=A0of the dialog. This wi= ll help in both=C2=A0cases, when there are rows and when there are none.
2)= As discussed, a=C2=A0user can now apply object=C2=A0types dropdown filter = on already loaded data.
3) I've not made changes for the multilevel par= tition icon because it would be too much to do for an icon. We're alrea= dy showing the type name in the grid. Adding extra SQL joins and making the= query slower for the icon is not desirable.
4) Fixed some gettext issues a= s mentioned in the review.

Please review.

<= br>
On Thu,= Apr 2, 2020 at 5:54 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com<= /a>> wrote:
<= div dir=3D"ltr">
Hi=C2=A0Khushboo,

On Thu, Apr 2, 2020 at 4= :49 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Thu, Apr 2, 2020 at 4:30 PM Aditya Toshniwal <aditya.tosh= niwal@enterprisedb.com> wrote:
Hi Khushboo,

Thank you for reviewing.


On Thu, Apr 2, 2020 at 4:09 PM Kh= ushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi Aditya,
=
Review comments:

UI:

1. When no object is fou= nd, the default message should be given, currently no message displayed.
2. Can we have a tooltip on= the row "Double click to locate the object in the browser" ?
3. Full stop is missing in t= he message=C2=A0column objects are disabled in the browser. You can = enable them in the preferences dialog ( :D )
and also, we should start the statement with the capital lette= r.
4. If possible, use th= e multilevel partition table symbol same as the browser tree.
<= div>5. gettext is missing from the search = grid header.
I'll fix all above.= =C2=A0
6. Suggestion: The search button = should be at the end (after type combobox).=C2=A0 The current position of t= he controls suggest that search for the objects and then filter it out but = that's not the case.
I've actually = kept the most frequently used controls together. The probability=C2=A0of us= ing the types filter is less and a=C2=A0user would generally go for full se= arch. This is how even we generally do. We search first and then apply filt= er if required
Right, so type bas= ed search on slickgrid data would be useful.=C2=A0
=F0=9F=91=8D=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
After changing=C2=A0the type, we have to click= on the search button.
In= the current positioning, we should fetch all the records from the backend = and then filter those out depending on the type at the client side only, so= that will reduce the server requests and slickgrid is efficient it do so.<= /font>
I'll look into this. My only concern is the data may be outdated= , but I agree to filter in slickgrid on type change. The user can hit searc= h again if required.
<= div class=3D"gmail_quote">
=
Backend:

= 1. We do have the list of blueprint, so we= can use that list instead of taking the hard coe list in the init method o= f=C2=A0SearchObjectsHelper class.
The reason is, we do not support all objects= for search objects. Only objects under a database are supported. The proba= bility of node type change is very less.
True but we can maintain the skip list (which would be less) and we= do have bluprint start with NODE, so it will be easier to fetch.
I would prefer the "in" list rather than &q= uot;skip" list. Each time a new node is added to pgAdmin, we=C2=A0w= ill have to update the skip list in search objects. With the "in= " list, search objects has better control.
2. While searching the object, we create an object of=C2=A0SearchObjectsHelper on each request. We can create it once while initiali= zing and utilize it on every search.
The intention is to keep SearchO= bjectsHelper stateless. The object is created based on the request data and it = is easier to maintain independently.

Note:=C2=A0The functionality is working= fine.
Great. Thanks.

Thanks,
Khushboo




On Thu, Apr 2, 2020 at 9:31 AM= Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Wed, Apr 1, 2020 at 6:00 PM Akshay Joshi <akshay.joshi@enterprisedb.c= om> wrote:
Hi Khushboo,

Can you please review it= .
I am on it.=C2=A0

On Mon, Mar 30, 2020 at 2:39 PM Aditya Toshniwal <= ;adi= tya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

Attached is t= he patch to implement search objects functionality in pgadmin.
The feature will allow a user to sea= rch for any object in a database.
Highlights=C2=A0of the feature:
1) Search any object with user input text with at least 3= characters.
2) Search c= an be done on a specific object type by selecting from the types dropdown.<= /div>
3) The search results gr= id will show object name, object type and the object path on the browser tr= ee. On double clicking the record, it will locate that object on the browse= r tree. The columns object name and type are sortable.
4) The object nodes which are disabled = (hidden) using preferences will not be visible in the types dropdown. Howev= er, in the case of all types, the search records will be visible for those = types greyed out.
5) You can also access search=C2=A0objects dialog usin= g the button on the browser toolbar.

Python= and JS test cases added. Docs updated.
Please review.

--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software En= gineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat, Plant a = TREE"


--
Thanks & Regards
Akshay Joshi
<= font color=3D"#3333FF">Sr. Software Architect=
<= font color=3D"#000000" face=3D"arial, sans-serif">EnterpriseDB Software = India Private Limited
Mobile: +91 976-788-8246=


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0Pune<= /span>
"Don't Complain about Heat, Plant a TREE"=


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0Pune<= /span>
"Don't Complain about Heat, Plant a TREE"=


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0Pune<= /span>
"Don't Complain about Heat, Plant a TREE"=
--00000000000057065905a29c3986--