public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: Karan Takalkar <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Re : [BUG #4943]
Date: Tue, 10 Dec 2019 18:34:26 +0530
Message-ID: <CAM9w-_nw5E73CVL5TsHOC-NpoGrQjdgsbwNbX4Jw-iXs+N8W=Q@mail.gmail.com> (raw)
In-Reply-To: <CADiZPH4WL7+Y-Arbjd_66u0XDZcVYzUNr9+JiVK4O4Tue=OA0A@mail.gmail.com>
References: <CADiZPH7qT7PVSrwduvL8Sa6N2W27NkP4EcsycmyygokYxXaFUQ@mail.gmail.com>
<CAM9w-_=KyZkcHFg9g1esMq7mSiAEYqaC1hWcFiqnj4W8MyPk0w@mail.gmail.com>
<CADiZPH5kx_J1h-yHBDT9nK+rewdeVE++5p=6e8XM+sF7T3s+MQ@mail.gmail.com>
<CAM9w-_=TTvNZcYBq4q=XJyZdsL9UQc3vNzVZ5an7ML8kuO+U6g@mail.gmail.com>
<CADiZPH4WL7+Y-Arbjd_66u0XDZcVYzUNr9+JiVK4O4Tue=OA0A@mail.gmail.com>
[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 <[email protected]> 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 <
> [email protected]> 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 <[email protected]> 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, <
>>> [email protected]> 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 <[email protected]>
>>>> 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"
>>>>
>>>
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Re : [BUG #4943]
In-Reply-To: <CAM9w-_nw5E73CVL5TsHOC-NpoGrQjdgsbwNbX4Jw-iXs+N8W=Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox