diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5ed8b6065f..ac0263a979 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-08-09 Juan Manuel Ramon + + * extensions/module_groups.php: Add tooltip message when a module group + doesn't have alerts or are not fired. + + Fixes: #3388455 + 2011-08-09 Miguel de Dios * DEBIAN/control: fixed the name of package and update version number. diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 0c81678746..12de4e8a31 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -25,17 +25,17 @@ if (is_ajax ()) { $get_info_alert_module_group = (bool)get_parameter('get_info_alert_module_group'); $module_group = (int)get_parameter('module_group'); $id_agent_group = (int)get_parameter('id_agent_group'); - + + $data = false; if ($get_info_alert_module_group) { $agents = agents_get_group_agents($id_agent_group); - if (!empty($agents)) { - $alerts = agents_get_alerts_simple($agents); - + if (!empty($agents)) { + $alerts = agents_get_alerts_simple($agents); foreach ($alerts as $alert) { $module = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module'])); - if ($module_group == $module['id_module_group']) { if ($alert["times_fired"] > 0) { + $data = true; echo '' . __('Number fired of alerts').': ' . $alert["times_fired"] . '
'; $agent = db_get_row('tagente', 'id_agente', $module['id_agente']); echo '' . __('Agent').': '; @@ -45,7 +45,6 @@ if (is_ajax ()) { $template = db_get_row('talert_templates', 'id' , $alert['id_alert_template']); echo '' . __('Alert template') . ': '; echo io_safe_output($template['name']) . '
'; - $sql = 'SELECT * FROM talert_template_module_actions AS t1 INNER JOIN talert_actions AS t2 ON t1.id_alert_action = t2.id @@ -69,7 +68,16 @@ if (is_ajax ()) { } } } + if(!$data){ + echo 'These module/s have no alerts or alert/s are not fired'; + } } + else{ + echo 'No available data'; + } + } + else{ + echo 'No available data'; } }