Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhzIA-0006wb-LT for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Jul 2018 15:32:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhzI8-0006dT-Sw for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Jul 2018 15:32:00 +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.89) (envelope-from ) id 1fhzI8-0006dK-Mb for pgadmin-hackers@lists.postgresql.org; Tue, 24 Jul 2018 15:32:00 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fhzI4-0006pO-Pc for pgadmin-hackers@postgresql.org; Tue, 24 Jul 2018 15:32:00 +0000 Received: by mail-wm0-x244.google.com with SMTP id r24-v6so6010332wmh.0 for ; Tue, 24 Jul 2018 08:31:56 -0700 (PDT) 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:from:date:message-id:subject:to :cc; bh=RxWS6iHi8DxNoCt4CBzIy9TcAfDRXy6PZix7SNeefa0=; b=WRSDeUCc5IMPkKs0m3F9ZqKmQ+TGC1l2vVoz9vGtw0avMLaM7dFtF3jXXutSne/2sH lnp5sdPo9AlagkOzPTvjcJSW4VNfQ43bryOxuVp0fb7hvaQU0eXXbsKiU1eW61bt/5v+ 4xN1ZoDgM7YmLofdKW6iO95K4Ay3GXB/xS3Rv6AaJzxpAu2cTxDDKd0/8NXtcyhufHuT KZJ8YCEN6tLornbkp26RoPDaqB1qxtk+ApUrLksQmlj3MvzKZWIXG+0dugtu4SIYbv0A sAz9uL8CGKaUnYww78cXfejJ/58mtNzgPtCKXT00wBPaVf0lfe7blQv10OiI+39PdHrV /mEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RxWS6iHi8DxNoCt4CBzIy9TcAfDRXy6PZix7SNeefa0=; b=P0BDt58GJm5yeTOqVMzN3GALnpIg0KLyp+mbQuuivYphbO6i5lAgoho3Sk9vF6RTFk XTrmDtrVFzX0iSsiYvt+4/rz2GmNiQhe/pU4SyOvEcO6mxnnGp5DV5XOssrv+sAryf9H uAc0b0Os88zFb8YGQLFbvpY6ioYj/B2ix9LfQt59Ovx74yO7DX/++VTp4f1rO10fPrRm cQGlIdW9R8y/yZdYs2oGwYCTWRixlBS5y4BwSpGXZ21+WGBhhj5EwhezkxhX1mH3IdhY qaMrDMU912hV+83B75w6y6c+fiGlI6GDWB7Je4F2BVedYr4KzLeTJaAENocXW4t6oHje JoRw== X-Gm-Message-State: AOUpUlHlchCoHMf7WoFrsNhyRTMBS1DSLRhTOFgVLsOr12EiJPIndcXT ZBarbp0A3iCL54/Abt62AaCAIBlcNA350M6M8YoUYg== X-Google-Smtp-Source: AAOMgpcvrqWt+VkiRWhusoEdBv2pYtf4Yi/TCHHKr6MkFkRl5Y3kKa+UMyf9stWNA+k4A9fO0Z21uq3bJeY+IdCD2O4= X-Received: by 2002:a1c:98a:: with SMTP id 132-v6mr2322513wmj.86.1532446314629; Tue, 24 Jul 2018 08:31:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:89d1:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 08:31:53 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 24 Jul 2018 16:31:53 +0100 Message-ID: Subject: Re: [pgAdmin4][RM3294] User need to reset the layout to see the changed preferences parameters To: Aditya Toshniwal Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000038932a0571c07631" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000038932a0571c07631 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, applied. On Tue, Jul 24, 2018 at 2:11 PM, Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi, > > Attached is the updated patch. > > On Tue, Jul 24, 2018 at 4:32 PM, Dave Page wrote: > >> Hi >> >> On Tue, Jul 24, 2018 at 11:39 AM, Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the second part of the changes for making preferences >>> realtime. The patch includes dashboard and debugger modules. >>> >> >> All my dashboard graphs now seem to be straight lines. I'm guessing >> there's a bug somewhere, as I've never seen one PG server sustain it's I= /O >> levels so perfectly, let alone the three I tested with :-) >> > =E2=80=8BFixed. :P =E2=80=8B > > >> >> >>> I would also request to create RMs for javascript test cases for >>> dashboard and debugger modules as currently there is no setup for the t= est >>> cases of these two modules. >>> >> >> Please do. As well as that I'd also like to see a Python test to ensure >> that the invocation SQL for various different types of function/procedur= e >> is correct. We've messed that up a few times over the years. >> >> Thanks. >> >> The changes are on the JS side and so patch does not have any test cases >>> included. >>> >> >>> Kindly review. >>> >>> >>> On Thu, Jul 5, 2018 at 4:09 PM, Dave Page wrote: >>> >>>> Thanks - patch applied! >>>> >>>> On Wed, Jul 4, 2018 at 10:19 AM, Aditya Toshniwal < >>>> aditya.toshniwal@enterprisedb.com> wrote: >>>> >>>>> Hi Hackers, >>>>> >>>>> Attached is the updated patch for the RM. Change of the flags like >>>>> auto commit, explain->verbose, etc. will reflect in all other open sq= l >>>>> editors. >>>>> Kindly review. >>>>> >>>>> On Fri, Jun 29, 2018 at 10:39 PM, Aditya Toshniwal < >>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>> >>>>>> Hi Dave, >>>>>> >>>>>> On Fri, Jun 29, 2018 at 9:30 PM, Dave Page wrote= : >>>>>> >>>>>>> Hi >>>>>>> >>>>>>> On Fri, Jun 29, 2018 at 3:14 PM, Aditya Toshniwal < >>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>> >>>>>>>> Hi Hackers, >>>>>>>> >>>>>>>> Attached is the updated patch. >>>>>>>> >>>>>>> >>>>>>> This seems to work for the most part, however I saw what seemed lik= e >>>>>>> odd behaviour. If I have 2 query tool windows open; >>>>>>> >>>>>>> - Changing a preference from the Preferences dialogue updates both >>>>>>> query tools. >>>>>>> >>>>>>> - Changing a preference from a Query Tool updates the Preferences >>>>>>> dialogue. >>>>>>> >>>>>>> - Changing a preference from a Query Tool does *not* update the >>>>>>> other Query Tool. >>>>>>> >>>>>>> The last point seems odd to me, though it also kinda makes sense to >>>>>>> not have one query tool affect the other. The problem with that is = that it >>>>>>> could get quite confusing when they get out of sync. I think it wou= ld be >>>>>>> better for a change in one Query Tool to update the other(s). >>>>>>> >>>>>>> What do you think? Was this behaviour intentional? >>>>>>> >>>>>> >>>>>> =E2=80=8BNo this was not intentional. It should reflect in other que= ry tools >>>>>> as well because changing the flags like Auto Commit changes the pref= erences >>>>>> config and is not local to a Query tool. I missed the fact that some >>>>>> preferences can be changed from other than preference dialog.=E2=80= =8B >>>>>> >>>>>> =E2=80=8BWill send the updated patch with the fix.=E2=80=8B >>>>>> >>>>>>> >>>>>>> (FYI, in case this was a one-off bug, I was testing using "Auto >>>>>>> Commit?") >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> On Fri, Jun 29, 2018 at 4:46 PM, Aditya Toshniwal < >>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>> >>>>>>>>> Hi Akshay, >>>>>>>>> >>>>>>>>> On Fri, Jun 29, 2018 at 3:42 PM, Akshay Joshi < >>>>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>>>> >>>>>>>>>> Hi Aditya >>>>>>>>>> >>>>>>>>>> I have applied your patch and run pgAdmin4. I have found >>>>>>>>>> following two issue in the browser: >>>>>>>>>> >>>>>>>>>> - Found error while open Preferences dialog. Refer >>>>>>>>>> Open_Preferences_Dialog.png >>>>>>>>>> >>>>>>>>>> =E2=80=8BThis error occurs even with the latest pull without cha= nges.=E2=80=8B >>>>>>>>> >>>>>>>>> >>>>>>>>>> >>>>>>>>>> - Set the preferences setting "Open in new browser tab" to >>>>>>>>>> True and open the query tool. Refer "Open_In_New_Broswer.png"= . >>>>>>>>>> >>>>>>>>>> =E2=80=8BWill look into this.=E2=80=8B >>>>>>>>> >>>>>>>>> >>>>>>>>>> I haven't review the code. >>>>>>>>>> >>>>>>>>>> On Thu, Jun 28, 2018 at 8:04 PM, Aditya Toshniwal < >>>>>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Hackers, >>>>>>>>>>> >>>>>>>>>>> Attached is the patch for making preferences realtime and >>>>>>>>>>> applying without reseting the layout. Please note, the patch is= only for >>>>>>>>>>> one module - SQL Editor and is the first part for the RM. There= are lot of >>>>>>>>>>> changes to be done to cover all and hence sending in parts. Thi= s will not >>>>>>>>>>> affect/break existing code. Further patches will cover other mo= dules. >>>>>>>>>>> >>>>>>>>>>> Highlights of this patch include: >>>>>>>>>>> - Changes will affect SQL Editors in Create dialog boxes, SQL >>>>>>>>>>> tab of the main screen, Query tool, History entries in the quer= y tool, >>>>>>>>>>> Query tool opened in New Tab/Window >>>>>>>>>>> - All the components of SQL editor will refer to single source >>>>>>>>>>> of preferences which is cached in the Browser object. All other= redundant >>>>>>>>>>> ajax get preference calls are removed. >>>>>>>>>>> - SQL editor will not refer template JS variables anymore, once >>>>>>>>>>> all the references are removed the template variables will also= be removed. >>>>>>>>>>> - Code refactoring wherever possible. >>>>>>>>>>> - Covered JS test cases wherever possible. >>>>>>>>>>> >>>>>>>>>>> Request you to kindly review. >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Thanks and Regards, >>>>>>>>>>> Aditya Toshniwal >>>>>>>>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>>>>>>> "Don't Complain about Heat, Plant a tree" >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> *Akshay Joshi* >>>>>>>>>> >>>>>>>>>> *Sr. Software Architect * >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Thanks and Regards, >>>>>>>>> Aditya Toshniwal >>>>>>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>>>>> "Don't Complain about Heat, Plant a tree" >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks and Regards, >>>>>>>> Aditya Toshniwal >>>>>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>>>> "Don't Complain about Heat, Plant a tree" >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Dave Page >>>>>>> Blog: http://pgsnake.blogspot.com >>>>>>> Twitter: @pgsnake >>>>>>> >>>>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>>>> The Enterprise PostgreSQL Company >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks and Regards, >>>>>> Aditya Toshniwal >>>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>> "Don't Complain about Heat, Plant a tree" >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Thanks and Regards, >>>>> Aditya Toshniwal >>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>> "Don't Complain about Heat, Plant a tree" >>>>> >>>> >>>> >>>> >>>> -- >>>> Dave Page >>>> Blog: http://pgsnake.blogspot.com >>>> Twitter: @pgsnake >>>> >>>> EnterpriseDB UK: http://www.enterprisedb.com >>>> The Enterprise PostgreSQL Company >>>> >>> >>> >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> Software Engineer | EnterpriseDB Software Solutions | Pune >>> "Don't Complain about Heat, Plant a tree" >>> >> >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, Plant a tree" > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --00000000000038932a0571c07631 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, applied.

