jupyterhub / jupyter-server-proxy

Jupyter notebook server extension to proxy web services.
https://jupyter-server-proxy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
354 stars 147 forks source link

JupyterLab-server-proxy GUI Launchers in Notebooks area #83

Open psychemedia opened 5 years ago

psychemedia commented 5 years ago

The jupyterlab-launcher-extension GUI places icons in an area marked "Notebooks" even though services may not be notebook related e.g. RStudio.

Would it make sense to have allow these icons to be registered in the Other area or a newly minted Service Launches area? Or rename Notebooks something like Notebooks and Applications?

But then, what if you launched a service that was headless, eg a database service with no UI?

It also strikes me that some applications you would only want to start once, although you may want to to close and reopen a window onto them repeatedly without starting and stopping the underlying application each time. This contrasts with a notebook launcher, where you presumably do want to start a new notebook process on each start.

Arising from this, a couple more observations:

yuvipanda commented 5 years ago

The specific reason they are currently in 'Notebooks' is:

. That's the only way to use the empty space at the top of the launcher - otherwise you have to scroll all the way down to see it

. https://github.com/jupyterlab/jupyterlab/issues/5822

You can turn off the launcher completely by setting launcher_entry.enabled = False in your config. This might be useful for things without a GUI? We can also add more keys there to configure more things.

psychemedia commented 5 years ago

@yuvipanda In order to configure lab launcher icons, should you be able to pass a complete set of setup arguments?

Eg riffing on your docs example:

import os

def setup_openrefine():
  path = os.path.join(os.environ['HOME'], 'openrefine')
  return {
    'command': ['/home/jovyan/openrefine-2.8/refine', '-p', '{port}','-d',path],
    'port': 3333,
    'launcher_entry': {
        'enabled': True,
        'icon_path': '/home/jovyan/.jupyter/open-refine-logo.svg',
        'title': 'OpenRefine',
    },
  }

I did a quick test and the icon doesn't seem to get picked up in the lab launcher?

[UPDATE: my mistake - I'd disabled thejupyter labextension install jupyterlab-server-proxy step because of a jupyterlab version conflict. Updating Juptyerlab and installing the labextension fixed things.]