Send alert to user on websocket disconnect

I would like to have a popup appear over the screen to inform the user that the session is no longer available if there’s been a websocket disconnect, similar to what’s shown here:

This way, the user won’t be getting frustrated clicking around on an inactive page.

I’m wondering if anyone has any ideas for how this can be done using Bokeh server. This obviously can’t be done with the on_session_destroyed() lifecycle hook, since that doesn’t get called until after the session was also disconnected. I’m supposing I’d have to write some independent JavaScript code…any hints for how I could start looking into how to do this?

Just FYI, in the example given above, the code to call that popup is written in line 183 of phoebe2-ui/App.js at 88ac87e324252229d610850805f8bb2a7172390d · phoebe-project/phoebe2-ui · GitHub. However, that app uses React, not Tornado.

This is still currently an open issue:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.