Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iefSc-0007Da-Dy for pgadmin-hackers@arkaria.postgresql.org; Tue, 10 Dec 2019 13:21:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iefSb-0005hh-7F for pgadmin-hackers@arkaria.postgresql.org; Tue, 10 Dec 2019 13:21:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iefRq-0003Ln-Au for pgadmin-hackers@lists.postgresql.org; Tue, 10 Dec 2019 13:21:06 +0000 Received: from mail-il1-x143.google.com ([2607:f8b0:4864:20::143]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iefRl-0000Z6-12 for pgadmin-hackers@postgresql.org; Tue, 10 Dec 2019 13:21:05 +0000 Received: by mail-il1-x143.google.com with SMTP id b15so16071151ila.7 for ; Tue, 10 Dec 2019 05:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=APyp1bf4xCh0KEsg5ISc+685j+AJuMpw4MNxWnmL0I0=; b=hHocxLv8Vjc2AXxoC1fo2t8fMwNW1zOapgywSS8U+CPeUbpl8K4QyDzvfSEmuvVeVH zf/DDLF4y0Cy/y6HaTqxvwwo8ojwHxqgaoMtizbwcFAafYZgu7ALYJkAPw0sTJ8RpI+b tKMa3L4bRYnLs9p5+/Gb3IDj9fk8SdZ+fQdJNq9EB2QwhQhcHYz+Bi8re2oz8m/3aE9I bwQhAPHwZQu4WtJnBsziD4t4f2r9NfcsVhgudBXmwTKvOOmDVp9x4l5oAkjsluo9y+xv a8SZj5LthLRBIujFFc5kdDgXst/dAEetTUqEy4tiUU6AfmXaDdtVOThQidczsiWSKGRN CFMg== 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=APyp1bf4xCh0KEsg5ISc+685j+AJuMpw4MNxWnmL0I0=; b=DPQUdRxHy5g+E+JpwiUCD6V+DViZFoas+vA0/MB0pd8U06+jBrsjyyQc6jV1a4Apkq 3bw0XTd1naG/7TdtrPpFmUa19OK95lO5v7VN666yJvWXaVEZdhJPcyY1nmiAHva2xfjv PSjQ7ZC8Uyhz4P8PFr8l1NKpvlpSZthaCwq3+0wk+JnXW5hGffa75/CzB8uXu+FO4QE+ tBPpeLMjXfA0Gu3SJJejXs1cdYBGfLdBNE5yEaZkpnAT1MSKlDu+h+GhY3B+HS+cdIoN HdDZr5o44Hn3WN1naKaPzlj0Dv/djJGtE9VpwZkAgwwXS4IzAfUYCduAON0GLhopUwF5 eUCQ== X-Gm-Message-State: APjAAAXCxrXYIYg8h2nY4MdC2rJufXA01/TtCx/azxnmP10524EHAsjC 5Wow+HSt2XnItHymB8/C9Gue/F6CjX+onaE0d//LXJvW X-Google-Smtp-Source: APXvYqwBE6Iq4ENcqAuzXxHuDIIh3WnMNrpMlsbVqjiCj+KIzpOlICzfEZtrgpE2Fn+dmNK9kG03NM5Hj/Y3j5zRgvg= X-Received: by 2002:a92:3893:: with SMTP id g19mr34689286ilf.79.1575984059653; Tue, 10 Dec 2019 05:20:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Karan Takalkar Date: Tue, 10 Dec 2019 18:50:48 +0530 Message-ID: Subject: Re: Re : [BUG #4943] To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary="0000000000000cb3ed05995962d7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000000cb3ed05995962d7 Content-Type: multipart/alternative; boundary="0000000000000cb3ea05995962d5" --0000000000000cb3ea05995962d5 Content-Type: text/plain; charset="UTF-8" Hi, "add more variables to the response along with info and use those in the front end" i have already implemented that , but am still failing (7) test cases particularly in the databases/extensions tests(5). i had run regression tests for browser node.(and all it's sub directories). Please check the patch attached. On Tue, Dec 10, 2019 at 6:34 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > [please use reply all to reply] > > You can add more variables to the response along with info and use those > in the front end. > > On Tue, Dec 10, 2019, 18:24 Karan Takalkar wrote: > >> Hi >> >> I had been naively modifying jason response of connect function in >> databases __init__.py, later realized there are a lot of dependencies on it >> and most of regression tests use: >> if db_con["info"] == "Database connected.": . >> >> I am now modifying the Alertify.success script* directly responsible for >> the popup, i could append the database name in the message but am having >> trouble finding the *variable to supply server name.* >> The file and location of function is : >> * >> (web/pgadmin/browser/server_groups/servers/databases/static/js/database.js >> line 523) >> >> the message should be: >> Alertify.success("(?server_name_variable?}+'/'+data.label+' - '+res.info >> ") >> >> data.label contains database name >> res.info is the jason response coming from databases __init__.py connect >> function ; which is "Database connected." >> >> On Mon, Dec 9, 2019 at 8:35 PM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Karan, >>> >>> Kindly add a hyphen between the message and names, create a patch to >>> pgAdmin hackers(check cc). >>> Kindly also run the test cases and pep8 before sending. >>> >>> On Mon, Dec 9, 2019, 20:17 Karan Takalkar wrote: >>> >>>> I have updated the success message. >>>> Please check the screenshots attached. >>>> Should i make a patch? >>>> >>>> Regards, >>>> Karan >>>> >>>> On Mon, 9 Dec, 2019, 3:25 PM Aditya Toshniwal, < >>>> aditya.toshniwal@enterprisedb.com> wrote: >>>> >>>>> ++pgadmin-hackers >>>>> >>>>> Hi Karan, >>>>> >>>>> It is good to know that you're contributing. >>>>> I would suggest {server name}/{db name} as name instead of did is >>>>> better for UX. You can get the db name from conn object and server name >>>>> using the sid (refer >>>>> - web/pgadmin/browser/server_groups/servers/__init__.py) >>>>> >>>>> >>>>> On Mon, Dec 9, 2019 at 3:11 PM Karan Takalkar >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I have been working on #4943 ("Database connected" success message >>>>>> itself is not enough) added by you on pgAdmin4 issues. >>>>>> I want to know what details of database should be included in success >>>>>> message.(i have added 'did') >>>>>> >>>>>> The success message can be modified by altering json response in the >>>>>> connect method in file >>>>>> PGADMIN_SRC/web/pgadmin/browser/server_groups/servers/databases/__init__.py. >>>>>> please have a look at the screenshots attached. >>>>>> >>>>>> original: >>>>>> info=_( "Database connected.") >>>>>> new: >>>>>> info=_("Postgres version/{0} Database connected.".format(did)) >>>>>> >>>>>> Regards, >>>>>> Karan >>>>>> >>>>> >>>>> >>>>> -- >>>>> Thanks and Regards, >>>>> Aditya Toshniwal >>>>> Sr. Software Engineer | EnterpriseDB India | Pune >>>>> "Don't Complain about Heat, Plant a TREE" >>>>> >>>> --0000000000000cb3ea05995962d5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

"add more variables= to the response along with info and use those in the front end"
=
i have already implemented that , but am still failing (7)=C2=A0 test = cases particularly in the databases/extensions tests(5).
i had ru= n regression tests for browser node.(and all it's sub directories).
Please check the patch attached.

On Tue, Dec 10, 2019 at 6:= 34 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
[please use reply a= ll to reply]

You can add more = variables to the response along with info and use those in the front end.

On Tue, Dec 10, 2019, 18:24 Karan Takalkar <karan1533os@gmail.com> wrote:
=
Hi

I had been naively modifying jason response = of connect function in databases __init__.py, later realized there are a lo= t of dependencies on it and most of regression tests use:
if db_c= on["info"] =3D=3D "Database connected.": .
I am now modifying the Alertify.success script* directly respo= nsible for the popup, i could append the database name in the message but a= m having trouble finding the variable to supply server name.
The file and location of function is :
* (web/pgadmin/brow= ser/server_groups/servers/databases/static/js/database.js line 523)

the message should be:
Alertify.success(&qu= ot;(?server_name_variable?}+'/'+data.label+' - '+res.info")<= /div>

data.label contains database name
res.info is = the jason response coming from databases __init__.py connect function ; whi= ch is "Database connected."


I have updated the success message.= =C2=A0
Please check the screenshots attached.
Should i make a patch?

Regards,
Karan

On Mon, 9 Dec, 2019,= 3:25 PM Aditya Toshniwal, <aditya.= toshniwal@enterprisedb.com> wrote:
++pgadmin-hackers

Hi Karan,<= /div>
=
It is good to know that you're contributing.
I would suggest {serv= er name}/{db name} as name instead of did is better for UX. You can get the= db name from conn object and server name using the sid (refer -=C2=A0web/p= gadmin/browser/server_groups/servers/__init__.py)


On Mon, Dec 9, = 2019 at 3:11 PM Karan Takalkar <kara= n1533os@gmail.com> wrote:
Hi,

I have = been working on #4943 ("Database co= nnected" success message itself is not enough) added by you on pgAdmin= 4 issues.
I want to kno= w what details of database should be included in success message.(i have ad= ded 'did')
=
The success messag= e can be modified by altering json response in the connect method in file P= GADMIN_SRC/web/pgadmin/browser/server_groups/servers/databases/__init__.py.=
please have a look at = the screenshots attached.

original:
info=3D_( "Database c= onnected.")
new:
info=3D_("= Postgres version/{0} Database connected.".format(did))

Regards= ,
Karan


--
Th= anks and Regards,
Aditya = Toshniwal
Sr. Software Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain a= bout Heat, Plant a TREE"
--0000000000000cb3ea05995962d5-- --0000000000000cb3ed05995962d7 Content-Type: text/x-patch; charset="US-ASCII"; name="BUG_4943.diff" Content-Disposition: attachment; filename="BUG_4943.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k3zw4t7x0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vwcy9zZXJ2ZXJzL2Rh dGFiYXNlcy9fX2luaXRfXy5weSBiL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vwcy9z ZXJ2ZXJzL2RhdGFiYXNlcy9fX2luaXRfXy5weQppbmRleCAyNmZkNWNjYWMu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