Add extended events to event reporting tables
Former-commit-id: afbf41109bc382c6b26cb0e6b97d5dc3d580c256
This commit is contained in:
parent
d89e3993e7
commit
09897591c3
pandora_console
|
@ -0,0 +1,5 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `treport_content` ADD COLUMN `show_extended_events` tinyint(1) default '0';
|
||||
|
||||
COMMIT;
|
|
@ -1376,6 +1376,7 @@ ALTER TABLE treport_content ADD COLUMN `lapse` int(11) default '300';
|
|||
ALTER TABLE treport_content ADD COLUMN `visual_format` tinyint(1) default '0';
|
||||
ALTER TABLE treport_content ADD COLUMN `hide_no_data` tinyint(1) default '0';
|
||||
ALTER TABLE treport_content ADD COLUMN `recursion` tinyint(1) default NULL;
|
||||
ALTER TABLE treport_content ADD COLUMN `show_extended_events` tinyint(1) default '0';
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmodule_relationship`
|
||||
|
|
|
@ -450,6 +450,7 @@ switch ($action) {
|
|||
case 'event_report_agent':
|
||||
case 'event_report_group':
|
||||
$recursion = $item['recursion'];
|
||||
$include_extended_events = $item['show_extended_events'];
|
||||
break;
|
||||
|
||||
case 'event_report_module':
|
||||
|
@ -471,6 +472,8 @@ switch ($action) {
|
|||
$event_graph_validated_vs_unvalidated = $style['event_graph_validated_vs_unvalidated'];
|
||||
|
||||
$filter_search = $style['event_filter_search'];
|
||||
|
||||
$include_extended_events = $item['show_extended_events'];
|
||||
break;
|
||||
|
||||
case 'general':
|
||||
|
|
|
@ -1298,6 +1298,7 @@ switch ($action) {
|
|||
$values['exception_condition_value'] = get_parameter('exception_condition_value');
|
||||
$values['id_module_group'] = get_parameter('combo_modulegroup');
|
||||
$values['id_group'] = get_parameter('combo_group');
|
||||
$values['show_extended_events'] = get_parameter('include_extended_events');
|
||||
$values['server_name'] = get_parameter('server_name');
|
||||
$server_id = (int) get_parameter('server_id');
|
||||
if ($server_id != 0) {
|
||||
|
@ -1689,6 +1690,7 @@ switch ($action) {
|
|||
$values['exception_condition_value'] = get_parameter('exception_condition_value');
|
||||
$values['id_module_group'] = get_parameter('combo_modulegroup');
|
||||
$values['id_group'] = get_parameter('combo_group');
|
||||
$values['show_extended_events'] = get_parameter('include_extended_events');
|
||||
|
||||
|
||||
if ((($values['type'] == 'custom_graph') or ($values['type'] == 'automatic_custom_graph')) && ($values['id_gs'] == 0 || $values['id_gs'] == '')) {
|
||||
|
|
|
@ -1668,6 +1668,7 @@ function reporting_event_report_group(
|
|||
}
|
||||
|
||||
$return['description'] = $content['description'];
|
||||
$return['show_extended_events'] = $content['show_extended_events'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
|
||||
$event_filter = $content['style'];
|
||||
|
@ -1888,6 +1889,7 @@ function reporting_event_report_module(
|
|||
}
|
||||
|
||||
$return['description'] = $content['description'];
|
||||
$return['show_extended_events'] = $content['show_extended_events'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||
|
||||
|
@ -2727,6 +2729,7 @@ function reporting_event_report_agent(
|
|||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||
$return['show_summary_group'] = $content['style']['show_summary_group'];
|
||||
$return['show_extended_events'] = $content['show_extended_events'];
|
||||
|
||||
$style = $content['style'];
|
||||
|
||||
|
@ -7578,6 +7581,7 @@ function reporting_get_agents_detailed_event(
|
|||
'criticity' => $e['criticity'],
|
||||
'validated_by' => $e['id_usuario'],
|
||||
'timestamp' => $e['timestamp_rep'],
|
||||
'id_evento' => $e['id_evento'],
|
||||
];
|
||||
} else {
|
||||
$return_data[] = [
|
||||
|
@ -7587,6 +7591,7 @@ function reporting_get_agents_detailed_event(
|
|||
'criticity' => $e['criticity'],
|
||||
'validated_by' => $e['id_usuario'],
|
||||
'timestamp' => $e['timestamp'],
|
||||
'id_evento' => $e['id_evento'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -914,6 +914,9 @@ function reporting_html_top_n($table, $item, $pdf=0)
|
|||
function reporting_html_event_report_group($table, $item, $pdf=0)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$show_extended_events = $item['show_extended_events'];
|
||||
|
||||
if ($item['total_events']) {
|
||||
$table1 = new stdClass();
|
||||
$table1->width = '99%';
|
||||
|
@ -1021,6 +1024,19 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
}
|
||||
|
||||
array_push($table1->data, $data);
|
||||
|
||||
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
||||
|
||||
$extended_events = events_get_extended_events($event['id_evento']);
|
||||
|
||||
foreach ($extended_events as $extended_event) {
|
||||
$extended_data = [];
|
||||
|
||||
$extended_data[] = "<td colspan='5'><font style='font-style: italic;'>".io_safe_output($extended_event['description'])."</font></td><td><font style='font-size: 6pt; font-style: italic;'>".date($config['date_format'], $extended_event['utimestamp'])."</font></td>";
|
||||
array_push($table1->data, $extended_data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($pdf) {
|
||||
|
@ -1130,6 +1146,9 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
function reporting_html_event_report_module($table, $item, $pdf=0)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$show_extended_events = $item['show_extended_events'];
|
||||
|
||||
$show_summary_group = $item['show_summary_group'];
|
||||
if ($item['total_events']) {
|
||||
if (!empty($item['failed'])) {
|
||||
|
@ -1213,6 +1232,19 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
}
|
||||
|
||||
$table1->data[] = $data;
|
||||
|
||||
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
||||
|
||||
$extended_events = events_get_extended_events($event['id_evento']);
|
||||
|
||||
foreach ($extended_events as $extended_event) {
|
||||
$extended_data = [];
|
||||
|
||||
$extended_data[] = "<td colspan='3'><font style='font-style: italic;'>".io_safe_output($extended_event['description'])."</font></td><td><font style='font-style: italic;'>".date($config['date_format'], $extended_event['utimestamp'])."</font></td>";
|
||||
array_push($table1->data, $extended_data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1902,6 +1934,8 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
{
|
||||
global $config;
|
||||
|
||||
$show_extended_events = $item['show_extended_events'];
|
||||
|
||||
if ($item['total_events'] != 0) {
|
||||
$table1 = new stdClass();
|
||||
$table1->width = '99%';
|
||||
|
@ -1989,6 +2023,19 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
}
|
||||
|
||||
array_push($table1->data, $data);
|
||||
|
||||
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
||||
|
||||
$extended_events = events_get_extended_events($event['id_evento']);
|
||||
|
||||
foreach ($extended_events as $extended_event) {
|
||||
$extended_data = [];
|
||||
|
||||
$extended_data[] = "<td colspan='4'><font style='font-style: italic;'>".io_safe_output($extended_event['description'])."</font></td><td><font style='font-size: 6pt; font-style: italic;'>".date($config['date_format'], $extended_event['utimestamp'])."</font></td>";
|
||||
array_push($table1->data, $extended_data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($pdf) {
|
||||
|
|
Loading…
Reference in New Issue