changed event count in group report

This commit is contained in:
alejandro-campos 2020-03-13 14:21:25 +01:00
parent 2977766cc7
commit 8000f4cf92
2 changed files with 14 additions and 18 deletions

View File

@ -2880,19 +2880,19 @@ function reporting_group_report($report, $content)
$return['data'] = [];
$events = events_get_agent(
false,
$content['period'],
$report['datetime'],
false,
true,
false,
false,
false,
false,
$content['id_group'],
true
);
$id_group = groups_safe_acl($config['id_user'], $content['id_group'], 'ER');
if (empty($id_group)) {
$events = [];
} else {
$sql_where = sprintf(' AND id_grupo IN (%s) AND estado<>1 ', implode(',', $id_group));
$events = events_get_events_grouped(
$sql_where,
0,
1000,
is_metaconsole()
);
}
if (empty($events)) {
$events = [];

View File

@ -1920,11 +1920,7 @@ function reporting_html_group_report($table, $item, $pdf=0)
<td colspan='3' class='cellBold cellCenter cellAlert cellBorder1 cellBig'>".$item['data']['group_stats']['monitor_alerts_fired']."</td>
</tr>
<tr>
<td></td>
<td colspan='6' class='cellBold cellCenter'>".__('Last %s', human_time_description_raw($item['date']['period']))."</td>
</tr>
<tr>
<td class='cellBold cellCenter'>".__('Events')."</td>
<td class='cellBold cellCenter'>".__('Events (not validated)')."</td>
<td colspan='6' class='cellBold cellCenter cellWhite cellBorder1 cellBig'>".$item['data']['count_events'].'</td>
</tr></tbody>
</table>';