How can notifications (pop-ups) be created for specific profiles or users?

Hello everyone,

is there a way to let a user see a notification (pop-up) like JupyerHub does when there is a new version for the lab?
I currently use the ‘lifecycle_hooks’ and ‘gitpuller’ to keep certain repositories up to date, but it can happen that the pull or clone goes wrong and I would like to notify the user somehow.
Do you have any ideas on how to do this? Is there a way to display notifications?

I hope that you can help me further.

~Sincerely

I was just looking at this, and you can specify any atom feed to use for Jupyter news:

# jupyter_server_config.py
c.LabApp.news_url= "https://yourhost.example.org/atom.xml"

so if you maintain an atom feed at some publicly accessible URL, this will populate the announcements.

If you want different feeds for different users, you can make this URL come from the environment, and set the environment variable in Spawner.environment via pre_spawn_hook, or other source of input.

5 Likes

The idea sounds very good. I’ll try it out soon.