EccClientGa4ghWesRunOutput Component
Overview
The ecc-client-ga4gh-wes-run-output component shows one output of a workflow run, as the workflow's GA4GH IO Schema (opens in a new tab) describes it (version 0.3.0, commit 2c3dc49 (opens in a new tab)). Pass it the output's schema and its value from the run's outputs; render one per output, e.g. in the outputs slot of ecc-client-ga4gh-wes-run.
Each output is a row with its title, file name and description, and buttons to copy the URI and download the file:
| Output | Shown as |
|---|---|
File with table-viewer (CSV, TSV) | A table; the first row is the header |
File with html-viewer | The HTML in a sandboxed frame |
| Any other file | Download only |
| List of files, or files keyed by name | One row that expands to its files |
| Any other value | The value as text |
Security
Outputs and schemas are treated as untrusted:
- Titles, descriptions and table cells are shown as text, never as markup.
- HTML is shown in an
iframewith an emptysandboxand a Content Security Policy: no scripts, no external loads, and links can't navigate the frame. - Files are only downloaded, never linked, and only for URIs whose scheme is in
allowedSchemes. Schemes such asjavascript,dataandfileare always refused.
Usage
The preview shows the outputs of the IO Schema's demo workflow. The report tries to run a script and load an external image; both are blocked.
Output provider
The component fetches and downloads files only through a WesOutputProvider. The app decides how storage URIs (e.g. s3://, drs://) become URLs and adds credentials. Without a provider, files are shown as URIs only.
interface WesOutputProvider {
fetchOutput(uri: string, init?: { signal?: AbortSignal }): Promise<Response>;
getDownloadUrl(uri: string): Promise<string>;
}Download URLs must be served with Content-Disposition: attachment and X-Content-Type-Options: nosniff. A provider that resolves URIs on a server (a proxy, a presigning service) must accept only the deployment's own storage and DRS hosts: https outputs can name any host.
Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
name | name | string | "" | Key of the output; the title if the schema has none. |
schema | object | undefined | Schema of the output in the IO Schema's outputs. | |
value | unknown | undefined | Value of the output. | |
provider | WesOutputProvider | undefined | Fetches and downloads files. | |
allowedSchemes | allowed-schemes | string[] | ["drs", "https"] | URI schemes that may be fetched or downloaded. |
maxRows | max-rows | number | 1000 | Rows a table shows at most. |
Tables also show at most 100 columns, lists at most 50 files, and viewers read at most 5 MiB of a file; the rest is offered for download.
Methods
| Method | Description |
|---|---|
reload() | Loads the output again, e.g. to retry files that failed. |
CSS Parts
| Part | Description |
|---|---|
base | The container of the output. |
