Skip to content

review: interface to detect if the cylc-review service is present #801

@oliver-sanders

Description

@oliver-sanders

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:

  1. Does Jupyter Hub provide a REST endpoint for this?
  2. Does Jupyter Hub provide a Python interface for this?
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions