-
Notifications
You must be signed in to change notification settings - Fork 40
Check for running server and prompt to restart #84
Conversation
polls /api/status, showing dialog on failure - adds restart-server action - restart-server action opens new tab pointed to /hub/spawn to trigger the new spawn Improvements that could be made: 1. restart with API request instead of new tab (not reliable because API token may not still be valid with the Hub after stop) 2. use `/hub/spawn/:user/:server` spawn urls, which are new in Hub 1.0 3. hook into lab's existing Connection Lost event
Wow @minrk this is an excellent idea I think! I wonder what happens if this competes with other errors that tend to show when you loose connectivity to the server, will you get two dialog boxes, one after the other, will you only get one? If this works properly, this would be a big UX win!! 🎉 I cannot do much insightful review of the technical changes though, but I picked up some insights while reading them. I'm excited about this PR! :D |
That's what I was referring to with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! I'll test this out soon.
// This config is provided by JupyterHub to the single-user server app | ||
// in a dictionary: app.web_app.settings['page_config_data']. | ||
this.hubHost = PageConfig.getOption('hub_host'); | ||
this.hubPrefix = PageConfig.getOption('hub_prefix'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be camelCase or snake_case? I vaguely remember seeing them being all camelCase, but could be wrong.
Hey all, jupyterlab/jupyterlab#6399 provides a new |
gotta close this so search results don't include it as an old open PR! |
polls /api/status, showing dialog on failure
Improvements that could be made:
/hub/spawn/:user/:server
spawn urls, which are new in Hub 1.0. This PR won't properly restart named servers. This also requires jupyterlab to make the username and server name available to PageConfig (or we can parse the url).Fixes #83
Screenshots