Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var propertyChart = null;
var jobtypeChart = null;
var taskCountChart = null;
var localChart = null;
var unitChart = null;
var clusterChart = null;
var zoneChart = null;
var lowermeanChart = dc.numberDisplay("#dc-lowermean-chart");
var middlemeanChart = dc.numberDisplay("#dc-middlemean-chart");
var uppermeanChart = dc.numberDisplay("#dc-uppermean-chart");
var completionBellChart = null;
var lowerupperChart = dc.numberDisplay("#dc-lowerupper-chart");
var middlemiddleChart = dc.numberDisplay("#dc-middlemiddle-chart");
var upperlowerChart = dc.numberDisplay("#dc-upperlower-chart");
function prepareCharts(jobs, start, end, firstRun) {
if (firstRun) //if its the first run expect everything to not exist, and draw it all
{
facts = crossfilter(jobs.Results)
var all = facts.groupAll();
//display totals
countchart = dc.dataCount(".total");
// jobs per hour time chart
timeOpenChart = dc.barChart("#dc-timeopen-chart");
var jobtypeChart = null;
var taskCountChart = null;
var localChart = null;
var unitChart = null;
var clusterChart = null;
var zoneChart = null;
var lowermeanChart = dc.numberDisplay("#dc-lowermean-chart");
var middlemeanChart = dc.numberDisplay("#dc-middlemean-chart");
var uppermeanChart = dc.numberDisplay("#dc-uppermean-chart");
var completionBellChart = null;
var lowerupperChart = dc.numberDisplay("#dc-lowerupper-chart");
var middlemiddleChart = dc.numberDisplay("#dc-middlemiddle-chart");
var upperlowerChart = dc.numberDisplay("#dc-upperlower-chart");
function prepareCharts(jobs, start, end, firstRun) {
if (firstRun) //if its the first run expect everything to not exist, and draw it all
{
facts = crossfilter(jobs.Results)
var all = facts.groupAll();
//display totals
countchart = dc.dataCount(".total");
// jobs per hour time chart
timeOpenChart = dc.barChart("#dc-timeopen-chart");
runningChart = dc.compositeChart("#dc-running-chart");
var hazardChart = null;
var propertyChart = null;
var jobtypeChart = null;
var taskCountChart = null;
var localChart = null;
var unitChart = null;
var clusterChart = null;
var zoneChart = null;
var lowermeanChart = dc.numberDisplay("#dc-lowermean-chart");
var middlemeanChart = dc.numberDisplay("#dc-middlemean-chart");
var uppermeanChart = dc.numberDisplay("#dc-uppermean-chart");
var completionBellChart = null;
var lowerupperChart = dc.numberDisplay("#dc-lowerupper-chart");
var middlemiddleChart = dc.numberDisplay("#dc-middlemiddle-chart");
var upperlowerChart = dc.numberDisplay("#dc-upperlower-chart");
function prepareCharts(jobs, start, end, firstRun) {
if (firstRun) //if its the first run expect everything to not exist, and draw it all
{
facts = crossfilter(jobs.Results)
var all = facts.groupAll();
//display totals
countchart = dc.dataCount(".total");
// jobs per hour time chart
var statusChart = null;
var agencyChart = null;
var eventChart = null;
var priorityChart = null;
var hazardChart = null;
var propertyChart = null;
var jobtypeChart = null;
var taskCountChart = null;
var localChart = null;
var unitChart = null;
var clusterChart = null;
var zoneChart = null;
var lowermeanChart = dc.numberDisplay("#dc-lowermean-chart");
var middlemeanChart = dc.numberDisplay("#dc-middlemean-chart");
var uppermeanChart = dc.numberDisplay("#dc-uppermean-chart");
var completionBellChart = null;
var lowerupperChart = dc.numberDisplay("#dc-lowerupper-chart");
var middlemiddleChart = dc.numberDisplay("#dc-middlemiddle-chart");
var upperlowerChart = dc.numberDisplay("#dc-upperlower-chart");
function prepareCharts(jobs, start, end, firstRun) {
if (firstRun) //if its the first run expect everything to not exist, and draw it all
{
facts = crossfilter(jobs.Results)
var all = facts.groupAll();
var dataTable = null;
var statusChart = null;
var agencyChart = null;
var eventChart = null;
var priorityChart = null;
var hazardChart = null;
var propertyChart = null;
var jobtypeChart = null;
var taskCountChart = null;
var localChart = null;
var unitChart = null;
var clusterChart = null;
var zoneChart = null;
var lowermeanChart = dc.numberDisplay("#dc-lowermean-chart");
var middlemeanChart = dc.numberDisplay("#dc-middlemean-chart");
var uppermeanChart = dc.numberDisplay("#dc-uppermean-chart");
var completionBellChart = null;
var lowerupperChart = dc.numberDisplay("#dc-lowerupper-chart");
var middlemiddleChart = dc.numberDisplay("#dc-middlemiddle-chart");
var upperlowerChart = dc.numberDisplay("#dc-upperlower-chart");
function prepareCharts(jobs, start, end, firstRun) {
if (firstRun) //if its the first run expect everything to not exist, and draw it all
{
facts = crossfilter(jobs.Results)
var all = facts.groupAll();
Template.mozdefhealth.rendered = function() {
var ringChartEPS = dc.pieChart( "#ringChart-EPS" );
var totalEPS = dc.numberDisplay( "#total-EPS" );
var ringChartLoadAverage = dc.pieChart( "#ringChart-LoadAverage" );
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 timeClosedChart = null;
var dataTable = null;
var statusChart = null;
var agencyChart = null;
var eventChart = null;
var priorityChart = null;
var hazardChart = null;
var propertyChart = null;
var jobtypeChart = null;
var taskCountChart = null;
var localChart = null;
var unitChart = null;
var clusterChart = null;
var zoneChart = null;
var lowermeanChart = dc.numberDisplay("#dc-lowermean-chart");
var middlemeanChart = dc.numberDisplay("#dc-middlemean-chart");
var uppermeanChart = dc.numberDisplay("#dc-uppermean-chart");
var completionBellChart = null;
var lowerupperChart = dc.numberDisplay("#dc-lowerupper-chart");
var middlemiddleChart = dc.numberDisplay("#dc-middlemiddle-chart");
var upperlowerChart = dc.numberDisplay("#dc-upperlower-chart");
function prepareCharts(jobs, start, end, firstRun) {
if (firstRun) //if its the first run expect everything to not exist, and draw it all
{
facts = crossfilter(jobs.Results)