diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index bba7a82f72..00a3dc38fb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1328,17 +1328,23 @@ function events_get_agent ($id_agent, $period, $date = 0, $sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')'; } - if ($filter_event_validated) { - $sql_where .= ' AND estado = 1 '; - } - if ($filter_event_no_validated) { - $sql_where .= ' AND estado = 0 '; + if ( $filter_event_validated && $filter_event_no_validated ) { + $sql_where .= " AND (estado = 1 OR estado = 0)"; + } + else { + if ($filter_event_validated) { + $sql_where .= ' AND estado = 1 '; + } else { + if ($filter_event_no_validated) { + $sql_where .= ' AND estado = 0 '; + } + } } $sql_where .= sprintf(' AND id_agente = %d AND utimestamp > %d AND utimestamp <= %d ', $id_agent, $datelimit, $date); - return events_get_events_grouped($sql_where, 0, 1000); + return events_get_events_grouped($sql_where, 0, 1000, is_metaconsole()); } /** diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index b6c9a1921f..a45e813452 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2034,13 +2034,6 @@ 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']);