Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert client-side on disconnection #29

Open
pbugnion opened this issue Feb 3, 2018 · 0 comments
Open

Alert client-side on disconnection #29

pbugnion opened this issue Feb 3, 2018 · 0 comments

Comments

@pbugnion
Copy link
Owner

pbugnion commented Feb 3, 2018

The client takes no remedial action when the websockets close. This can be confusing to a user, since the app looks normal.

I think the easiest way of implementing this is to watch the websocket connection client-side, and react to it being closed. The JupyterLab kernel client that we use already supports monitoring a rich set of kernel events that we can just hook into.

To try these out, add this to WidgetApplication.js just after the kernel is created.

this._kernel.statusChanged.connect((sender, msg) => console.log(msg))

If you interrupt the server, you can see that the status goes to reconnecting, then, after 2 minutes, the status goes to dead. When the status becomes dead, we want to take some remedial action.

For the actual implementation of the modal, we can probably use the Dialog class from @jupyterlab/apputils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant