fix group alert report
This commit is contained in:
parent
495decdf5f
commit
742cbcb5c5
|
@ -2871,17 +2871,8 @@ function alerts_get_agent_modules(
|
||||||
);
|
);
|
||||||
$agent_modules = db_get_all_rows_sql($sql);
|
$agent_modules = db_get_all_rows_sql($sql);
|
||||||
} else {
|
} else {
|
||||||
$groups = groups_get_children($id_grupo, true);
|
$groups = groups_get_children_ids($id_grupo, true);
|
||||||
if (empty($groups) === false) {
|
if (count($groups) > 1) {
|
||||||
$groups = array_reduce(
|
|
||||||
$groups,
|
|
||||||
function ($carry, $item) {
|
|
||||||
$carry[] = $item['id_grupo'];
|
|
||||||
return $carry;
|
|
||||||
},
|
|
||||||
[$id_grupo]
|
|
||||||
);
|
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT distinct(atm.id_agent_module)
|
'SELECT distinct(atm.id_agent_module)
|
||||||
FROM talert_template_modules atm
|
FROM talert_template_modules atm
|
||||||
|
|
Loading…
Reference in New Issue