Fix broken test for metrics chart

This commit is contained in:
cptran777 2018-08-02 11:59:44 -07:00
parent dca915041a
commit 3b7f07b54e

View File

@ -1,6 +1,6 @@
import Component from '@ember/component';
import { IChartDatum } from 'wherehows-web/typings/app/visualization/charts';
import { set } from '@ember/object';
import { setProperties } from '@ember/object';
import { noop } from 'wherehows-web/utils/helpers/functions';
export default class DatasetsHealthMetricsCharts extends Component {
@ -15,11 +15,21 @@ export default class DatasetsHealthMetricsCharts extends Component {
* a filter, triggered when the user clicks on one of the bars of the bar chart.
* @param {IChartDatum} datum - the actual chart datum object so we know what was clicked
*/
onFilterSelect: (datum: IChartDatum) => void;
onCategorySelect: (datum: IChartDatum) => void;
/**
* Pass through function meant to come from the dataset-health container that handles the selection of
* a filter, triggered when the user clicks on one of the bars of the bar chart.
* @param {IChartDatum} datum - the actual chart datum object so we know what was clicked
*/
onSeveritySelect: (datum: IChartDatum) => void;
constructor() {
super(...arguments);
set(this, 'onFilterSelect', this.onFilterSelect || noop);
setProperties(this, {
onCategorySelect: this.onCategorySelect || noop,
onSeveritySelect: this.onSeveritySelect || noop
});
}
}