Fixed bug in alert details

This commit is contained in:
manuel.montes 2018-10-24 10:25:45 +02:00
parent 7a64bb4855
commit ca75cff3f7
1 changed files with 3 additions and 3 deletions

View File

@ -1845,9 +1845,9 @@ function get_group_alerts($id_group, $filter = '', $options = false,
}
}
$selectText = 'talert_template_modules.*, t2.nombre AS agent_module_name, t3.alias AS agent_name, t4.name AS template_name';
$selectText = 'DISTINCT talert_template_modules.*, t2.nombre AS agent_module_name, t3.alias AS agent_name, t4.name AS template_name';
if ($count !== false) {
$selectText = 'COUNT(talert_template_modules.id) AS count';
$selectText = 'COUNT(DISTINCT talert_template_modules.id) AS count';
}
$sql = sprintf ("SELECT %s
@ -1871,7 +1871,7 @@ function get_group_alerts($id_group, $filter = '', $options = false,
return $alerts[0]['count'];
}
else {
return $alerts;
return $alerts;
}
}