On Tue, Jul 24, 2018 at 2:11 PM, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
Hi,=C2=A0
<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">
A= ttached is the updated patch.

On Tue, Jul 24, 2018 at 4:32 PM, = Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, Jul 24, 2018 at 11:3= 9 AM, Aditya Toshniwal <aditya.toshniwal@enterprisedb= .com> wrote:
Hi Hackers,

Attached is the second part of the changes f= or making preferences realtime. The patch includes dashboard and debugger m= odules.

All my dashboard= graphs now seem to be straight lines. I'm guessing there's a bug s= omewhere, as I've never seen one PG server sustain it's I/O levels = so perfectly, let alone the three I tested with :-)
=E2=80=8BFixed. :P =E2=80=8B
=C2=A0=
=C2=A0
I would also request to create RMs for javascript te= st cases for dashboard and debugger modules as currently there is no setup = for the test cases of these two modules.

<= /div>
Please do. As well as that I'd also like to see a Pyth= on test to ensure that the invocation SQL for various different types of fu= nction/procedure is correct. We've messed that up a few times over the = years.
=C2=A0
Thanks.

The changes are on the J= S side and so patch does not have any test cases included.

Kindly review.
<= br>

On Thu, Jul 5, 2018 at 4= :09 PM, Dave Page <dpage@pgadmin.org> wrote:
Thanks - patch applied!

