echo $start_ts; ?> "> <input type="hidden" name="range_end" value="<?php echo $end_ts; ?> "> <button class="btn btn-primary" type="submit">Save Meeting Notes</button> </form> <?php if (getTeamConfig('oncall')) { ?> <h2>On Call Report <?php if ($results = getOnCallReportForWeek($oncall_start, $oncall_end)) { echo "<small> for week " . date("l jS F Y", $oncall_start) . " - " . date("l jS F Y", $oncall_end); echo " compiled by " . guessPersonOnCall($oncall_start, $oncall_end) . "</small></h2>"; ?> <table class="table table-striped table-bordered table-hover" id="oncall-table" style='font-size: 90%'> <thead> <tr> <th>Date/Time</th><th>Host</th><th>Service</th><th>Output</th><th>State</th> </tr> </thead> <tbody> <?php foreach ($results as $n) { echo formatOnCallRowForPrint($n); }
$year_tag_agg_total = 0; $year_sleep_status_agg = array(); $year_mtts_total = 0; $year_rtts_total = 0; $year_ntts_count = 0; $per_day_total = array(); $per_day_graph_data[] = array("Day of Week", "Alerts"); // Graph headers $status_graph_data[] = array("Week", "Critical", "Warning", "Down", "Unknown"); $tag_graph_data[] = array("Week", "Action Taken", "No Action Taken"); $tag_pct_graph_data[] = array("Week", "Action Taken", "No Action Taken"); $user_tag_graph_data[] = array("Week/Person", "Action Taken", "No Action Taken"); if ($num_weeks > 2) { // Require at least 2 weeks of data for yearly report foreach ($weeks as $week) { $results = getOnCallReportForWeek($week['range_start'], $week['range_end']); $year_total_notifications = $year_total_notifications + count($results); $week_status_summary = array("CRITICAL" => 0, "WARNING" => 0, "DOWN" => 0, "UNKNOWN" => 0); $week_tag_summary = array("action" => 0, "noaction" => 0); foreach ($results as $n) { // This aggregates the state types over the year e.g. CRITICAL $year_status_agg[$n['state']]++; // This aggregates the state for the week for the status graph per week $week_status_summary[$n['state']]++; // This aggregates the tags for the week for the tag graph per week $week_tag_summary[$nagios_tag_category_map[$n['tag']]]++; // This aggregates the tags down to a normalized version for display $year_tag_agg_normalised[$nagios_tag_category_map[$n['tag']]]++; // This is used to form a summary of normalized tags per user for the user graph $year_user_tag_agg[$n['contact']][$nagios_tag_category_map[$n['tag']]]++; // Count of Total alerts