Middleware responsible for assembling and presenting a dataset's task list.
The notion of "tasks" used here means some actions that an LPA needs to take to improve the quality of the data.
A task is added to the list when:
- data ingestion pipeline has problems accessing the endpoint URL (this happens outside of this application)
- data ingestion pipeline found issues with the data (again, happnes outside of this application, but we can query the results in datasette)
- an 'expectation' failed (happens outside this application, but we can query the results)
Members
(static, constant) fetchResourceStatus
Fetches the resource status
(static, constant) prepareDatasetTaskListTemplateParams
Middleware. Updates req with templateParams
param {{ orgInfo: module:middleware~OrgInfo, sources: module:middleware~Source[], entityCountRow: undefined | { entity_count: number}, issues: Issue[] }} req
(static, constant) prepareTasks
Generates a list of tasks based on the issues found in the dataset.
Methods
(static) entityOutOfBoundsMessage(dataset, count) → {string}
Returns a task message for failed entity out of bounds expectation.
Parameters:
Name | Type | Description |
---|---|---|
dataset |
string | dataset slug |
count |
number | how many entities out of bounds were found |
Returns:
task message
- Type
- string
(inner) getStatusTag(status) → {object}
Returns a status tag object with a text label and a CSS class based on the status.
Parameters:
Name | Type | Description |
---|---|---|
status |
string | The status to generate a tag for (e.g. "Error", "Needs fixing", etc.) |
Returns:
- An object with a
tag
property containing the text label and CSS class.
- Type
- object