On Wed,= Jul 4, 2018 at 10:19 AM, Aditya Toshniwal <aditya.toshniw= al@enterprisedb.com> wrote:
Hi Hac= kers,

Attached is the updated patch for the= RM. Change of the flags like auto commit, explain->verbose, etc. will r= eflect in all other open sql editors.
Kindly review.

On Fri, Jun 29, 2018 at 10:39 PM, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Dave,

On Fri, Jun 29, 2018 at 9:30 PM, Dave Page <dpage@pgadmin.o= rg> wrote:
Hi

On F= ri, Jun 29, 2018 at 3:14 PM, Aditya Toshniwal <aditya.tosh= niwal@enterprisedb.com> wrote:
Hi Hackers,=C2=A0
Attached is the updat= ed patch.

This seems to work fo= r the most part, however I saw what seemed like odd behaviour. If I have 2 = query tool windows open;

- Changing a preference f= rom the Preferences dialogue updates both query tools.

=
- Changing a preference from a Query Tool updates the Preferences dial= ogue.

- Changing a preference from a Query Tool do= es *not* update the other Query Tool.

The last poi= nt seems odd to me, though it also kinda makes sense to not have one query = tool affect the other. The problem with that is that it could get quite con= fusing when they get out of sync. I think it would be better for a change i= n one Query Tool to update the other(s).=C2=A0

