Add a "Hub Control Panel" menu item if running inside a JupyterHub #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #78
I wanted to provide a "Hub Control Panel" menu item only when running in
a JupyterHub. To do this, we need to figure out when we are running in
a JupyterHub. There were two ways to do this:
from a purely static JS code to figure out if we were on the hub, and if so,
where the hub control panel is
websockify for jupyter-server-proxy to handle
After some poking around (and trying a 3rd approach that's more complex), (2) seems
the right path.
A "Hub Control Panel" button is now added if we are running inside a hub,
but not added if we are not running inside a hub. I've tried to stick to
how other projects does it to whatever extent I can.
I'm also very excited because this gives us other extension opportunities
in the future :)
Fixes #57