Cylc Review can now be run as a JupyterHub service.
This service may or may not be available depending on whether the site is using JupyterHub and whether they have configured the service to start.
The UI would like to be able to link to pages in Cylc Review, however, requires some form of interface to tell it if Cylc Review is installed.
Presently there is an interface in cylc-uiserver which lists any Jupyter Server web applications (namely Jupyter Lab and Cylc GUI) which is how we are able to toggle the Jupyter Lab button on the Cylc GUI dashboard:
|
user_info['extensions'] = { |
|
app.name: RE_SLASH.sub( |
|
'/', f'{self.serverapp.base_url}/{app.default_url}' |
|
) |
|
for extension_apps |
|
in self.serverapp.extension_manager.extension_apps.values() |
|
# filter out extensions that do not provide a default_url OR |
|
# set it to the root endpoint. |
|
for app in extension_apps |
|
if getattr(app, 'default_url', '/') != '/' |
|
} |
We need something similar to indicate whether Cylc Review is running:
First challenge is to determine whether Cylc Review is configured/running, some ideas:
- Does Jupyter Hub provide a REST endpoint for this?
- Does Jupyter Hub provide a Python interface for this?
- Ping the URL?
The second challenge is to expose this information, suggest adding it to a new field in the UserProfileHandler (see above code snippet).
Cylc Review can now be run as a JupyterHub service.
This service may or may not be available depending on whether the site is using JupyterHub and whether they have configured the service to start.
The UI would like to be able to link to pages in Cylc Review, however, requires some form of interface to tell it if Cylc Review is installed.
Presently there is an interface in cylc-uiserver which lists any Jupyter Server web applications (namely Jupyter Lab and Cylc GUI) which is how we are able to toggle the Jupyter Lab button on the Cylc GUI dashboard:
cylc-uiserver/cylc/uiserver/handlers.py
Lines 284 to 294 in b21bc47
We need something similar to indicate whether Cylc Review is running:
First challenge is to determine whether Cylc Review is configured/running, some ideas:
The second challenge is to expose this information, suggest adding it to a new field in the UserProfileHandler (see above code snippet).