Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$("#reset-all").click(function () {
dc.filterAll();
dc.renderAll();
return false;
});
$("#reset-volume-chart").click(function () {
handleReset(){
dc.filterAll();
dc.renderAll();
const all_data = this.state.all_data;
this.setState({
selected_data: all_data
})
}
$(".total").click(function($e) {
$e.preventDefault();
dc.filterAll();
dc.renderAll();
});
refreshChartData = function() {
var frontEndData = healthfrontend.find( {} ).fetch();
var ndx = crossfilter( frontEndData );
if ( frontEndData.length === 0 && ndx.size() > 0 ) {
debugLog( 'clearing ndx/dc.js' );
dc.filterAll();
ndx.remove();
dc.redrawAll();
} else {
ndx = crossfilter( frontEndData );
}
if ( ndx.size() > 0 ) {
var hostDim = ndx.dimension( function( d ) { return d.hostname; } );
var hostEPS = hostDim.group().reduceSum( function( d ) { return d.details.total_deliver_eps.toFixed( 2 ); } );
var hostLoadAverage = hostDim.group().reduceSum( function( d ) { return d.details.loadaverage[0]; } );
var epsTotal = ndx.groupAll().reduceSum( function( d ) { return d.details.total_deliver_eps; } );
totalEPS
.valueAccessor( function( d ) { return d; } )
.group( epsTotal );
ringChartEPS
"click .reset": function( e, t ) {
Session.set( 'alertssearchtext', '' );
Session.set( 'alertsfiltertext', '' );
dc.filterAll( "alertssummary" );
refreshAlertsData();
dc.renderAll( "alertssummary" );
},