EccClientGa4ghWesRun Component
Overview
The ecc-client-ga4gh-wes-run component displays the detailed information and status of a single workflow run.
Usage
Basic Run Details
This example shows the details for a specific workflow run ID.
NEXT_PUBLIC_WES_URL set to your own WES endpoint (see Live previews), or use the code in the other tabs.The preview above needs your own WES instance and the ID of a run there. See Live previews.
Tasks
The Task Logs tab shows the run's tasks:
- the inline
task_logsof the run log, or, for WES 1.1 servers that give onlytask_logs_url(e.g. Conquest), the tasks listed by the provider'slistRunTasks()(GET /runs/{run_id}/tasks), a page at a time, with a button for the next page (also after an empty page) and one to try again if a listing fails; - for each task its name, ID, start and end time, exit code, system logs, its TES task (
tes_uri, a link only if it is an HTTP(S) URL) and its logs, which are fetched when the task is opened.
Log URLs are fetched with the provider's getLog() (with RestWesProvider: the service's authorization for its own origin, no credentials elsewhere). Providers without getLog() fetch them without credentials, also on the page's own origin: implement getLog() if your logs need cookies or a token. Log values that aren't URLs are shown as given, with a hint.
Outputs with an IO schema
Without an IO schema, the Outputs tab shows RunLog.outputs as the server reports it. With the workflow's IO schema (ioSchema), it shows the normalised outputs of a run that has ended: each output by its title and description, with its viewer hint (a table, an HTML report in a sandboxed frame) and download, as ecc-client-ga4gh-wes-run-output shows it. Only URIs with a scheme from allowedSchemes are fetched or offered for download, through outputProvider.
- While the run hasn't ended, the tab says that outputs are shown when it has (without the raw outputs).
- Outputs of a run that didn't complete are shown with a warning that they may be incomplete; invalid ones are left out and named.
- Outputs that don't match the schema are kept, with a warning and the errors.
- Outputs that the engine reports but the schema doesn't declare, and listed files that no output found ("Other files"), are shown without a description; outputs that weren't produced are named.
- Outputs that can't be converted (e.g. files that can't be located, or values nested too deeply), globs that match several files, and listed files with unsafe paths are named in notices.
- If the outputs can't be normalised (e.g. an unsupported shape, or a schema that doesn't conform to the profile), the tab says why and shows them as reported.
Where the server keeps the run's files is deployment knowledge: outputOptions gives it (outputDir, localDir, files), or a function of the run log that returns it, also as a promise (e.g. to fetch a listing). The outputs are normalised again whenever ioSchema or outputOptions changes, so pass the same object or function between renders (in React, define it outside the component or memoise it). The normaliser and the output element are loaded when they are first needed.
This preview uses a provider that returns a run of the profile's demo workflow (WDL), as miniwdl reports it (local paths), from a completed or a failed run:
Properties
| Property | Type | Default | Description |
|---|---|---|---|
runId | string | "" | ID of the workflow run to display details for. |
provider | WesProvider | null | Data provider for fetching run data (see Providers) |
ioSchema | object | undefined | The workflow's IO schema (GA4GH IO Schema Profile 0.3.0); shows the normalised outputs |
outputOptions | OutputOptions | (runLog) => OutputOptions | Promise<OutputOptions> | undefined | Where the run keeps its files: outputDir (URI), localDir (path as the engine sees it), files (a listing) |
outputProvider | WesOutputProvider | undefined | Fetches output files for viewers and returns download URLs (see Run Output) |
allowedSchemes | string[] | ['drs', 'https'] | URI schemes of outputs that may be fetched or downloaded |
The run ID can also be set with the run-id attribute (earlier versions read it from runid, which no longer works). ioSchema, outputOptions, outputProvider and allowedSchemes are properties only, without attributes; when allowedSchemes is unset, outputs use ['drs', 'https']. The preview above adds s3 because its provider resolves s3 URIs: add a scheme only if your outputProvider handles it safely.
Events
| Event Name | React Event Name | Detail Type | Description |
|---|---|---|---|
ecc-run-log-changed | onEccRunLogChanged | { runId: string, runLog: object } | Fired when the run log data is fetched or updated. |
