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)
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)
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.