2011-12-12 Sergio Martin <sergio.martin@artica.es>
* include/functions_graph.php: Fixed some notices of the graphs when no data * include/functions_reporting.php include/functions.php godmode/reporting/reporting_builder.item_editor.php: Added the first version of the new group report 3438332 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f8dd9e452e
commit
f2c024085b
|
@ -1,3 +1,13 @@
|
|||
2011-12-12 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_graph.php: Fixed some notices of the graphs
|
||||
when no data
|
||||
|
||||
* include/functions_reporting.php
|
||||
include/functions.php
|
||||
godmode/reporting/reporting_builder.item_editor.php: Added the
|
||||
first version of the new group report 3438332
|
||||
|
||||
2011-12-09 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* include/help/ja/help_custom_logo.php: Changed height and width in
|
||||
|
|
|
@ -291,6 +291,9 @@ switch ($action) {
|
|||
$show_resume = $item['show_resume'];
|
||||
$show_graph = $item['show_graph'];
|
||||
break;
|
||||
case 'group_report':
|
||||
$group = $item['id_group'];
|
||||
break;
|
||||
case 'top_n':
|
||||
$description = $item['description'];
|
||||
$period = $item['period'];
|
||||
|
@ -1321,6 +1324,9 @@ function chooseType() {
|
|||
$("#row_show_resume").css('display', '');
|
||||
$("#row_show_in_two_columns").css('display', '');
|
||||
break;
|
||||
case 'group_report':
|
||||
$("#row_group").css('display', '');
|
||||
break;
|
||||
case 'top_n':
|
||||
$("#row_description").css('display', '');
|
||||
$("#row_period").css('display', '');
|
||||
|
|
|
@ -733,6 +733,7 @@ function get_report_types () {
|
|||
$types['event_report_module'] = __('Event report module');
|
||||
$types['event_report_group'] = __('Event report group');
|
||||
$types['general'] = __('General');
|
||||
$types['group_report'] = __('Group report');
|
||||
$types['top_n'] = __('Top n');
|
||||
$types['exception'] = __('Exception');
|
||||
if ($config['metaconsole'] != 1)
|
||||
|
|
|
@ -480,6 +480,9 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||
$time_format = 'M j';
|
||||
}
|
||||
|
||||
$graph_values = array();
|
||||
$module_name_list = array();
|
||||
|
||||
// Calculate data for each module
|
||||
for ($i = 0; $i < $module_number; $i++) {
|
||||
// If its a projection graph, first module will be data and second will be the projection
|
||||
|
|
|
@ -3022,6 +3022,54 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$table->colspan[2][0] = 3;
|
||||
$data[0] = '<p style="font: bold '.$sizem.'em Arial, Sans-serif; color: #000000;">'.$mttr.'</p>';
|
||||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'group_report':
|
||||
$group_name = groups_get_name($content['id_group']);
|
||||
$group_stats = reporting_get_group_stats($content['id_group']);
|
||||
|
||||
$data = array ();
|
||||
|
||||
$table->colspan[0][0] = 7;
|
||||
$table->colspan[1][3] = 4;
|
||||
$table->colspan[3][3] = 4;
|
||||
$table->colspan[4][2] = 5;
|
||||
$data[0] = $sizh. __('Group report').': "'.$group_name.'"' . $sizhfin;
|
||||
|
||||
array_push ($table->data, $data);
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<b>'.__('Agents').'</b>';
|
||||
$data[1] = __('Total').' ('.$group_stats['total_agents'].')';
|
||||
$data[2] = __('Unknown').' ('.$group_stats['agents_unknown'].')';
|
||||
$data[3] = '';
|
||||
array_push ($table->data, $data);
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<b>'.__('Monitors').'</b>';
|
||||
$data[1] = __('Total').' ('.$group_stats['monitor_checks'].')';
|
||||
$data[2] = __('Normal').' ('.$group_stats['monitor_ok'].')';
|
||||
$data[3] = __('Critical').' ('.$group_stats['monitor_critical'].')';
|
||||
$data[4] = __('Warning').' ('.$group_stats['monitor_warning'].')';
|
||||
$data[5] = __('Unknown').' ('.$group_stats['monitor_unknown'].')';
|
||||
$data[6] = __('Not init').' ('.$group_stats['monitor_not_init'].')';
|
||||
array_push ($table->data, $data);
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<b>'.__('Alerts').'</b>';
|
||||
$data[1] = __('Total').' ('.$group_stats['monitor_alerts'].')';
|
||||
$data[2] = __('Fired').' ('.$group_stats['monitor_alerts_fired'].')';
|
||||
$data[3] = '';
|
||||
array_push ($table->data, $data);
|
||||
|
||||
// Get events of the last 8 hours
|
||||
$events = events_get_group_events ($content['id_group'], 28800, $report["datetime"]);
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<b>'.__('Events').'</b>';
|
||||
$data[1] = __('Last 8 hours events').' ('.count($events).')';
|
||||
$data[2] = '';
|
||||
array_push ($table->data, $data);
|
||||
|
||||
break;
|
||||
case 'general':
|
||||
$group_by_agent = $content['group_by_agent'];
|
||||
|
|
Loading…
Reference in New Issue