Wha= t do you think? Was this behaviour intentional?
=C2=A0
=E2=80=8BNo this was not intentional. It should reflect in oth= er query tools as well because changing the flags like Auto Commit changes = the preferences config and is not local to a Query tool. I missed the fact = that some preferences can be changed from other than preference dialog.=E2= =80=8B
=C2=A0
=E2=80=8BWill send the updated patch with the fix.=E2=80=8B
=

(FYI, in case this was a one-off bug, I was test= ing using "Auto Commit?")
=C2=A0

On Fri, Jun 29, 2018 at 4:46 PM, Adit= ya Toshniwal <aditya.toshniwal@enterprisedb.com&g= t; wrote:
Hi Akshay,

On Fri, Jun 29, 2018 at 3:42 PM= , Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Aditya=C2= =A0

I have applied your patch and run pgAdmin4. I have f= ound following two issue in the browser:
  • Found error whil= e open Preferences dialog. Refer Open_Preferences_Dialog.png
=E2=80=8BThis error occurs even with the latest pull with= out changes.=E2=80=8B
=C2=A0
  • Set the preferences setting "Open in ne= w browser tab" to True and open the query tool. Refer "Open_In_Ne= w_Broswer.png".
=E2=80=8BWill look int= o this.=E2=80=8B
=C2=A0
I haven't revi= ew the code.

On= Thu, Jun 28, 2018 at 8:04 PM, Aditya Toshniwal <aditya.to= shniwal@enterprisedb.com> wrote:
H= i Hackers,

Attached is the patch for making= preferences realtime and applying without reseting the layout. Please note= , the patch is only for one module - SQL Editor and is the first part for t= he RM. There are lot of changes to be done to cover all and hence sending i= n parts. This will not affect/break existing code. Further patches will cov= er other modules.

Highlights of this patch = include:
- Changes will = affect SQL Editors in Create dialog boxes, SQL tab of the main screen, Quer= y tool, History entries in the query tool, Query tool opened in New Tab/Win= dow
- All the components= of SQL editor will refer to single source of preferences which is cached i= n the Browser object. All other redundant ajax get preference calls are rem= oved.
-=C2=A0SQL edito= r will not refer template JS variables anymore, once all the references are= removed the template variables will also be removed.
- Code refactoring wherever possible.<= /div>
- Covered JS test cases = wherever possible.

<= /div>
Request you to kindly re= view.

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Softwa= re Solutions |=C2=A0Pune
"Don't Complain a= bout Heat, Plant a tree"



--
Akshay Joshi
Sr. Software Architect

=
Phone: +91 20-30= 58-9517
Mobile: +91 976-788-8246



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0Ent= erpriseDB Software Solutions |=C2=A0Pun= e
"Don't Complain = about Heat, Plant a tree"



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0Ente= rpriseDB Software Solutions |=C2=A0Pune=
"Don't Complain a= bout Heat, Plant a tree"


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

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



--
Thanks and Regar= ds,
Aditya Toshniwal=
= Softwa= re Engineer |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
&qu= ot;Don't Complain about Heat, Plant a tree"



--
Thanks and Regards,Aditya Toshniwal
Software Engineer |= =C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
"Don't = Complain about Heat, Plant a tree"



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

EnterpriseD= B UK: http://www.= enterprisedb.com
The Enterprise PostgreSQL Company



--
=
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Sol= utions |=C2=A0Pune
"Don't Complain about Heat, Plant a tr= ee"



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
=
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
= Thanks= and Regards,
= Aditya= Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Solutions |=C2=A0= Pune
"Don't Complain about Heat, Plant a tree"



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

EnterpriseDB UK: http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company
--00000000000038932a0571c07631--