Constructor
new MetricView()
- Source:
Extends
Members
className :string
Class name to be applied to the metric buttons
Type:
- Source:
events
- Source:
metricName :string
Attribute to indicate the type of metric
Type:
- Source:
metricsIcons :object
The font-awesome icons associated with each metric
Type:
- Since:
- Source:
The descriptions associated with each metric for tool-tips
Type:
- Since:
- Source:
model :MetricsModel
The Metric Model associated with this view
Type:
- Source:
Settings passed to the Formantic UI popup module to configure a tooltip
shown over the metric button.
Type:
- Since:
- Source:
- See:
-
Methods
Add a tooltip to the button with the given text
Parameters:
| Name |
Type |
Description |
tooltipText |
string
|
The text to show in the tooltip |
- Source:
initialize(options)
Parameters:
| Name |
Type |
Description |
options |
object
|
A literal object with options to pass to the
view
Properties
| Name |
Type |
Description |
model |
MetricsModel
|
The MetricsModel object
associated with this view |
metricName |
string
|
The name of the metric view |
pid |
string
|
Associated dataset identifier with this
view |
|
- Source:
The template for the metric button
Parameters:
| Name |
Type |
Description |
options |
object
|
A literal object with options for the
template
Properties
| Name |
Type |
Description |
metricValue |
string
|
The value of the metric to be
displayed |
metricIcon |
string
|
The icon class for the metric |
metricName |
string
|
The name of the metric |
|
- Source:
Returns:
- The HTML string for the metric button
-
Type
-
string
onClose()
Cleans up listeners from this view
- Source:
Remove any tooltip set on the button
- Source:
Renders the apprpriate metric view on the UI
- Source:
Returns:
- The MetricView object
-
Type
-
MetricView
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(_e)
Handles the click functions and displays appropriate modals on click
events
Parameters:
| Name |
Type |
Description |
_e |
Event
|
The click event object |
- Source: