diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index da89f5ab08..933f59d513 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-06-06 Juan Manuel Ramon + + * include/ajax/alert_list.ajax.php: Added new callback function + for jQuery requests. + * godmode/menu.php: Added alert events entry. + 2011-06-03 Juan Manuel Ramon * include/functions_tags.php: Some modifications in update tag function. diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 84cf147e17..7cf05cb88b 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -89,6 +89,7 @@ if (check_acl ($config['id_user'], 0, "LM")) { $sub["godmode/alerts/alert_commands"]["text"] = __('Commands'); } $sub["godmode/alerts/alert_compounds"]["text"] = __('Correlation'); + enterprise_hook('eventalerts_submenu'); $menu["galertas"]["sub"] = $sub; } diff --git a/pandora_console/include/ajax/alert_list.ajax.php b/pandora_console/include/ajax/alert_list.ajax.php index 574f9a1abf..5e1bceed34 100644 --- a/pandora_console/include/ajax/alert_list.ajax.php +++ b/pandora_console/include/ajax/alert_list.ajax.php @@ -31,6 +31,7 @@ $isFunctionPolicies = enterprise_include ('include/functions_policies.php'); $get_agent_alerts_simple = (bool) get_parameter ('get_agent_alerts_simple'); $disable_alert = (bool) get_parameter ('disable_alert'); $enable_alert = (bool) get_parameter ('enable_alert'); +$get_actions_module = (bool) get_parameter ('get_actions_module'); if ($get_agent_alerts_simple) { $id_agent = (int) get_parameter ('id_agent'); @@ -91,5 +92,17 @@ if ($disable_alert) { echo __('Could not be disabled'); return; } + +if ($get_actions_module) { + $id_module = get_parameter ('id_module'); + + if (empty($id_module)) + return false; + + $alerts_modules = alerts_get_alerts_module_name ($id_module); + + echo json_encode ($alerts_modules); + return; +} return; ?> \ No newline at end of file