diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index dead233e61..e3d85b0dc6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,54 @@ +2011-04-15 Juan Manuel Ramon + + * include/db/oracle.php + include/functions_modules.php + include/functions_reporting.php + include/functions_networkmap.php + include/ajax/agent.php + include/ajax/alert_list.ajax.php + include/functions_ui.php + include/functions_agents.php + include/functions_db.php + include/functions_alerts.php + extensions/agents_modules.php + extensions/resource_registration.php + extensions/module_groups.php + operation/agentes/alerts_status.php + operation/agentes/estado_generalagente.php + operation/agentes/estado_agente.php + operation/agentes/alerts_status.functions.php + operation/agentes/exportdata.php + operation/events/events.php + operation/search_alerts.php + mobile/operation/agents/view_agents.php + mobile/operation/agents/view_alerts.php + general/ui/agents_list.php + godmode/agentes/configurar_agente.php + godmode/agentes/agent_manager.php + godmode/alerts/alert_list.list.php + godmode/alerts/configure_alert_compound.php + godmode/alerts/alert_compounds.php + godmode/alerts/alert_list.php + godmode/alerts/configure_alert_template.php + godmode/alerts/alert_templates.php + godmode/alerts/configure_alert_action.php + godmode/alerts/configure_alert_command.php + godmode/alerts/alert_actions.php + godmode/alerts/alert_list.builder.php + godmode/alerts/alert_commands.php + godmode/snmpconsole/snmp_alert.php + godmode/massive/massive_add_alerts.php + godmode/massive/massive_copy_modules.php + godmode/massive/massive_enable_disable_alerts.php + godmode/massive/massive_delete_action_alerts.php + godmode/massive/massive_delete_alerts.php + godmode/massive/massive_standby_alerts.php + godmode/massive/massive_add_action_alerts.php + godmode/reporting/graph_builder.main.php + godmode/reporting/graph_builder.php + godmode/reporting/graph_builder.preview.php: Functions of functions_agents.php + and function_alerts.php have the "agent_" and "alert_" prefix respectively. + 2011-04-14 Sergio Martin * include/graphs/functions_pchart.php diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index f7cef6d74d..5d54d91564 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -150,7 +150,7 @@ function mainAgentsModules() { $filter_groups['id_grupo'] = $group_id; } - $agents = get_agents ($filter_groups); + $agents = agents_get_agents ($filter_groups); $nagents = count($agents); if($all_modules == false || $agents == false) { @@ -188,7 +188,7 @@ function mainAgentsModules() { $filter_agents = array('id_grupo' => $group_id); } // Prepare pagination - ui_pagination ((int)count(get_agents ($filter_agents))); + ui_pagination ((int)count(agents_get_agents ($filter_agents))); echo "
"; foreach ($agents as $agent) { diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index b9389c5305..a9d827489d 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -29,7 +29,7 @@ if (is_ajax ()) { if ($get_info_alert_module_group) { $agents = get_group_agents($id_agent_group); if (!empty($agents)) { - $alerts = get_agent_alerts_simple($agents); + $alerts = agents_get_alerts_simple($agents); foreach ($alerts as $alert) { $module = get_db_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module'])); @@ -159,7 +159,7 @@ function mainModuleGroups() { $agents = get_group_agents($idAgentGroup); if (!empty($agents)) { - $alerts = get_agent_alerts_simple($agents); + $alerts = agents_get_alerts_simple($agents); foreach ($alerts as $alert) { $module = get_db_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module'])); diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index d98922371b..cabb3dc5a6 100644 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -120,7 +120,7 @@ function process_upload_xml_report($xml, $group_filter = 0) { $agents_item= array(); if (isset($item['agent'])) { - $agents = get_agents(array('id_grupo' => $group_filter), array('id_agente', 'nombre')); + $agents = agents_get_agents(array('id_grupo' => $group_filter), array('id_agente', 'nombre')); $agent_clean = str_replace(array('[', ']'), '', $item['agent']); $regular_expresion = ($agent_clean != $item['agent']); @@ -205,7 +205,7 @@ function process_upload_xml_report($xml, $group_filter = 0) { } foreach ($item['sla'] as $sla_xml) { if (isset($sla_xml->agent)) { - $agents = get_agents(array('id_grupo' => $group_filter), array('id_agente', 'nombre')); + $agents = agents_get_agents(array('id_grupo' => $group_filter), array('id_agente', 'nombre')); $agent_clean = str_replace(array('[', ']'), '', $sla_xml->agent); $regular_expresion = ($agent_clean != $sla_xml->agent); @@ -440,7 +440,7 @@ function process_upload_xml_visualmap($xml, $filter_group = 0) { $agent_clean = str_replace(array('[', ']'), '', $item->agent); $regular_expresion = ($agent_clean != $item->agent); - $agents = get_agents(array('id_grupo' => $filter_group), array('id_agente', 'nombre')); + $agents = agents_get_agents(array('id_grupo' => $filter_group), array('id_agente', 'nombre')); if ($agents === false) $agents = array(); $temp = array(); foreach ($agents as $agent) { diff --git a/pandora_console/general/ui/agents_list.php b/pandora_console/general/ui/agents_list.php index 836cd6137e..dee9cc88d6 100644 --- a/pandora_console/general/ui/agents_list.php +++ b/pandora_console/general/ui/agents_list.php @@ -103,14 +103,14 @@ if ($search_string != '') { $filter[] = '(nombre LIKE "%'.$search_string.'%" OR comentarios LIKE "%'.$search_string.'%" OR direccion LIKE "%'.$search_string.'%")'; } -$total_agents = get_agents ($filter, array ('COUNT(*) AS total'), $access); +$total_agents = agents_get_agents ($filter, array ('COUNT(*) AS total'), $access); if ($total_agents !== false) $total_agents = $total_agents[0]['total']; else $total_agents = 0; $filter['limit'] = $config['block_size']; $filter['offset'] = (int) get_parameter ('offset'); -$agents = get_agents ($filter, $fields, $access); +$agents = agents_get_agents ($filter, $fields, $access); unset ($filter['limit']); unset ($filter['offset']); diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 03848dd683..eabed38a28 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -26,7 +26,7 @@ if (is_ajax ()) { $filter[] = '(nombre COLLATE utf8_general_ci LIKE "%'.$string.'%" OR direccion LIKE "%'.$string.'%" OR comentarios LIKE "%'.$string.'%")'; $filter[] = 'id_agente != '.$id_agent; - $agents = get_agents ($filter, array ('nombre', 'direccion')); + $agents = agents_get_agents ($filter, array ('nombre', 'direccion')); if ($agents === false) return; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 66301c4808..e803156bb8 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -804,7 +804,7 @@ if ($delete_module) { // DELETE agent module ! if ($result === false) $error++; - if (delete_alert_agent_module($id_borrar_modulo) === false) + if (alerts_delete_alert_agent_module($id_borrar_modulo) === false) $error++; diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index e3fb826fbc..3e92b53576 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -31,8 +31,8 @@ if (is_ajax ()) { $get_alert_action = (bool) get_parameter ('get_alert_action'); if ($get_alert_action) { $id = (int) get_parameter ('id'); - $action = get_alert_action ($id); - $action['command'] = get_alert_action_alert_command ($action['id']); + $action = alerts_get_alert_action ($id); + $action['command'] = alerts_get_alert_action_alert_command ($action['id']); echo json_encode ($action); } @@ -51,7 +51,7 @@ if ((!$copy_action) && (!$delete_action)) if ($copy_action) { $id = get_parameter ('id'); - $al_action = get_alert_action ($id); + $al_action = alerts_get_alert_action ($id); if ($al_action !== false){ // If user tries to copy an action with group=ALL @@ -89,7 +89,7 @@ if ($copy_action) { ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true); - $result = clone_alert_action ($id); + $result = alerts_clone_alert_action ($id); if ($result) { pandora_audit("Command management", "Duplicate alert action " . $id . " clone to " . $result); @@ -112,7 +112,7 @@ if ($create_action) { $group = (string) get_parameter ('group'); $action_threshold = (int) get_parameter ('action_threshold'); - $result = create_alert_action ($name, $id_alert_command, + $result = alerts_create_alert_action ($name, $id_alert_command, array ('field1' => $field1, 'field2' => $field2, 'field3' => $field3, @@ -138,7 +138,7 @@ if ($create_action) { if ($update_action) { $id = (string) get_parameter ('id'); - $al_action = get_alert_action ($id); + $al_action = alerts_get_alert_action ($id); if ($al_action !== false){ if ($al_action['id_group'] == 0){ @@ -173,7 +173,7 @@ if ($update_action) { $values['id_group'] = $group; $values['action_threshold'] = $action_threshold; - $result = update_alert_action ($id, $values); + $result = alerts_update_alert_action ($id, $values); $info = 'Name: ' . $name . ' ID alert Command: ' . $id_alert_command . ' Field1: ' . $field1 . ' Field2: ' . $field2 . ' Field3: ' . $field3 . ' Group: ' . $group . @@ -194,7 +194,7 @@ if ($update_action) { if ($delete_action) { $id = get_parameter ('id'); - $al_action = get_alert_action ($id); + $al_action = alerts_get_alert_action ($id); if ($al_action !== false){ // If user tries to delete an action with group=ALL @@ -234,7 +234,7 @@ if ($delete_action) { ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "", true); - $result = delete_alert_action ($id); + $result = alerts_delete_alert_action ($id); if ($result) { pandora_audit("Command management", "Delete alert action " . $id); diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 2a4d99a135..2cefc2f97e 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -32,7 +32,7 @@ if (is_ajax ()) { $get_alert_command = (bool) get_parameter ('get_alert_command'); if ($get_alert_command) { $id = (int) get_parameter ('id'); - $command = get_alert_command ($id); + $command = alerts_get_alert_command ($id); echo json_encode ($command); } return; @@ -50,7 +50,7 @@ if ($create_command) { $command = (string) get_parameter ('command'); $description = (string) get_parameter ('description'); - $result = create_alert_command ($name, $command, + $result = alerts_create_alert_command ($name, $command, array ('description' => $description)); $info = 'Name: ' . $name . ' Command: ' . $command . ' Description: ' . $description; @@ -69,7 +69,7 @@ if ($create_command) { if ($update_command) { $id = (int) get_parameter ('id'); - $alert = get_alert_command ($id); + $alert = alerts_get_alert_command ($id); if ($alert['internal']) { pandora_audit("ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); @@ -83,7 +83,7 @@ if ($update_command) { $values['name'] = $name; $values['command'] = $command; $values['description'] = $description; - $result = update_alert_command ($id, $values); + $result = alerts_update_alert_command ($id, $values); $info = 'Name: ' . $name . ' Command: ' . $command . ' Description: ' . $description; if ($result) { @@ -102,14 +102,14 @@ if ($delete_command) { $id = (int) get_parameter ('id'); // Internal commands cannot be deleted - if (get_alert_command_internal ($id)) { + if (alerts_get_alert_command_internal ($id)) { pandora_audit("ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); return; } - $result = delete_alert_command ($id); + $result = alerts_delete_alert_command ($id); if ($result) { pandora_audit("Command management", "Delete alert command " . $id); diff --git a/pandora_console/godmode/alerts/alert_compounds.php b/pandora_console/godmode/alerts/alert_compounds.php index 9b862b58fe..6d3a0bedd8 100644 --- a/pandora_console/godmode/alerts/alert_compounds.php +++ b/pandora_console/godmode/alerts/alert_compounds.php @@ -57,7 +57,7 @@ if ($update_compound) { $field2_recovery = (string) get_parameter ('field2_recovery'); $field3_recovery = (string) get_parameter ('field3_recovery'); - $result = update_alert_compound ($id, + $result = alerts_update_alert_compound ($id, array ('recovery_notify' => $recovery_notify, 'field2_recovery' => $field2_recovery, 'field3_recovery' => $field3_recovery)); @@ -69,7 +69,7 @@ if ($update_compound) { if ($delete_alert) { $id = (int) get_parameter ('id'); - $result = delete_alert_compound ($id); + $result = alerts_delete_alert_compound ($id); ui_print_result_message ($result, __('Successfully deleted'), __('Could not be deleted')); @@ -79,7 +79,7 @@ if ($delete_alert) { if ($enable_alert) { $id = (int) get_parameter ('id'); - $result = set_alerts_compound_disable ($id, false); + $result = alerts_set_alerts_compound_disable ($id, false); ui_print_result_message ($result, __('Successfully enabled'), __('Could not be enabled')); @@ -89,7 +89,7 @@ if ($enable_alert) { if ($disable_alert) { $id = (int) get_parameter ('id'); - $result = set_alerts_compound_disable ($id, true); + $result = alerts_set_alerts_compound_disable ($id, true); ui_print_result_message ($result, __('Successfully disabled'), __('Could not be disabled')); @@ -209,7 +209,7 @@ if ($id_alerts === false) $id_alerts = array (); foreach ($id_alerts as $alert) { - $alert = get_alert_compound ($alert['id']); + $alert = alerts_get_alert_compound ($alert['id']); if ($alert === false) continue; diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 63b62da41f..2b890dfb4f 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -66,12 +66,12 @@ $table->data[1][0] = __('Template'); $table->data[1][0] = __('Template'); $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $templates = get_alert_templates (false, array ('id', 'name')); + $templates = alerts_get_alert_templates (false, array ('id', 'name')); else{ $usr_groups = get_user_groups($config['id_user'], 'LW', true); $filter_groups = ''; $filter_groups = implode(',', array_keys($usr_groups)); - $templates = get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name')); + $templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name')); } $table->data[1][1] = print_select (index_array ($templates, 'id', 'name'), diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 894f615a7d..dc57d885a4 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -42,7 +42,7 @@ $form_filter .= "\n"; $form_filter .= "".__('Template name').""; $form_filter .= print_input_text ('template_name', $templateName, '', 12, 255, true); $form_filter .= "\n"; -$temp = get_agents(); +$temp = agents_get_agents(); $arrayAgents = array(); # Avoid empty arrays, warning messages are UGLY ! @@ -159,7 +159,7 @@ if ($searchFlag) { $where .= " AND talert_template_modules.standby = " . $standby; } -$total = get_agent_alerts_simple (array_keys ($agents), false, +$total = agents_get_alerts_simple (array_keys ($agents), false, false, $where, false, false, false, true); if(empty($total)) $total = 0; @@ -277,7 +277,7 @@ if ($id_agente) { else { ui_pagination ($total, 'index.php?sec=gagente&sec2=godmode/alerts/alert_list'); } -$simple_alerts = get_agent_alerts_simple (array_keys ($agents), false, +$simple_alerts = agents_get_alerts_simple (array_keys ($agents), false, array ('offset' => (int) get_parameter ('offset'), 'limit' => $config['block_size'], 'order' => $order), $where, false); @@ -423,7 +423,7 @@ foreach ($simple_alerts as $alert) { print_image("images/zoom.png", true, array("id" => 'template-details-'.$alert['id_alert_template'], "class" => "img_help")) . ' '; $data[4] .= ""; - $data[4] .= ui_print_truncate_text(get_alert_template_name ($alert['id_alert_template']), 15, false); + $data[4] .= ui_print_truncate_text(alerts_get_alert_template_name ($alert['id_alert_template']), 15, false); $data[4] .= ""; if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { @@ -439,7 +439,7 @@ foreach ($simple_alerts as $alert) { } } - $actions = get_alert_agent_module_actions ($alert['id']); + $actions = alerts_get_alert_agent_module_actions ($alert['id']); $data[6] = ''; if (empty($actions)){ @@ -504,7 +504,7 @@ foreach ($simple_alerts as $alert) { $own_groups = get_user_groups($config['id_user'], 'LW', $own_info['is_admin']); $filter_groups = ''; $filter_groups = implode(',', array_keys($own_groups)); - $actions = get_alert_actions_filter(true, 'id_group IN (' . $filter_groups . ')'); + $actions = alerts_get_alert_actions_filter(true, 'id_group IN (' . $filter_groups . ')'); $data[6] .= print_select ($actions, 'action', '', '', __('None'), 0, true); $data[6] .= '
'; $data[6] .= ''.__('Advanced options').' » '; diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 11ee12e53f..9add7c946c 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -73,7 +73,7 @@ if ($create_alert) { $messageAction = ui_print_result_message (false, '', __('Already added'), '', true); } else { - $id = create_alert_agent_module ($id_agent_module, $id_alert_template); + $id = alerts_create_alert_agent_module ($id_agent_module, $id_alert_template); $alert_template_name = get_db_value ("name", "talert_templates","id", $id_alert_template); $module_name = get_db_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); @@ -99,7 +99,7 @@ if ($create_alert) { $values['fires_max'] = get_parameter ('fires_max'); $values['module_action_threshold'] = (int) get_parameter ('module_action_threshold'); - add_alert_agent_module_action ($id, $action_select, $values); + alerts_add_alert_agent_module_action ($id, $action_select, $values); } } } @@ -115,7 +115,7 @@ if ($delete_alert) { $module_name = get_db_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); $agent_name = get_agent_name (get_db_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); - $result = delete_alert_agent_module ($id_alert_agent_module); + $result = alerts_delete_alert_agent_module ($id_alert_agent_module); if ($result) { pandora_audit("Alert management", @@ -141,7 +141,7 @@ if ($add_action) { $values['fires_max'] = $fires_max; $values['module_action_threshold'] = (int) get_parameter ('module_action_threshold'); - $result = add_alert_agent_module_action ($id_alert_module, $id_action, $values); + $result = alerts_add_alert_agent_module_action ($id_alert_module, $id_action, $values); if ($result) { pandora_audit("Alert management", 'Add action ' . $id_action . ' in alert ' . $id_alert_module); @@ -157,7 +157,7 @@ if ($delete_action) { $id_action = (int) get_parameter ('id_action'); $id_alert = (int) get_parameter ('id_alert'); - $result = delete_alert_agent_module_action ($id_action); + $result = alerts_delete_alert_agent_module_action ($id_action); if ($result) { pandora_audit("Alert management", 'Delete action ' . $id_action . ' in alert ' . $id_alert); @@ -172,7 +172,7 @@ if ($delete_action) { if ($enable_alert) { $id_alert = (int) get_parameter ('id_alert'); - $result = set_alerts_agent_module_disable ($id_alert, false); + $result = alerts_agent_module_disable ($id_alert, false); if ($result) { pandora_audit("Alert management", 'Enable ' . $id_alert); @@ -187,7 +187,7 @@ if ($enable_alert) { if ($disable_alert) { $id_alert = (int) get_parameter ('id_alert'); - $result = set_alerts_agent_module_disable ($id_alert, true); + $result = alerts_agent_module_disable ($id_alert, true); if ($result) { pandora_audit("Alert management", 'Disable ' . $id_alert); @@ -202,7 +202,7 @@ if ($disable_alert) { if ($standbyon_alert) { $id_alert = (int) get_parameter ('id_alert'); - $result = set_alerts_agent_module_standby ($id_alert, true); + $result = alerts_agent_module_standby ($id_alert, true); if ($result) { pandora_audit("Alert management", 'Standby ' . $id_alert); @@ -217,7 +217,7 @@ if ($standbyon_alert) { if ($standbyoff_alert) { $id_alert = (int) get_parameter ('id_alert'); - $result = set_alerts_agent_module_standby ($id_alert, false); + $result = alerts_agent_module_standby ($id_alert, false); if ($result) { pandora_audit("Alert management", 'Standbyoff ' . $id_alert); diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index a9ce5cbb80..d6a1d341e7 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -25,13 +25,13 @@ if (is_ajax ()) { if ($get_template_tooltip) { $id_template = (int) get_parameter ('id_template'); - $template = get_alert_template ($id_template); + $template = alerts_get_alert_template ($id_template); if ($template === false) return; echo '

'.$template['name'].'

'; echo ''.__('Type').': '; - echo get_alert_templates_type_name ($template['type']); + echo alerts_get_alert_templates_type_name ($template['type']); echo '
'; echo ui_print_alert_template_example ($template['id'], true); @@ -121,7 +121,7 @@ if ($update_template) { $field2_recovery = (string) get_parameter ('field2_recovery'); $field3_recovery = (string) get_parameter ('field3_recovery'); - $result = update_alert_template ($id, + $result = alerts_update_alert_template ($id, array ('recovery_notify' => $recovery_notify, 'field2_recovery' => $field2_recovery, 'field3_recovery' => $field3_recovery)); @@ -134,7 +134,7 @@ if ($update_template) { // If user tries to delete a template with group=ALL then must have "PM" access privileges if ($delete_template) { $id = get_parameter ('id'); - $al_template = get_alert_template($id); + $al_template = alerts_get_alert_template($id); if ($al_template !== false){ // If user tries to delete a template with group=ALL then must have "PM" access privileges @@ -170,7 +170,7 @@ if ($delete_template) { // Header ui_print_page_header (__('Alerts')." » ". __('Alert templates'), "images/god2.png", false, "", true); - $result = delete_alert_template ($id); + $result = alerts_delete_alert_template ($id); if ($result) { pandora_audit("Template alert management", "Delete alert template " . $id); @@ -197,7 +197,7 @@ $table->style[0] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold'; $table->data[0][0] = __('Type'); -$table->data[0][1] = print_select (get_alert_templates_types (), 'search_type', +$table->data[0][1] = print_select (alerts_get_alert_templates_types (), 'search_type', $search_type, '', __('All'), '', true, false, false); $table->data[0][2] = __('Search'); $table->data[0][3] = print_input_text ('search_string', $search_string, '', 25, @@ -218,11 +218,11 @@ if ($search_type != '') $filter['type'] = $search_type; if ($search_string) $filter[] = '(name LIKE "%'.$search_string.'%" OR description LIKE "%'.$search_string.'%" OR value LIKE "%'.$search_string.'%")'; -$total_templates = get_alert_templates ($filter, array ('COUNT(*) AS total')); +$total_templates = alerts_get_alert_templates ($filter, array ('COUNT(*) AS total')); $total_templates = $total_templates[0]['total']; $filter['offset'] = (int) get_parameter ('offset'); $filter['limit'] = (int) $config['block_size']; -$templates = get_alert_templates ($filter, +$templates = alerts_get_alert_templates ($filter, array ('id', 'name', 'description', 'type', 'id_group')); if ($templates === false) $templates = array (); @@ -258,7 +258,7 @@ foreach ($templates as $template) { $template['name'].''; $data[1] = ui_print_group_icon ($template["id_group"], true) .' '. ui_print_truncate_text(get_group_name ($template['id_group'], true)); - $data[3] = get_alert_templates_type_name ($template['type']); + $data[3] = alerts_get_alert_templates_type_name ($template['type']); $data[4] = '
'; $data[4] .= print_input_hidden ('duplicate_template', 1, true); diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index b5cb36ff21..2a70c0b3ef 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -29,7 +29,7 @@ if (! check_acl ($config['id_user'], 0, "LM")) { $id = (int) get_parameter ('id'); -$al_action = get_alert_action ($id); +$al_action = alerts_get_alert_action ($id); if ($al_action !== false){ // If user tries to edit an action with group=ALL @@ -75,7 +75,7 @@ $group = 0; //All group is 0 $action_threshold = 0; //All group is 0 if ($id) { - $action = get_alert_action ($id); + $action = alerts_get_alert_action ($id); $name = $action['name']; $id_command = $action['id_alert_command']; $field1 = $action['field1']; @@ -151,7 +151,7 @@ ui_require_javascript_file ('pandora_alerts');