Class: MdqRunView

MdqRunView()

A view that fetches and displays a Dataset Assessment

Constructor

new MdqRunView()

Source:

Extends

  • Backbone.View

Members

The selector for the element that will contain the breadcrumbs
Type:
  • string
Source:

el

Source:

events

Source:

loadingContainer :string

A JQuery selector for the element in the template that will contain the loading image
Type:
  • string
Since:
  • 2.15.0
Source:

loadingTemplate :function

The template to use to indicate that the view is loading
Type:
  • function
Source:

pid :string

The identifier of the object to be assessed
Type:
  • string
Source:

suiteId :string

The currently selected/requested suite
Type:
  • string
Source:

suiteIdList :Array.<string>

The list of all potential suites for this theme
Type:
  • Array.<string>
Source:

template :function

The main template for this view
Type:
  • function
Source:

tooltipSettings :object

Settings passed to the Formantic UI popup module to configure a tooltip shown over item titles.
Type:
  • object
Source:
See:

Methods

addCategoryItem(category, groupedResults)

Add a category item to the accordion, which represents a category of checks (GREEN, ORANGE, RED, BLUE).
Parameters:
Name Type Description
category object The category object containing status, title, and icon
groupedResults object The results grouped by status
Since:
  • 2.34.0
Source:

addOutputItem(output, parentItem) → {Promise.<object>}

Add an output item to the accordion. This is used when there are multiple outputs that are too long to display as a single item.
Parameters:
Name Type Description
output object The output object containing identifier, name, and value
parentItem object The parent item in the accordion to which this output belongs.
Since:
  • 2.34.0
Source:
Returns:
A promise that resolves with the output item
Type
Promise.<object>

addResultItem(result, parentItem)

Add an item to the accordion for a result. There are three display options for the result, depending on the length of the outputs: 1. If any one output is very long, all outputs will be displayed as collapsible items in the accordion. 2. If the outputs combined are very short, the output will be displayed as the title of the item, and no content will be shown. 3. If the outputs combined are long, but not too long, the output will be displayed as the content of the item, and the item will be scrollable if the content is too long.
Parameters:
Name Type Description
result object The result model containing the check and outputs
parentItem object The parent item in the accordion to which this item belongs.
Since:
  • 2.34.0
Source:

addResultItems(groupedResults)

Add the result items to the accordion, including the categories (GREEN, ORANGE, RED, BLUE), and the individual results within each category, and their outputs.
Parameters:
Name Type Description
groupedResults object The results grouped by status
Since:
  • 2.34.0
Source:

drawScoreChart(results, groupedResults)

Draw a donut chart showing the distribution of checks by status
Parameters:
Name Type Description
results Array The array of check results
groupedResults object The results grouped by status
Source:

getDescriptionHtml(result) → {string}

Get the HTML description for a result to include in a tooltip in the detail report accordion.
Parameters:
Name Type Description
result object The result model containing the check and outputs
Since:
  • 2.34.0
Source:
Returns:
The HTML description for the result
Type
string

getHTMLFromMarkdown(markdown) → {Promise}

Get the HTML from markdown
Parameters:
Name Type Description
markdown string The markdown to convert to HTML
Source:
Returns:
A promise that resolves with the HTML
Type
Promise

getOutputHTML(outputs) → {string}

Get the HTML for the output
Parameters:
Name Type Description
outputs Array The outputs from the quality service
Source:
Returns:
The HTML for the output
Type
string

handleQualityReportError()

Handles errors that occur when fetching the quality report
Source:

hideLoading()

Remove the loading image and message.
Source:

initialize()

Source:

insertBreadcrumbs()

Insert breadcrumbs into the view
Source:

outputStats(outputs) → {object}

Calculate statistics for the outputs of a result.
Parameters:
Name Type Description
outputs Array The outputs for a single result
Since:
  • 2.34.0
Source:
Returns:
An object containing the total length of all outputs and the maximum length of a single output
Type
object

render()

Source:

renderDetailedReport(groupedResults)

Show each result and its outputs in a collapsible accordion grouped by result status (GREEN, ORANGE, RED, BLUE).
Parameters:
Name Type Description
groupedResults object The results grouped by status
Source:

renderQualityReport()

Render the quality report once it has been fetched
Source:

show()

Show the view
Source:

showCitation()

Render a citation view for the object and display it in the view
Source:

showLoading()

Render a loading image with message
Source:

showMessage(message, showHelpopt, showLinkopt)

Updates the message in the loading image
Parameters:
Name Type Attributes Description
message string The new message to display
showHelp boolean <optional>
If set to true, and an email contact is configured in MetacatUI, then the contact email will be shown at the bottom of the message.
showLink boolean <optional>
If set to true, a link back to the dataset will be appended to the end of the message.
Since:
  • 2.15.0
Source:

switchSuite(event) → {boolean}

Handles the event when the user selects a different suite
Parameters:
Name Type Description
event Event The event object
Source:
Returns:
False, to prevent the default action
Type
boolean

updateOutputIdTitles(ids, modelsopt)

Update the titles of items in the accordion that have an identifier in their output. The identifier will be used as the title of the item instead of the uuid.
Parameters:
Name Type Attributes Description
ids object An object mapping identifiers to titles
models Array <optional>
An optional array of models to update. If not provided, all models in the accordion will be updated.
Since:
  • 2.34.0
Source: