Class: MetricView

MetricView()

the display of the dataset citation and usage metrics on the dataset landing page

Screenshot

Constructor

new MetricView()

Source:

Extends

  • Backbone.View

Members

className :string

Class name to be applied to the metric buttons
Type:
  • string
Source:

metricName :string

Attribute to indicate the type of metric
Type:
  • string
Source:

model :MetricsModel

The Metric Model associated with this view
Type:
  • MetricsModel
Source:

Methods

initialize(options)

Parameters:
Name Type Description
options Object A literal object with options to pass to the view
Properties:
Name Type Description
options.model MetricsModel The MetricsModel object associated with this view
options.metricName string The name of the metric view
options.pid string Associated dataset identifier with this view
Source:

onClose()

Cleans up listeners from this view
Source:

render()

Renders the apprpriate metric view on the UI
Source:

renderError()

Manages error handling in case Metrics Service does not responsd
Source:

renderResults()

Displays the metrics count and badge on the landing page
Source:

showMetricModal()

Handles the click functions and displays appropriate modals on click events
Source: