Fixed problem with Event report agent, when is metaconsole. Tiquet: #3045
(cherry picked from commit 59e0387069
)
This commit is contained in:
parent
e1e1a04be1
commit
5e69d3a110
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Reference in New Issue