} else { if ($html) { if (!$everything) { echo "<p class='lead'>" . count($results) . " results total</p>"; } echo $html; // Stats for on call items if ($context == 'service' || $context == 'host') { echo "<h3>Stats for these search results</h3>"; $stats_html = "<h4>Alert Status Distribution</h4>"; $stats_html .= renderStatusProgressBar($status_agg, $status_agg_total); $stats_html .= "<br />"; $stats_html .= "<h4>Tag Status Summary</h4><p>Breakdown of the tags applied to the notifications in this search</p>"; $stats_html .= renderTagTable($tag_agg, $tag_agg_total, $nagios_alert_tags); $stats_html .= "</table><p>Breakdown of the tags applied (normalised)</p>"; $stats_html .= renderTagTable($tag_agg_normalised, $tag_agg_total, $nagios_tag_categories); $stats_html .= "</table><br />"; echo $stats_html; ?> <h3>Notification Time Map</h3> <p>Grids read from top to bottom through hours, the darker the more alerts were recieved <small>(Hover over the blocks for a count)</small></p> <div id="cal-heatmap"></div> <script type="text/javascript"> var time_data = <?php echo json_encode($time_counts); ?> ; var cal = new CalHeatMap(); cal.init({
<h3>Alert Status Distribution</h3> <p>Breakdown of the type of notifications recieved during the week</p> <?php echo renderStatusProgressBar($week_status_agg, $week_status_agg_total); ?> <br /> <h3>Tag Status Summary</h3> <p>Breakdown of the tags applied to the notifications recieved during the week</p> <?php echo renderTagTable($week_tag_agg, $week_tag_agg_total, $nagios_alert_tags); ?> <p>Breakdown of the tags applied (normalised)</p> <?php echo renderTagTable($week_tag_agg_normalised, $week_tag_agg_total, $nagios_tag_categories); ?> <br /> <?php if ($week_sleep_status_agg[1] > 0 || $week_sleep_status_agg[0] > 0) { ?> <h3>Sleep State Summary</h3> <p>Breakdown of sleep states person was in during notifications this week</p> <?php echo renderSleepStatus($week_sleep_status_agg, $week_status_agg_total, $week_mtts_total, $week_rtts_count, $week_ntts_count); } ?> <br /> <h3>Top Notifying Hosts</h3>