Fixed the 'event_report_agent', 'event_report_group' and 'event_report_module' items in metaconsole reports. TICKET: #2249

This commit is contained in:
mdtrooper 2015-05-25 13:02:22 +02:00
parent 2061130825
commit e401dfa8bd
1 changed files with 36 additions and 0 deletions

View File

@ -1226,6 +1226,14 @@ function reporting_event_report_group($report, $content,
$content['name'] = __('Event Report Group');
}
if ($config['metaconsole']) {
$id_meta = metaconsole_get_id_server($content["server_name"]);
$server = metaconsole_get_connection_by_id ($id_meta);
metaconsole_connect($server);
}
$return['title'] = $content['name'];
$return['subtitle'] = groups_get_name($content['id_group'], true);
if (!empty($content['style']['event_filter_search'])) {
@ -1378,6 +1386,10 @@ function reporting_event_report_group($report, $content,
$ttl);
}
if ($config['metaconsole']) {
metaconsole_restore_db();
}
return reporting_check_structure_content($return);
}
@ -1390,6 +1402,14 @@ function reporting_event_report_module($report, $content) {
$content['name'] = __('Event Report Module');
}
if ($config['metaconsole']) {
$id_meta = metaconsole_get_id_server($content["server_name"]);
$server = metaconsole_get_connection_by_id ($id_meta);
metaconsole_connect($server);
}
$return['title'] = $content['name'];
$return['subtitle'] = agents_get_name($content['id_agent']) .
" - " .
@ -1409,6 +1429,10 @@ function reporting_event_report_module($report, $content) {
$return['data'] = $data;
}
if ($config['metaconsole']) {
metaconsole_restore_db();
}
return reporting_check_structure_content($return);
}
@ -2038,6 +2062,14 @@ function reporting_event_report_agent($report, $content,
$content['name'] = __('Event Report Agent');
}
if ($config['metaconsole']) {
$id_meta = metaconsole_get_id_server($content["server_name"]);
$server = metaconsole_get_connection_by_id ($id_meta);
metaconsole_connect($server);
}
$return['title'] = $content['name'];
$return['subtitle'] = agents_get_name($content['id_agent']);
$return["description"] = $content["description"];
@ -2156,6 +2188,10 @@ function reporting_event_report_agent($report, $content,
$ttl);
}
if ($config['metaconsole']) {
metaconsole_restore_db();
}
return reporting_check_structure_content($return);
}