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 1ieyMv-0003t8-S4 for pgadmin-hackers@arkaria.postgresql.org; Wed, 11 Dec 2019 09:33:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieyMu-0002By-Dn for pgadmin-hackers@arkaria.postgresql.org; Wed, 11 Dec 2019 09:33:16 +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 1ieyMt-0002Bq-VJ for pgadmin-hackers@lists.postgresql.org; Wed, 11 Dec 2019 09:33:16 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ieyMq-0001h4-1e for pgadmin-hackers@postgresql.org; Wed, 11 Dec 2019 09:33:14 +0000 Received: by mail-ed1-x543.google.com with SMTP id v16so18815825edy.6 for ; Wed, 11 Dec 2019 01:33:11 -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=/2QcDhunmpSxL3Eb1DTaarHd6VFR3rEM8oeEnQd98Y0=; b=kGIn96qEyC5TUuIJ5HFPTrJwmj9gWLZ7g+hImdNAofQrGQZDEZMjpaJRJzqpXLsfYn 27aE/7k1Eb+96RrSnDmKynHh2ILaYcaPClKwIUjvJsR5kh1jvLNaN71QkghdX+IA9OgG mbr28UTlIJTmzer80h2oofQ/Z4+HefIyracnVL4odWrW/nGJ4XALTSYB/Ah8JXvXpFBB bkVwjdPMjIEIJYQ237djfpNriCCV7VQs0Ugel14s1sAMVY6QDrZiLv50Cp29JKlwSKAV 3sFcTwSJWhcdcumvX1rcAvY8odpCIw3rC4+QpccQqkTavhkK+mAFRD7VECbh7JECseAv YxdQ== 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=/2QcDhunmpSxL3Eb1DTaarHd6VFR3rEM8oeEnQd98Y0=; b=papvpAY1szwWCyLuvmoeXN2V2lydInSABk6rZCFwU5J97rvuV9e0bKe5M2QEdltfuQ BpX9dRS1A3JMMPWnsmASKxupO4yVMuQAt1J3jPelVjac4eYS+oXexI3NeSkt4DR/HsQk ECj1sPm4CZWaUDNxwtHbGqx/TazlsxT4nPQqSqNrCxoy7yAznhpBVjA/6XGgl+jBYahC wzu9+bixjXRg+AUTmbkuFhWKmSHEVwhzpz2cuprQ9sHnNZvzmWZfG/BH322brciCM+B1 BVGlg38RMaQs+G0NG0IUUDm7U5Rj2e60xOyzTpi2JljFC9QdU5XGtvm8WGONqH7xF2qw iOjg== X-Gm-Message-State: APjAAAV/RYsscMWG9pSI1j22gZQtIL50GXiswHI36rihxY2QRKAhM2ic P32sc5NLCDLBBVpyhV5F3qbGJ0K4p9JWUZjkmj0iF/y+X5qR9o2jQDvgc1pKu1NHJ1rH4lLahKd gUx9I4DA3TVG9pLpYhtRYu4Q3VJ4FrlqcSDBeh4p3NdZ2dRg8rU8nb8Ci46ewcrTGNH9xhSND3I SY4fl9DTdh9TO8BtVXwqJrdokHkA714UgudfC5LcXya+mWgUc6YE4= X-Google-Smtp-Source: APXvYqy9devRx5gff0v2seVzKkt3VHakA/jnmytdxpdjuEmTy6WUbGNgoInPxRRsDxa7sDQsfCCd0B5IRGviFKJYnNo= X-Received: by 2002:aa7:d48d:: with SMTP id b13mr2124983edr.246.1576056789236; Wed, 11 Dec 2019 01:33:09 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Wed, 11 Dec 2019 15:02:33 +0530 Message-ID: Subject: Re: Re : [BUG #4943] To: Karan Takalkar Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary="0000000000001207ec05996a51eb" 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 --0000000000001207ec05996a51eb Content-Type: multipart/alternative; boundary="0000000000001207ea05996a51e9" --0000000000001207ea05996a51e9 Content-Type: text/plain; charset="UTF-8" Hi Karan, I've updated your patch a bit. Kindly test and share the logs if test cases fail. Test cases seems to be working fine for me. Kindly also change disconnected messages. On Tue, Dec 10, 2019 at 6:51 PM Karan Takalkar wrote: > 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" >>>>>> >>>>> -- Thanks and Regards, Aditya Toshniwal Sr. Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --0000000000001207ea05996a51e9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Karan,

I've updated your patch a bit. Kindly test a= nd share the logs if test cases fail.
Test cases seems to be working fine f= or me. Kindly also change disconnected messages.

On Tue, Dec 10, 2019= at 6:51 PM Karan Takalkar <kar= an1533os@gmail.com> wrote:
Hi,

"= add more variables to the response along with info and use those in the fro= nt end"
i have already implemented that , but am still faili= ng (7)=C2=A0 test cases particularly in the databases/extensions tests(5).<= /div>
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<= /a>> wrote:
<= div dir=3D"auto">[please use reply all to reply]

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

Hi

I had be= en naively modifying jason response of connect function in databases __init= __.py, later realized there are a lot of dependencies on it and most of reg= ression tests use:
if db_con["info"] =3D=3D "Datab= ase connected.": .

I am now modifying the Ale= rtify.success script* directly responsible for the popup, i could append th= e database name in the message but am having trouble finding the variabl= e to supply server name.
The file and location of function is= :
* (web/pgadmin/browser/server_groups/servers/databases/sta= tic/js/database.js line 523)

the message should be= :
Alertify.success("(?server_name_variable?}+'/'= +data.label+' - '+res.info")

data.label con= tains database name
res.info is the jason response coming from database= s __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 <karan1533os@gmail.com> wrote:
=
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:
=
++pga= dmin-hackers

Hi Karan,

It is good to know that you're con= tributing.
I would suggest {server name}/{db name} as name instead of did i= s better for UX. You can get the db name from conn object and server name u= sing the sid (refer -=C2=A0web/pgadmin/browser/server_groups/servers/__init= __.py)


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

I have been working on #4943 ("Database connected" success message itself is no= t enough) added by you on pgAdmin4 issues.
I want to know what details of database should be inclu= ded in success message.(i have added 'did')

The success message can be modified by altering json respons= e in the connect method in file PGADMIN_SRC/web/pgadmin/browser/server_grou= ps/servers/databases/__init__.py.
please have a look at the screenshots attached.

original:
info=3D_( "Database connected.")
<= span style=3D"font-weight:normal">new:
info=3D_("Postgres version/{0} Database connected.&q= uot;.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"


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer |=C2=A0EnterpriseDB In= dia |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE"
=
--0000000000001207ea05996a51e9-- --0000000000001207ec05996a51eb Content-Type: application/octet-stream; name="BUG_4943_updated.patch" Content-Disposition: attachment; filename="BUG_4943_updated.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k413at5n0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vwcy9zZXJ2ZXJzL2Rh dGFiYXNlcy9fX2luaXRfXy5weSBiL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vwcy9z ZXJ2ZXJzL2RhdGFiYXNlcy9fX2luaXRfXy5weQppbmRleCAyNmZkNWNjYWMuLjA0MTdjNGJiNyAx MDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vYnJvd3Nlci9zZXJ2ZXJfZ3JvdXBzL3NlcnZlcnMvZGF0 YWJhc2VzL19faW5pdF9fLnB5CisrKyBiL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vw cy9zZXJ2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