As per suggestion by Dave, I have modified the logic and now notifications are popped up in alertifydialog(refer Notify_Messages.png) as and when received on that session where "LISTEN" is executed. Attached is the modified patch, please review it.
To test this feature following steps need to perform:
Apply the patch.
Run pgAdmin4
Connect to any database server and open query tool.
Execute 'LISTEN foo;' command.
Open another query tool window and execute 'NOTIFY foo'. (This is without payload).
Go to the query tool window from where 'LISTEN' was executed and run any other query.
I think there was a small misunderstanding here - I was suggesting that each notification be displayed in an Alertify notification, e.g. using alertify.message('A notification of FOO was received with payload '1234'...')
On Fri, May 18, 2018 at 3:58 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi
On Wed, May 16, 2018 at 2:51 PM, Anthony Emengo <aemengo@pivotal.io> wrote:
Hey,
The code looks great! The tests all passed as well.
Agreed - however, unless you check the Messages panel, you're not likely to see that a message was received.
Can we also show each message in an alertify panel?
We need to change the design I guess, as we are currently send this as part of Messages. We will have to send this separately and show it in the alertify panel.
Yeah. Unfortunately I think notifications need to be more "active" than the messages.
I am working on the above. Can we add one preferences setting to "ON/OFF" this alertify panel ?