2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:21:21 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2011-08-13 04:40:47 +02:00
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
2009-06-08 20:21:21 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2006-07-11 10:49:21 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-08-22 20:07:32 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-11 10:49:21 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2006-07-11 10:49:21 +02:00
|
|
|
// Load global vars
|
|
|
|
|
2011-02-27 Miguel de Dios <miguel.dedios@artica.es>
* extensions/users_connected.php: fixed the double negation in the
check_acl.
* include/functions_events.php, include/functions_modules.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
include/fgraph.php, include/functions.php, include/functions_db.php,
include/functions_alerts.php, include/functions_reports.php,
extensions/insert_data.php, extensions/system_info.php,
extensions/pandora_logs.php, extensions/agents_modules.php,
extensions/dbmanager.php, extensions/resource_registration.php,
extensions/update_manager/settings.php, extensions/update_manager/main.php,
extensions/plugin_registration.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php, operation/extensions.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/agentes/status_monitor.php,
operation/agentes/export_csv.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/datos_agente.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/custom_fields.php, operation/agentes/estado_agente.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php,
operation/agentes/graphs.php, operation/agentes/agent_fields.php,
operation/agentes/group_view.php, operation/agentes/networkmap.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
operation/menu.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php, operation/events/event_statistics.php,
operation/events/export_csv.php, operation/events/sound_events.php,
operation/events/events_validate.php, operation/events/events_list.php,
operation/events/events_marquee.php, operation/events/events.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php, mobile/index.php,
general/ui/agents_list.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php,
godmode/groups/group_list.php, godmode/admin_access_logs.php,
godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php,
godmode/db/db_event.php, godmode/db/db_purge.php,
godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php, godmode/servers/recon_script.php,
godmode/servers/plugin.php, godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php, godmode/menu.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/snmpconsole/snmp_filters.php, godmode/setup/file_manager.php,
godmode/setup/os.list.php, godmode/setup/news.php,
godmode/setup/gis_step_2.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/setup/os.php,
godmode/setup/performance.php, godmode/setup/setup_auth.php,
godmode/setup/gis.php, godmode/setup/os.builder.php,
godmode/setup/setup_visuals.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/users/configure_profile.php,
godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php,
godmode/massive/massive_add_alerts.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_delete_agents.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.preview.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/graph_builder.php,
godmode/reporting/visual_console_builder.preview.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/graph_builder.preview.php: replaced obsolete "give_acl" to
"check_acl" and erased the "give_acl".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4025 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-28 13:02:08 +01:00
|
|
|
if (! check_acl ($config['id_user'], 0, "LW")) {
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.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/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
db_pandora_audit("ACL Violation",
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
"Trying to access SNMP Alert Management");
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
require ("general/noaccess.php");
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
return;
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
}
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$trap_types = array(
|
|
|
|
SNMP_TRAP_TYPE_NONE => __('None'),
|
|
|
|
SNMP_TRAP_TYPE_COLD_START => __('Cold start (0)'),
|
|
|
|
SNMP_TRAP_TYPE_WARM_START => __('Warm start (1)'),
|
|
|
|
SNMP_TRAP_TYPE_LINK_DOWN => __('Link down (2)'),
|
|
|
|
SNMP_TRAP_TYPE_LINK_UP => __('Link up (3)'),
|
|
|
|
SNMP_TRAP_TYPE_AUTHENTICATION_FAILURE => __('Authentication failure (4)'),
|
|
|
|
SNMP_TRAP_TYPE_OTHER => __('Other'));
|
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
// Form submitted
|
|
|
|
// =============
|
2010-02-22 20:03:55 +01:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$update_alert = (bool)get_parameter('update_alert', false);
|
|
|
|
$create_alert = (bool)get_parameter('create_alert', false);
|
|
|
|
$save_alert = (bool)get_parameter('save_alert', false);
|
|
|
|
$modify_alert = (bool)get_parameter('modify_alert', false);
|
|
|
|
$delete_alert = (bool)get_parameter('delete_alert', false);
|
|
|
|
$multiple_delete = (bool)get_parameter('multiple_delete', false);
|
2015-07-14 14:07:04 +02:00
|
|
|
$add_action = (bool)get_parameter('add_alert', 0);
|
2014-03-31 17:00:16 +02:00
|
|
|
$delete_action = get_parameter('delete_action', 0);
|
|
|
|
|
2015-07-14 14:07:04 +02:00
|
|
|
if ($add_action) {
|
2014-03-31 17:00:16 +02:00
|
|
|
$values['id_alert_snmp'] = get_parameter('id_alert_snmp');
|
|
|
|
$values['alert_type'] = get_parameter('alert_type');
|
|
|
|
$values['al_field1'] = get_parameter('field1_value');
|
|
|
|
$values['al_field2'] = get_parameter('field2_value');
|
|
|
|
$values['al_field3'] = get_parameter('field3_value');
|
|
|
|
$values['al_field4'] = get_parameter('field4_value');
|
|
|
|
$values['al_field5'] = get_parameter('field5_value');
|
|
|
|
$values['al_field6'] = get_parameter('field6_value');
|
|
|
|
$values['al_field7'] = get_parameter('field7_value');
|
|
|
|
$values['al_field8'] = get_parameter('field8_value');
|
|
|
|
$values['al_field9'] = get_parameter('field9_value');
|
|
|
|
$values['al_field10'] = get_parameter('field10_value');
|
2015-07-14 14:07:04 +02:00
|
|
|
|
2014-03-31 17:00:16 +02:00
|
|
|
$result = db_process_sql_insert('talert_snmp_action', $values);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($delete_action) {
|
2015-07-14 14:07:04 +02:00
|
|
|
|
2014-03-31 17:00:16 +02:00
|
|
|
$action_id = get_parameter('action_id');
|
|
|
|
|
|
|
|
$result = db_process_sql_delete('talert_snmp_action', array('id'=>$action_id));
|
|
|
|
}
|
2013-08-05 16:23:27 +02:00
|
|
|
|
|
|
|
if ($update_alert || $modify_alert) {
|
|
|
|
ui_print_page_header(__('SNMP Console')." » ".__('Update alert'),
|
2013-04-10 09:57:54 +02:00
|
|
|
"images/op_snmp.png", false, "snmp_alert", false);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
2013-08-05 16:23:27 +02:00
|
|
|
else if ($create_alert || $save_alert) {
|
|
|
|
ui_print_page_header(__('SNMP Console')." » ".__('Create alert'),
|
2013-04-10 09:57:54 +02:00
|
|
|
"images/op_snmp.png", false, "snmp_alert", false);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
2013-08-05 16:23:27 +02:00
|
|
|
else {
|
|
|
|
ui_print_page_header(__('SNMP Console')." » ".__('Alert overview'),
|
2013-04-10 09:57:54 +02:00
|
|
|
"images/op_snmp.png", false, "snmp_alert", false);
|
2013-08-05 16:23:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($save_alert || $modify_alert) {
|
|
|
|
$id_as = (int) get_parameter("id_alert_snmp", -1);
|
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
$source_ip = (string) get_parameter_post ("source_ip");
|
|
|
|
$alert_type = (int) get_parameter_post ("alert_type"); //Event, e-mail
|
|
|
|
$description = (string) get_parameter_post ("description");
|
|
|
|
$oid = (string) get_parameter_post ("oid");
|
|
|
|
$custom_value = (string) get_parameter_post ("custom_value");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
$time_threshold = (int) get_parameter_post ("time_threshold", SECONDS_5MINUTES);
|
2008-10-15 20:40:34 +02:00
|
|
|
$time_other = (int) get_parameter_post ("time_other", -1);
|
2013-03-05 15:57:35 +01:00
|
|
|
$al_field1 = (string) get_parameter_post ("field1_value");
|
|
|
|
$al_field2 = (string) get_parameter_post ("field2_value");
|
|
|
|
$al_field3 = (string) get_parameter_post ("field3_value");
|
|
|
|
$al_field4 = (string) get_parameter_post ("field4_value");
|
|
|
|
$al_field5 = (string) get_parameter_post ("field5_value");
|
|
|
|
$al_field6 = (string) get_parameter_post ("field6_value");
|
|
|
|
$al_field7 = (string) get_parameter_post ("field7_value");
|
|
|
|
$al_field8 = (string) get_parameter_post ("field8_value");
|
|
|
|
$al_field9 = (string) get_parameter_post ("field9_value");
|
|
|
|
$al_field10 = (string) get_parameter_post ("al_field10");
|
2008-10-15 20:40:34 +02:00
|
|
|
$max_alerts = (int) get_parameter_post ("max_alerts", 1);
|
2008-10-16 20:06:31 +02:00
|
|
|
$min_alerts = (int) get_parameter_post ("min_alerts", 0);
|
2008-10-15 20:40:34 +02:00
|
|
|
$priority = (int) get_parameter_post ("priority", 0);
|
2015-06-08 13:13:09 +02:00
|
|
|
$custom_oid_data_1 = (string) get_parameter ("custom_oid_data_1");
|
|
|
|
$custom_oid_data_2 = (string) get_parameter ("custom_oid_data_2");
|
|
|
|
$custom_oid_data_3 = (string) get_parameter ("custom_oid_data_3");
|
|
|
|
$custom_oid_data_4 = (string) get_parameter ("custom_oid_data_4");
|
|
|
|
$custom_oid_data_5 = (string) get_parameter ("custom_oid_data_5");
|
2012-02-02 13:00:30 +01:00
|
|
|
$custom_oid_data_6 = (string) get_parameter ("custom_oid_data_6");
|
2013-07-10 18:49:05 +02:00
|
|
|
$custom_oid_data_7 = (string) get_parameter ("custom_oid_data_7");
|
|
|
|
$custom_oid_data_8 = (string) get_parameter ("custom_oid_data_8");
|
|
|
|
$custom_oid_data_9 = (string) get_parameter ("custom_oid_data_9");
|
|
|
|
$custom_oid_data_10 = (string) get_parameter ("custom_oid_data_10");
|
2014-03-19 12:29:56 +01:00
|
|
|
$custom_oid_data_11 = (string) get_parameter ("custom_oid_data_11");
|
|
|
|
$custom_oid_data_12 = (string) get_parameter ("custom_oid_data_12");
|
|
|
|
$custom_oid_data_13 = (string) get_parameter ("custom_oid_data_13");
|
|
|
|
$custom_oid_data_14 = (string) get_parameter ("custom_oid_data_14");
|
|
|
|
$custom_oid_data_15 = (string) get_parameter ("custom_oid_data_15");
|
|
|
|
$custom_oid_data_16 = (string) get_parameter ("custom_oid_data_16");
|
|
|
|
$custom_oid_data_17 = (string) get_parameter ("custom_oid_data_17");
|
|
|
|
$custom_oid_data_18 = (string) get_parameter ("custom_oid_data_18");
|
|
|
|
$custom_oid_data_19 = (string) get_parameter ("custom_oid_data_19");
|
|
|
|
$custom_oid_data_20 = (string) get_parameter ("custom_oid_data_20");
|
2014-03-27 11:48:19 +01:00
|
|
|
$order_1 = (int) get_parameter ("order_1", 1);
|
|
|
|
$order_2 = (int) get_parameter ("order_2", 2);
|
|
|
|
$order_3 = (int) get_parameter ("order_3", 3);
|
|
|
|
$order_4 = (int) get_parameter ("order_4", 4);
|
|
|
|
$order_5 = (int) get_parameter ("order_5", 5);
|
|
|
|
$order_6 = (int) get_parameter ("order_6", 6);
|
|
|
|
$order_7 = (int) get_parameter ("order_7", 7);
|
|
|
|
$order_8 = (int) get_parameter ("order_8", 8);
|
|
|
|
$order_9 = (int) get_parameter ("order_9", 9);
|
|
|
|
$order_10 = (int) get_parameter ("order_10", 10);
|
|
|
|
$order_11 = (int) get_parameter ("order_11", 11);
|
|
|
|
$order_12 = (int) get_parameter ("order_12", 12);
|
|
|
|
$order_13 = (int) get_parameter ("order_13", 13);
|
|
|
|
$order_14 = (int) get_parameter ("order_14", 14);
|
|
|
|
$order_15 = (int) get_parameter ("order_15", 15);
|
|
|
|
$order_16 = (int) get_parameter ("order_16", 16);
|
|
|
|
$order_17 = (int) get_parameter ("order_17", 17);
|
|
|
|
$order_18 = (int) get_parameter ("order_18", 18);
|
|
|
|
$order_19 = (int) get_parameter ("order_19", 19);
|
|
|
|
$order_20 = (int) get_parameter ("order_20", 20);
|
|
|
|
|
2012-02-02 13:00:30 +01:00
|
|
|
$trap_type = (int) get_parameter ("trap_type", -1);
|
2015-06-08 13:13:09 +02:00
|
|
|
$single_value = (string) get_parameter ("single_value");
|
|
|
|
$position = (int) get_parameter ("position");
|
|
|
|
$group = (int) get_parameter ("group");
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
if ($time_threshold == -1) {
|
|
|
|
$time_threshold = $time_other;
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($save_alert) {
|
2011-03-08 19:11:56 +01:00
|
|
|
$values = array(
|
|
|
|
'id_alert' => $alert_type,
|
|
|
|
'al_field1' => $al_field1,
|
|
|
|
'al_field2' => $al_field2,
|
|
|
|
'al_field3' => $al_field3,
|
2013-03-05 15:57:35 +01:00
|
|
|
'al_field4' => $al_field4,
|
|
|
|
'al_field5' => $al_field5,
|
|
|
|
'al_field6' => $al_field6,
|
|
|
|
'al_field7' => $al_field7,
|
|
|
|
'al_field8' => $al_field8,
|
|
|
|
'al_field9' => $al_field9,
|
|
|
|
'al_field10' => $al_field10,
|
2011-03-08 19:11:56 +01:00
|
|
|
'description' => $description,
|
|
|
|
'agent' => $source_ip,
|
|
|
|
'custom_oid' => $custom_value,
|
|
|
|
'oid' => $oid,
|
|
|
|
'time_threshold' => $time_threshold,
|
|
|
|
'max_alerts' => $max_alerts,
|
|
|
|
'min_alerts' => $min_alerts,
|
2012-02-02 13:00:30 +01:00
|
|
|
'priority' => $priority,
|
|
|
|
'_snmp_f1_' => $custom_oid_data_1,
|
|
|
|
'_snmp_f2_' => $custom_oid_data_2,
|
|
|
|
'_snmp_f3_' => $custom_oid_data_3,
|
|
|
|
'_snmp_f4_' => $custom_oid_data_4,
|
|
|
|
'_snmp_f5_' => $custom_oid_data_5,
|
|
|
|
'_snmp_f6_' => $custom_oid_data_6,
|
2013-07-10 18:49:05 +02:00
|
|
|
'_snmp_f7_' => $custom_oid_data_7,
|
|
|
|
'_snmp_f8_' => $custom_oid_data_8,
|
|
|
|
'_snmp_f9_' => $custom_oid_data_9,
|
|
|
|
'_snmp_f10_' => $custom_oid_data_10,
|
2014-03-19 12:29:56 +01:00
|
|
|
'_snmp_f11_' => $custom_oid_data_11,
|
|
|
|
'_snmp_f12_' => $custom_oid_data_12,
|
|
|
|
'_snmp_f13_' => $custom_oid_data_13,
|
|
|
|
'_snmp_f14_' => $custom_oid_data_14,
|
|
|
|
'_snmp_f15_' => $custom_oid_data_15,
|
|
|
|
'_snmp_f16_' => $custom_oid_data_16,
|
|
|
|
'_snmp_f17_' => $custom_oid_data_17,
|
|
|
|
'_snmp_f18_' => $custom_oid_data_18,
|
|
|
|
'_snmp_f19_' => $custom_oid_data_19,
|
|
|
|
'_snmp_f20_' => $custom_oid_data_20,
|
2014-03-27 11:48:19 +01:00
|
|
|
'order_1' => $order_1,
|
|
|
|
'order_2' => $order_2,
|
|
|
|
'order_3' => $order_3,
|
|
|
|
'order_4' => $order_4,
|
|
|
|
'order_5' => $order_5,
|
|
|
|
'order_6' => $order_6,
|
|
|
|
'order_7' => $order_7,
|
|
|
|
'order_8' => $order_8,
|
|
|
|
'order_9' => $order_9,
|
|
|
|
'order_10' => $order_10,
|
|
|
|
'order_11' => $order_11,
|
|
|
|
'order_12' => $order_12,
|
|
|
|
'order_13' => $order_13,
|
|
|
|
'order_14' => $order_14,
|
|
|
|
'order_15' => $order_15,
|
|
|
|
'order_16' => $order_16,
|
|
|
|
'order_17' => $order_17,
|
|
|
|
'order_18' => $order_18,
|
|
|
|
'order_19' => $order_19,
|
|
|
|
'order_20' => $order_20,
|
2012-02-02 13:00:30 +01:00
|
|
|
'trap_type' => $trap_type,
|
2013-07-17 19:39:27 +02:00
|
|
|
'single_value' => $single_value,
|
2014-03-18 17:08:20 +01:00
|
|
|
'position' => $position,
|
|
|
|
'id_group' => $group);
|
2013-08-05 16:23:27 +02:00
|
|
|
|
|
|
|
$result = db_process_sql_insert('talert_snmp', $values);
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2011-08-01 18:52:26 +02:00
|
|
|
if (!$result) {
|
2012-03-14 18:51:39 +01:00
|
|
|
db_pandora_audit("SNMP management", "Fail try to create snmp alert");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
ui_print_error_message(__('There was a problem creating the alert'));
|
2011-03-08 19:11:56 +01:00
|
|
|
}
|
|
|
|
else {
|
2012-03-14 18:51:39 +01:00
|
|
|
db_pandora_audit("SNMP management", "Create snmp alert #$result");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
ui_print_success_message(__('Successfully created'));
|
2008-10-15 20:40:34 +02:00
|
|
|
}
|
|
|
|
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-08-13 04:40:47 +02:00
|
|
|
$sql = sprintf ("UPDATE talert_snmp SET
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
priority = %d, id_alert = %d, al_field1 = '%s',
|
2013-03-05 15:57:35 +01:00
|
|
|
al_field2 = '%s', al_field3 = '%s', al_field4 = '%s',
|
|
|
|
al_field5 = '%s', al_field6 = '%s',al_field7 = '%s',
|
|
|
|
al_field8 = '%s', al_field9 = '%s',al_field10 = '%s',
|
|
|
|
description = '%s',
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
agent = '%s', custom_oid = '%s', oid = '%s',
|
|
|
|
time_threshold = %d, max_alerts = %d, min_alerts = %d,
|
|
|
|
_snmp_f1_ = '%s', _snmp_f2_ = '%s', _snmp_f3_ = '%s',
|
|
|
|
_snmp_f4_ = '%s', _snmp_f5_ = '%s', _snmp_f6_ = '%s',
|
2013-07-10 18:49:05 +02:00
|
|
|
_snmp_f7_ = '%s', _snmp_f8_ = '%s', _snmp_f9_ = '%s',
|
2014-03-19 12:29:56 +01:00
|
|
|
_snmp_f10_ = '%s', _snmp_f11_ = '%s', _snmp_f12_ = '%s',
|
|
|
|
_snmp_f13_ = '%s', _snmp_f14_ = '%s', _snmp_f15_ = '%s',
|
|
|
|
_snmp_f16_ = '%s', _snmp_f17_ = '%s', _snmp_f18_ = '%s',
|
2014-03-27 11:48:19 +01:00
|
|
|
_snmp_f19_ = '%s', _snmp_f20_ = '%s', order_1 = '%d',
|
|
|
|
order_2 = '%d', order_3 = '%d', order_4 = '%d',
|
|
|
|
order_5 = '%d', order_6 = '%d', order_7 = '%d',
|
|
|
|
order_8 = '%d', order_9 = '%d', order_10 = '%d',
|
|
|
|
order_11 = '%d', order_12 = '%d', order_13 = '%d',
|
|
|
|
order_14 = '%d', order_15 = '%d', order_16 = '%d',
|
|
|
|
order_17 = '%d', order_18 = '%d', order_19 = '%d',
|
|
|
|
order_20 = '%d', trap_type = %d,
|
2014-03-19 12:29:56 +01:00
|
|
|
single_value = '%s', position = '%s', id_group ='%s'
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
WHERE id_as = %d",
|
|
|
|
$priority, $alert_type, $al_field1, $al_field2, $al_field3,
|
2013-03-05 15:57:35 +01:00
|
|
|
$al_field4, $al_field5, $al_field6, $al_field7, $al_field8,
|
|
|
|
$al_field9, $al_field10,
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
$description, $source_ip, $custom_value, $oid, $time_threshold,
|
|
|
|
$max_alerts, $min_alerts, $custom_oid_data_1, $custom_oid_data_2,
|
|
|
|
$custom_oid_data_3, $custom_oid_data_4, $custom_oid_data_5,
|
2013-07-10 18:49:05 +02:00
|
|
|
$custom_oid_data_6, $custom_oid_data_7, $custom_oid_data_8,
|
2014-03-19 12:29:56 +01:00
|
|
|
$custom_oid_data_9, $custom_oid_data_10, $custom_oid_data_11,
|
|
|
|
$custom_oid_data_12, $custom_oid_data_13, $custom_oid_data_14,
|
|
|
|
$custom_oid_data_15, $custom_oid_data_16, $custom_oid_data_17,
|
|
|
|
$custom_oid_data_18, $custom_oid_data_19, $custom_oid_data_20,
|
2014-03-27 11:48:19 +01:00
|
|
|
$order_1, $order_2, $order_3, $order_4, $order_5,
|
|
|
|
$order_6, $order_7, $order_8, $order_9, $order_10,
|
|
|
|
$order_11, $order_12, $order_13, $order_14, $order_15,
|
|
|
|
$order_16, $order_17, $order_18, $order_19, $order_20,
|
2014-03-19 12:29:56 +01:00
|
|
|
$trap_type, $single_value, $position, $group, $id_as);
|
2014-03-20 13:02:07 +01:00
|
|
|
|
2011-08-13 04:40:47 +02:00
|
|
|
$result = db_process_sql ($sql);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2011-08-01 18:52:26 +02:00
|
|
|
if (!$result) {
|
2012-03-14 18:51:39 +01:00
|
|
|
db_pandora_audit("SNMP management", "Fail try to update snmp alert #$id_as");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
ui_print_error_message(__('There was a problem updating the alert'));
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-03-14 18:51:39 +01:00
|
|
|
db_pandora_audit("SNMP management", "Update snmp alert #$id_as");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
ui_print_success_message(__('Successfully updated'));
|
2008-10-15 20:40:34 +02:00
|
|
|
}
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
}
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
2008-10-15 20:40:34 +02:00
|
|
|
|
|
|
|
// From variable init
|
|
|
|
// ==================
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($update_alert) {
|
|
|
|
$id_as = (int) get_parameter("id_alert_snmp", -1);
|
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.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/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$alert = db_get_row ("talert_snmp", "id_as", $id_as);
|
2008-10-15 20:40:34 +02:00
|
|
|
$id_as = $alert["id_as"];
|
|
|
|
$source_ip = $alert["agent"];
|
|
|
|
$alert_type = $alert["id_alert"];
|
|
|
|
$description = $alert["description"];
|
|
|
|
$oid = $alert["oid"];
|
|
|
|
$custom_value = $alert["custom_oid"];
|
|
|
|
$time_threshold = $alert["time_threshold"];
|
|
|
|
$al_field1 = $alert["al_field1"];
|
|
|
|
$al_field2 = $alert["al_field2"];
|
|
|
|
$al_field3 = $alert["al_field3"];
|
2013-03-05 15:57:35 +01:00
|
|
|
$al_field4 = $alert["al_field4"];
|
|
|
|
$al_field5 = $alert["al_field5"];
|
|
|
|
$al_field6 = $alert["al_field6"];
|
|
|
|
$al_field7 = $alert["al_field7"];
|
|
|
|
$al_field8 = $alert["al_field8"];
|
|
|
|
$al_field9 = $alert["al_field9"];
|
|
|
|
$al_field10 = $alert["al_field10"];
|
2008-10-15 20:40:34 +02:00
|
|
|
$max_alerts = $alert["max_alerts"];
|
|
|
|
$min_alerts = $alert["min_alerts"];
|
2013-08-05 16:23:27 +02:00
|
|
|
$priority = $alert["priority"];
|
2012-02-02 13:00:30 +01:00
|
|
|
$custom_oid_data_1 = $alert["_snmp_f1_"];
|
|
|
|
$custom_oid_data_2 = $alert["_snmp_f2_"];
|
|
|
|
$custom_oid_data_3 = $alert["_snmp_f3_"];
|
|
|
|
$custom_oid_data_4 = $alert["_snmp_f4_"];
|
|
|
|
$custom_oid_data_5 = $alert["_snmp_f5_"];
|
|
|
|
$custom_oid_data_6 = $alert["_snmp_f6_"];
|
2013-07-10 18:49:05 +02:00
|
|
|
$custom_oid_data_7 = $alert["_snmp_f7_"];
|
|
|
|
$custom_oid_data_8 = $alert["_snmp_f8_"];
|
|
|
|
$custom_oid_data_9 = $alert["_snmp_f9_"];
|
|
|
|
$custom_oid_data_10 = $alert["_snmp_f10_"];
|
2014-03-19 12:29:56 +01:00
|
|
|
$custom_oid_data_11 = $alert["_snmp_f11_"];
|
|
|
|
$custom_oid_data_12 = $alert["_snmp_f12_"];
|
|
|
|
$custom_oid_data_13 = $alert["_snmp_f13_"];
|
|
|
|
$custom_oid_data_14 = $alert["_snmp_f14_"];
|
|
|
|
$custom_oid_data_15 = $alert["_snmp_f15_"];
|
|
|
|
$custom_oid_data_16 = $alert["_snmp_f16_"];
|
|
|
|
$custom_oid_data_17 = $alert["_snmp_f17_"];
|
|
|
|
$custom_oid_data_18 = $alert["_snmp_f18_"];
|
|
|
|
$custom_oid_data_19 = $alert["_snmp_f19_"];
|
|
|
|
$custom_oid_data_20 = $alert["_snmp_f20_"];
|
2014-03-27 11:48:19 +01:00
|
|
|
$order_1 = $alert["order_1"];
|
|
|
|
$order_2 = $alert["order_2"];
|
|
|
|
$order_3 = $alert["order_3"];
|
|
|
|
$order_4 = $alert["order_4"];
|
|
|
|
$order_5 = $alert["order_5"];
|
|
|
|
$order_6 = $alert["order_6"];
|
|
|
|
$order_7 = $alert["order_7"];
|
|
|
|
$order_8 = $alert["order_8"];
|
|
|
|
$order_9 = $alert["order_9"];
|
|
|
|
$order_10 = $alert["order_10"];
|
|
|
|
$order_11 = $alert["order_11"];
|
|
|
|
$order_12 = $alert["order_12"];
|
|
|
|
$order_13 = $alert["order_13"];
|
|
|
|
$order_14 = $alert["order_14"];
|
|
|
|
$order_15 = $alert["order_15"];
|
|
|
|
$order_16 = $alert["order_16"];
|
|
|
|
$order_17 = $alert["order_17"];
|
|
|
|
$order_18 = $alert["order_18"];
|
|
|
|
$order_19 = $alert["order_19"];
|
|
|
|
$order_20 = $alert["order_20"];
|
2012-02-02 13:00:30 +01:00
|
|
|
$trap_type = $alert["trap_type"];
|
2015-06-08 13:13:09 +02:00
|
|
|
$single_value = $alert["single_value"];
|
2013-07-17 19:39:27 +02:00
|
|
|
$position = $alert["position"];
|
2014-03-18 17:08:20 +01:00
|
|
|
$group = $alert["id_group"];
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
2013-08-05 16:23:27 +02:00
|
|
|
elseif ($create_alert) {
|
2008-10-15 20:40:34 +02:00
|
|
|
// Variable init
|
|
|
|
$id_as = -1;
|
|
|
|
$source_ip = "";
|
|
|
|
$alert_type = 1; //Event, e-mail
|
|
|
|
$description = "";
|
|
|
|
$oid = "";
|
|
|
|
$custom_value = "";
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
$time_threshold = SECONDS_5MINUTES;
|
2008-10-15 20:40:34 +02:00
|
|
|
$al_field1 = "";
|
|
|
|
$al_field2 = "";
|
|
|
|
$al_field3 = "";
|
2013-03-05 15:57:35 +01:00
|
|
|
$al_field4 = "";
|
|
|
|
$al_field5 = "";
|
|
|
|
$al_field6 = "";
|
|
|
|
$al_field7 = "";
|
|
|
|
$al_field8 = "";
|
|
|
|
$al_field9 = "";
|
|
|
|
$al_field10 = "";
|
2008-10-15 20:40:34 +02:00
|
|
|
$max_alerts = 1;
|
2008-10-16 20:06:31 +02:00
|
|
|
$min_alerts = 0;
|
2008-10-15 20:40:34 +02:00
|
|
|
$priority = 0;
|
2012-02-02 13:00:30 +01:00
|
|
|
$custom_oid_data_1 = '';
|
|
|
|
$custom_oid_data_2 = '';
|
|
|
|
$custom_oid_data_3 = '';
|
|
|
|
$custom_oid_data_4 = '';
|
|
|
|
$custom_oid_data_5 = '';
|
|
|
|
$custom_oid_data_6 = '';
|
2013-07-10 18:49:05 +02:00
|
|
|
$custom_oid_data_7 = '';
|
|
|
|
$custom_oid_data_8 = '';
|
|
|
|
$custom_oid_data_9 = '';
|
|
|
|
$custom_oid_data_10 = '';
|
2014-03-19 12:29:56 +01:00
|
|
|
$custom_oid_data_11 = '';
|
|
|
|
$custom_oid_data_12 = '';
|
|
|
|
$custom_oid_data_13 = '';
|
|
|
|
$custom_oid_data_14 = '';
|
|
|
|
$custom_oid_data_15 = '';
|
|
|
|
$custom_oid_data_16 = '';
|
|
|
|
$custom_oid_data_17 = '';
|
|
|
|
$custom_oid_data_18 = '';
|
|
|
|
$custom_oid_data_19 = '';
|
|
|
|
$custom_oid_data_20 = '';
|
2014-03-27 11:48:19 +01:00
|
|
|
$order_1 = 1;
|
|
|
|
$order_2 = 2;
|
|
|
|
$order_3 = 3;
|
|
|
|
$order_4 = 4;
|
|
|
|
$order_5 = 5;
|
|
|
|
$order_6 = 6;
|
|
|
|
$order_7 = 7;
|
|
|
|
$order_8 = 8;
|
|
|
|
$order_9 = 9;
|
|
|
|
$order_10 = 10;
|
|
|
|
$order_11 = 11;
|
|
|
|
$order_12 = 12;
|
|
|
|
$order_13 = 13;
|
|
|
|
$order_14 = 14;
|
|
|
|
$order_15 = 15;
|
|
|
|
$order_16 = 16;
|
|
|
|
$order_17 = 17;
|
|
|
|
$order_18 = 18;
|
|
|
|
$order_19 = 19;
|
|
|
|
$order_20 = 20;
|
2012-02-02 13:00:30 +01:00
|
|
|
$trap_type = -1;
|
|
|
|
$single_value = '';
|
2013-07-17 19:39:27 +02:00
|
|
|
$position = 0;
|
2014-03-18 17:08:20 +01:00
|
|
|
$group = 0;
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
}
|
|
|
|
|
2010-02-22 20:03:55 +01:00
|
|
|
// Header
|
|
|
|
|
2010-05-20 14:07:19 +02:00
|
|
|
// Alert Delete
|
|
|
|
// =============
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($delete_alert) { // Delete alert
|
2010-05-20 14:07:19 +02:00
|
|
|
$alert_delete = (int) get_parameter_get ("delete_alert", 0);
|
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_events.php, include/functions_messages.php,
include/auth/mysql.php, include/functions_api.php,
include/functions_incidents.php, include/functions_db.php,
operation/incidents/incident_detail.php,
operation/snmpconsole/snmp_view.php, operation/reporting/graph_viewer.php,
godmode/groups/group_list.php, godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php, godmode/agentes/planned_downtime.php,
godmode/servers/recon_script.php, godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php, godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php,
godmode/modules/manage_network_templates_form.php: change the source code
for to use process_sql_delete instead of the SQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4070 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-08 17:12:58 +01:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$result = db_process_sql_delete('talert_snmp',
|
|
|
|
array('id_as' => $alert_delete));
|
|
|
|
|
2010-05-20 14:07:19 +02:00
|
|
|
if ($result === false) {
|
2012-03-14 18:51:39 +01:00
|
|
|
db_pandora_audit("SNMP management", "Fail try to delete snmp alert #$alert_delete");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
ui_print_error_message(__('There was a problem deleting the alert'));
|
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_events.php, include/functions_messages.php,
include/auth/mysql.php, include/functions_api.php,
include/functions_incidents.php, include/functions_db.php,
operation/incidents/incident_detail.php,
operation/snmpconsole/snmp_view.php, operation/reporting/graph_viewer.php,
godmode/groups/group_list.php, godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php, godmode/agentes/planned_downtime.php,
godmode/servers/recon_script.php, godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php, godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php,
godmode/modules/manage_network_templates_form.php: change the source code
for to use process_sql_delete instead of the SQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4070 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-08 17:12:58 +01:00
|
|
|
}
|
|
|
|
else {
|
2012-03-14 18:51:39 +01:00
|
|
|
db_pandora_audit("SNMP management", "Delete snmp alert #$alert_delete");
|
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
|
|
|
ui_print_success_message(__('Successfully deleted'));
|
2010-05-20 14:07:19 +02:00
|
|
|
}
|
|
|
|
}
|
2010-02-22 20:03:55 +01:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($multiple_delete) {
|
|
|
|
$delete_ids = get_parameter('delete_ids', array());
|
|
|
|
|
|
|
|
$total = count($delete_ids);
|
|
|
|
|
|
|
|
$count = 0;
|
|
|
|
foreach ($delete_ids as $alert_delete) {
|
|
|
|
$result = db_process_sql_delete('talert_snmp',
|
|
|
|
array('id_as' => $alert_delete));
|
|
|
|
|
|
|
|
if ($result !== false) {
|
|
|
|
db_pandora_audit("SNMP management", "Delete snmp alert #$alert_delete");
|
|
|
|
$count++;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
db_pandora_audit("SNMP management", "Fail try to delete snmp alert #$alert_delete");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($count == $total) {
|
2015-07-14 14:07:04 +02:00
|
|
|
ui_print_success_message(
|
|
|
|
__('Successfully deleted alerts (%s / %s)', $count, $total));
|
2013-08-05 16:23:27 +02:00
|
|
|
}
|
|
|
|
else {
|
2015-07-14 14:07:04 +02:00
|
|
|
ui_print_error_message(
|
|
|
|
__('Unsuccessfully deleted alerts (%s / %s)', $count, $total));
|
2013-08-05 16:23:27 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-18 17:08:20 +01:00
|
|
|
$user_groups = users_get_groups($config['id_user'],"AR", true);
|
|
|
|
$str_user_groups = '';
|
|
|
|
$i = 0;
|
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
|
|
|
foreach ($user_groups as $id => $name) {
|
2014-03-18 17:08:20 +01:00
|
|
|
if ($i == 0) {
|
|
|
|
$str_user_groups .= $id;
|
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
|
|
|
}
|
|
|
|
else {
|
2014-03-18 17:08:20 +01:00
|
|
|
$str_user_groups .= ','.$id;
|
|
|
|
}
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
// Alert form
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($create_alert || $update_alert) {
|
|
|
|
//if (isset ($_GET["update_alert"])) {
|
2008-10-24 11:52:46 +02:00
|
|
|
//the update_alert means the form should be displayed. If update_alert > 1 then an existing alert is updated
|
2013-08-05 16:23:27 +02:00
|
|
|
echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">';
|
|
|
|
|
|
|
|
html_print_input_hidden('id_alert_snmp', $id_as);
|
|
|
|
|
|
|
|
if ($create_alert) {
|
|
|
|
html_print_input_hidden('save_alert', 1);
|
|
|
|
}
|
|
|
|
if ($update_alert) {
|
|
|
|
html_print_input_hidden('modify_alert', 1);
|
|
|
|
}
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 15:15:12 +01:00
|
|
|
/* SNMP alert filters */
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2015-04-22 16:46:08 +02:00
|
|
|
echo '<table cellpadding="0" cellspacing="0" width="100%" class="databox filter" style="font-weight: bold">';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 19:12:50 +01:00
|
|
|
// Description
|
2015-07-14 14:07:04 +02:00
|
|
|
echo '<tr>' .
|
|
|
|
'<td class="datos" valign="top">' . __('Description') . '</td>' .
|
|
|
|
'<td class="datos">';
|
|
|
|
html_print_textarea('description', 3, 2, $description, 'style="width:400px;"');
|
|
|
|
echo '</td>' .
|
|
|
|
'</tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 19:12:50 +01:00
|
|
|
//echo '<tr><td class="datos"><b>' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . '</b></td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 18:01:07 +01:00
|
|
|
// OID
|
2015-07-14 14:07:04 +02:00
|
|
|
echo '<tr id="tr-oid">' .
|
|
|
|
'<td class="datos2">' . __('Enterprise String') . '</td>' .
|
|
|
|
'<td class="datos2">';
|
2012-02-09 18:01:07 +01:00
|
|
|
html_print_input_text ("oid", $oid, '', 50, 255);
|
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 15:15:12 +01:00
|
|
|
// Custom
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom Value/OID');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
echo ui_print_help_icon ("snmp_alert_custom", true);
|
|
|
|
|
|
|
|
echo '</td><td class="datos">';
|
|
|
|
html_print_textarea ("custom_value", $custom_value, 2, $custom_value, 'style="width:400px;"');
|
|
|
|
|
2012-02-09 15:15:12 +01:00
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 15:15:12 +01:00
|
|
|
// SNMP Agent
|
|
|
|
echo '<tr id="tr-source_ip"><td class="datos2">'.__('SNMP Agent').' (IP)</td><td class="datos2">';
|
|
|
|
html_print_input_text ("source_ip", $source_ip, '', 20);
|
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2014-03-18 17:08:20 +01:00
|
|
|
// Group
|
|
|
|
echo '<tr id="tr-group"><td class="datos2">'.__('Group').'</td><td class="datos2">';
|
2015-08-18 12:58:37 +02:00
|
|
|
html_print_select_groups($config['id_user'], "AR", true, "group",
|
|
|
|
$group, '', '', 0, false, false, false, '', false, false,
|
|
|
|
false, false, 'id_grupo', false);
|
2014-03-18 17:08:20 +01:00
|
|
|
echo '</td></tr>';
|
|
|
|
|
2012-02-09 15:15:12 +01:00
|
|
|
// Trap type
|
|
|
|
echo '<tr><td class="datos">'.__('Trap type').'</td><td class="datos">';
|
|
|
|
echo html_print_select ($trap_types, 'trap_type', $trap_type, '', '', '', false, false, false);
|
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 15:15:12 +01:00
|
|
|
// Single value
|
|
|
|
echo '<tr><td class="datos">'.__('Single value').'</td><td class="datos">';
|
|
|
|
html_print_input_text ("single_value", $single_value, '', 20);
|
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #1
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data') .
|
|
|
|
ui_print_help_icon ("field_match_snmp", true) .
|
|
|
|
'</td>' .
|
|
|
|
'<td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_1", $order_1, '', 4);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_input_text ("custom_oid_data_1", $custom_oid_data_1, '', 60);
|
|
|
|
echo '</td></tr>';
|
2012-02-02 13:00:30 +01:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #2
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Variable bindings/Data');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
//echo ui_print_help_icon ("snmp_alert_custom", true);
|
|
|
|
|
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_2", $order_2, '', 4);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_input_text ("custom_oid_data_2", $custom_oid_data_2, '', 60);
|
2012-02-02 13:00:30 +01:00
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #3
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Variable bindings/Data');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
//echo ui_print_help_icon ("snmp_alert_custom", true);
|
|
|
|
|
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_3", $order_3, '', 4);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_input_text ("custom_oid_data_3", $custom_oid_data_3, '', 60);
|
2012-02-02 13:00:30 +01:00
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #4
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
//echo ui_print_help_icon ("snmp_alert_custom", true);
|
|
|
|
|
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_4", $order_4, '', 4);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_input_text ("custom_oid_data_4", $custom_oid_data_4, '', 60);
|
2012-02-02 13:00:30 +01:00
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #5
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
//echo ui_print_help_icon ("snmp_alert_custom", true);
|
|
|
|
|
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_5", $order_5, '', 4);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_input_text ("custom_oid_data_5", $custom_oid_data_5, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #6
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
//echo ui_print_help_icon ("snmp_alert_custom", true);
|
|
|
|
|
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_6", $order_6, '', 4);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_input_text ("custom_oid_data_6", $custom_oid_data_6, '', 60);
|
2012-02-02 13:00:30 +01:00
|
|
|
echo '</td></tr>';
|
2013-08-05 16:23:27 +02:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #7
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2013-07-10 18:49:05 +02:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_7", $order_7, '', 4);
|
2013-07-10 18:49:05 +02:00
|
|
|
html_print_input_text ("custom_oid_data_7", $custom_oid_data_7, '', 60);
|
|
|
|
echo '</td></tr>';
|
2013-08-05 16:23:27 +02:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #8
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2013-07-10 18:49:05 +02:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_8", $order_8, '', 4);
|
2013-07-10 18:49:05 +02:00
|
|
|
html_print_input_text ("custom_oid_data_8", $custom_oid_data_8, '', 60);
|
|
|
|
echo '</td></tr>';
|
2013-08-05 16:23:27 +02:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #9
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2013-07-10 18:49:05 +02:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_9", $order_9, '', 4);
|
2013-07-10 18:49:05 +02:00
|
|
|
html_print_input_text ("custom_oid_data_9", $custom_oid_data_9, '', 60);
|
|
|
|
echo '</td></tr>';
|
2013-08-05 16:23:27 +02:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #10
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2013-07-10 18:49:05 +02:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_10", $order_10, '', 4);
|
2013-07-10 18:49:05 +02:00
|
|
|
html_print_input_text ("custom_oid_data_10", $custom_oid_data_10, '', 60);
|
|
|
|
echo '</td></tr>';
|
2013-08-05 16:23:27 +02:00
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #11
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_11", $order_11, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_11", $custom_oid_data_11, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #12
|
|
|
|
echo '<tr id="tr-custom_value">' .
|
|
|
|
'<td class="datos" valign="top">' . __('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_12", $order_12, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_12", $custom_oid_data_12, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #13
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_13", $order_13, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_13", $custom_oid_data_13, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #14
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_14", $order_14, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_14", $custom_oid_data_14, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #15
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_15", $order_15, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_15", $custom_oid_data_15, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #16
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_16", $order_16, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_16", $custom_oid_data_16, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #17
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">' .
|
|
|
|
__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_17", $order_17, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_17", $custom_oid_data_17, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #18
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_18", $order_18, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_18", $custom_oid_data_18, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #19
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_19", $order_19, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_19", $custom_oid_data_19, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
// Variable bindings/Data #20
|
|
|
|
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Variable bindings/Data');
|
2014-03-19 12:29:56 +01:00
|
|
|
echo '</td><td class="datos">';
|
2014-03-27 11:48:19 +01:00
|
|
|
echo '#';
|
|
|
|
html_print_input_text ("order_20", $order_20, '', 4);
|
2014-03-19 12:29:56 +01:00
|
|
|
html_print_input_text ("custom_oid_data_20", $custom_oid_data_20, '', 60);
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
2012-02-09 19:12:50 +01:00
|
|
|
//Button
|
|
|
|
//echo '<tr><td></td><td align="right">';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 19:12:50 +01:00
|
|
|
// End table
|
|
|
|
//echo "</td></tr></table>";
|
|
|
|
|
|
|
|
// Alert configuration
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2012-02-09 19:12:50 +01:00
|
|
|
//echo '<table cellpadding="4" cellspacing="4" width="98%" class="databox_color" style="border:1px solid #A9A9A9;">';
|
|
|
|
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
//echo '<tr><td class="datos"><b>' . __('Alert configuration') . ui_print_help_icon("snmp_alert_configuration", true) . '</b></td></tr>';
|
2012-02-09 19:12:50 +01:00
|
|
|
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
// Alert fields
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2013-08-06 14:53:39 +02:00
|
|
|
$al = array(
|
|
|
|
'al_field1' => $al_field1,
|
|
|
|
'al_field2' => $al_field2,
|
|
|
|
'al_field3' => $al_field3,
|
|
|
|
'al_field4' => $al_field4,
|
|
|
|
'al_field5' => $al_field5,
|
|
|
|
'al_field6' => $al_field6,
|
|
|
|
'al_field7' => $al_field7,
|
|
|
|
'al_field8' => $al_field8,
|
|
|
|
'al_field9' => $al_field9,
|
|
|
|
'al_field10' => $al_field10);
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2013-03-05 15:57:35 +01:00
|
|
|
// Hidden div with help hint to fill with javascript
|
|
|
|
html_print_div(array('id' => 'help_snmp_alert_hint', 'content' => ui_print_help_icon ("snmp_alert_field1", true), 'hidden' => true));
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
for ($i = 1; $i <= 10; $i++) {
|
2013-07-03 15:08:56 +02:00
|
|
|
echo '<tr id="table_macros-field'.$i.'"><td class="datos" valign="top">'.html_print_image('images/spinner.gif',true);
|
2013-08-05 16:23:27 +02:00
|
|
|
echo '<td class="datos">' . html_print_image('images/spinner.gif',true);
|
2013-03-05 15:57:35 +01:00
|
|
|
html_print_input_hidden('field'.$i.'_value', isset($al['al_field'.$i]) ? $al['al_field'.$i] : '');
|
|
|
|
echo '</td></tr>';
|
|
|
|
}
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
|
|
|
|
// Max / Min alerts
|
2013-08-06 14:53:39 +02:00
|
|
|
echo '<tr><td class="datos2">' . __('Min. number of alerts').'</td><td class="datos2">';
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_input_text ("min_alerts", $min_alerts, '', 3);
|
2008-10-15 20:40:34 +02:00
|
|
|
|
|
|
|
echo '</td></tr><tr><td class="datos">'.__('Max. number of alerts').'</td><td class="datos">';
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_input_text ("max_alerts", $max_alerts, '', 3);
|
2008-10-15 20:40:34 +02:00
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
// Time Threshold
|
2008-10-15 20:40:34 +02:00
|
|
|
echo '<tr><td class="datos2">'.__('Time threshold').'</td><td class="datos2">';
|
|
|
|
|
|
|
|
$fields = array ();
|
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions.php,
operation/agentes/datos_agente.php, operation/agentes/gis_view.php,
operation/servers/view_server_detail.php,
operation/reporting/reporting_xml.php, operation/reporting/graph_viewer.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php:
cleaned source code, and erased the deprecated function
"human_time_description".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4079 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 16:54:05 +01:00
|
|
|
$fields[$time_threshold] = human_time_description_raw ($time_threshold);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
$fields[SECONDS_5MINUTES] = human_time_description_raw (SECONDS_5MINUTES);
|
|
|
|
$fields[SECONDS_10MINUTES] = human_time_description_raw (SECONDS_10MINUTES);
|
|
|
|
$fields[SECONDS_15MINUTES] = human_time_description_raw (SECONDS_15MINUTES);
|
|
|
|
$fields[SECONDS_30MINUTES] = human_time_description_raw (SECONDS_30MINUTES);
|
|
|
|
$fields[SECONDS_1HOUR] = human_time_description_raw (SECONDS_1HOUR);
|
|
|
|
$fields[SECONDS_2HOUR] = human_time_description_raw (SECONDS_2HOUR);
|
|
|
|
$fields[SECONDS_5HOUR] = human_time_description_raw (SECONDS_5HOUR);
|
|
|
|
$fields[SECONDS_12HOURS] = human_time_description_raw (SECONDS_12HOURS);
|
|
|
|
$fields[SECONDS_1DAY] = human_time_description_raw (SECONDS_1DAY);
|
|
|
|
$fields[SECONDS_1WEEK] = human_time_description_raw (SECONDS_1WEEK);
|
2008-10-15 20:40:34 +02:00
|
|
|
$fields[-1] = __('Other value');
|
2008-07-21 15:43:33 +02:00
|
|
|
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_select ($fields, "time_threshold", $time_threshold, '', '', '0', false, false, false, '" style="margin-right:60px');
|
2008-10-15 20:40:34 +02:00
|
|
|
echo '<div id="div-time_other" style="display:none">';
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_input_text ("time_other", 0, '', 6);
|
2013-08-05 16:23:27 +02:00
|
|
|
echo ' ' . __('seconds') . '</div></td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
// Priority
|
|
|
|
echo '<tr><td class="datos">'.__('Priority').'</td><td class="datos">';
|
2011-04-27 15:43:31 +02:00
|
|
|
echo html_print_select (get_priorities (), "priority", $priority, '', '', '0', false, false, false);
|
2008-10-15 20:40:34 +02:00
|
|
|
echo '</td></tr>';
|
2012-02-09 19:12:50 +01:00
|
|
|
|
|
|
|
// Alert type (e-mail, event etc.)
|
|
|
|
echo '<tr><td class="datos">'.__('Alert action').'</td><td class="datos">';
|
|
|
|
|
2013-08-06 14:53:39 +02:00
|
|
|
switch ($config['dbtype']) {
|
2012-02-09 19:12:50 +01:00
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
2013-08-06 14:53:39 +02:00
|
|
|
html_print_select_from_sql(
|
|
|
|
'SELECT id, name
|
|
|
|
FROM talert_actions
|
|
|
|
ORDER BY name',
|
|
|
|
"alert_type", $alert_type, '', '', 0, false, false, false);
|
2012-02-09 19:12:50 +01:00
|
|
|
break;
|
|
|
|
case "oracle":
|
2013-08-06 14:53:39 +02:00
|
|
|
html_print_select_from_sql(
|
|
|
|
'SELECT id, dbms_lob.substr(name,4000,1) as name
|
|
|
|
FROM talert_actions
|
|
|
|
ORDER BY dbms_lob.substr(name,4000,1)',
|
|
|
|
"alert_type", $alert_type, '', '', 0, false, false, false);
|
2012-02-09 19:12:50 +01:00
|
|
|
break;
|
|
|
|
}
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
echo '</td></tr>';
|
2013-08-06 14:53:39 +02:00
|
|
|
echo '<tr><td class="datos">' . __('Position') . '</td><td class="datos">';
|
2013-07-17 19:39:27 +02:00
|
|
|
html_print_input_text ("position", $position, '', 3);
|
|
|
|
echo '</td></tr>';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
echo '</table>';
|
2012-02-09 19:12:50 +01:00
|
|
|
|
2012-02-09 12:20:28 +01:00
|
|
|
echo "<table style='width:98%'>";
|
2008-10-15 20:40:34 +02:00
|
|
|
echo '<tr><td></td><td align="right">';
|
|
|
|
if ($id_as > 0) {
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_submit_button (__('Update'), "submit", false, 'class="sub upd"', false);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_submit_button (__('Create'), "submit", false, 'class="sub wand"', false);
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2012-02-09 12:20:28 +01:00
|
|
|
echo '</td></tr></table>';
|
|
|
|
echo "</table>";
|
2013-03-05 15:57:35 +01:00
|
|
|
echo "</form>";
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
|
|
|
else {
|
2009-04-24 10:54:04 +02:00
|
|
|
require_once ('include/functions_alerts.php');
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$free_search = (string)get_parameter('free_search', '');
|
|
|
|
$trap_type_filter = (int)get_parameter('trap_type_filter', SNMP_TRAP_TYPE_NONE);
|
|
|
|
$priority_filter = (int)get_parameter('priority_filter', -1);
|
|
|
|
$filter_param = (bool)get_parameter('filter', false);
|
|
|
|
$offset = (int) get_parameter ('offset');
|
|
|
|
|
2013-08-09 08:53:36 +02:00
|
|
|
$table_filter = new stdClass();
|
2015-04-22 16:46:08 +02:00
|
|
|
$table_filter->width = "100%";
|
|
|
|
$table_filter->class = "databox filters";
|
2013-08-05 16:23:27 +02:00
|
|
|
$table_filter->data = array();
|
|
|
|
$table_filter->data[0][0] = __('Free search') . ui_print_help_tip(
|
2015-01-21 14:47:54 +01:00
|
|
|
__('Search by these fields description, OID, Custom Value, SNMP Agent (IP), Single value, each Variable bindings/Datas.'), true);
|
2013-08-05 16:23:27 +02:00
|
|
|
$table_filter->data[0][1] =
|
|
|
|
html_print_input_text('free_search', $free_search, '', 30, 100, true);
|
|
|
|
$table_filter->data[0][2] = __('Trap type');
|
|
|
|
$table_filter->data[0][3] =
|
|
|
|
html_print_select ($trap_types, 'trap_type_filter', $trap_type_filter, '', '', '', true, false, false);
|
|
|
|
$table_filter->data[0][4] = __('Priority');
|
|
|
|
$table_filter->data[0][5] =
|
|
|
|
html_print_select (get_priorities(), "priority_filter", $priority_filter, '', __('None'), '-1', true, false, false);;
|
|
|
|
|
|
|
|
$form_filter = '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">';
|
|
|
|
$form_filter .= html_print_input_hidden('filter', 1, true);
|
|
|
|
$form_filter .= html_print_table($table_filter, true);
|
|
|
|
$form_filter .= '<div style="text-align: right; width: ' . $table_filter->width . '">';
|
|
|
|
$form_filter .= html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub filter"', true);
|
|
|
|
$form_filter .= '</div>';
|
|
|
|
$form_filter .= '</form>';
|
|
|
|
|
2015-04-22 16:46:08 +02:00
|
|
|
//echo "<br>";
|
2013-08-05 16:23:27 +02:00
|
|
|
ui_toggle($form_filter,__('Alert SNMP control filter'), __('Toggle filter(s)'));
|
|
|
|
|
|
|
|
$filter = array();
|
|
|
|
$filter['offset'] = (int) get_parameter ('offset');
|
|
|
|
$filter['limit'] = (int) $config['block_size'];
|
|
|
|
if ($filter_param) {
|
|
|
|
//Move the first page
|
|
|
|
$offset = 0;
|
|
|
|
|
|
|
|
$url_pagination = "index.php?" .
|
|
|
|
"sec=snmpconsole&" .
|
|
|
|
"sec2=godmode/snmpconsole/snmp_alert&" .
|
2013-09-12 14:36:30 +02:00
|
|
|
"free_search=" . $free_search . "&" .
|
2013-08-05 16:23:27 +02:00
|
|
|
"trap_type_filter=" . $trap_type_filter . "&" .
|
|
|
|
"priority_filter=" . $priority_filter;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url_pagination = "index.php?" .
|
|
|
|
"sec=snmpconsole&" .
|
|
|
|
"sec2=godmode/snmpconsole/snmp_alert&" .
|
2013-09-12 14:36:30 +02:00
|
|
|
"free_search=" . $free_search . "&" .
|
2013-08-05 16:23:27 +02:00
|
|
|
"trap_type_filter=" . $trap_type_filter . "&" .
|
|
|
|
"priority_filter=" . $priority_filter . "&" .
|
|
|
|
"offset=" . $offset;
|
|
|
|
}
|
2014-03-20 13:02:07 +01:00
|
|
|
|
2014-03-18 17:08:20 +01:00
|
|
|
//$where_sql = ' 1 = 1';
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($trap_type_filter != SNMP_TRAP_TYPE_NONE) {
|
|
|
|
$where_sql .= ' AND `trap_type` = ' . $trap_type_filter;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($priority_filter != -1) {
|
|
|
|
$where_sql .= ' AND `priority` = ' . $priority_filter;
|
|
|
|
}
|
|
|
|
|
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
|
|
|
$where_sql = "";
|
2013-08-05 16:23:27 +02:00
|
|
|
if (!empty($free_search)) {
|
2013-08-09 08:38:57 +02:00
|
|
|
$where_sql .= " AND (`single_value` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f10_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f9_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f8_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f7_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f6_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f5_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f4_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f3_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f2_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `_snmp_f1_` LIKE '%" . $free_search . "%'
|
|
|
|
OR `oid` LIKE '%" . $free_search . "%'
|
|
|
|
OR `custom_oid` LIKE '%" . $free_search . "%'
|
|
|
|
OR `agent` LIKE '%" . $free_search . "%'
|
|
|
|
OR `description` LIKE '%" . $free_search . "%')";
|
2013-08-05 16:23:27 +02:00
|
|
|
}
|
|
|
|
|
2014-03-18 17:08:20 +01:00
|
|
|
$count = db_get_value_sql("SELECT COUNT(*)
|
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
|
|
|
FROM talert_snmp WHERE id_group IN ($str_user_groups) " .
|
|
|
|
$where_sql);
|
2014-03-20 13:02:07 +01:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$result = array();
|
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
//Overview
|
2013-08-05 16:23:27 +02:00
|
|
|
if ($count == 0) {
|
2008-10-15 20:40:34 +02:00
|
|
|
$result = array ();
|
2015-04-22 16:46:08 +02:00
|
|
|
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no SNMP alerts') ) );
|
2013-08-05 16:23:27 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
ui_pagination ($count, $url_pagination);
|
|
|
|
|
|
|
|
$where_sql .= ' LIMIT ' . $config['block_size'] . ' OFFSET ' . $offset;
|
2014-03-18 17:08:20 +01:00
|
|
|
$result = db_get_all_rows_sql("SELECT *
|
|
|
|
FROM talert_snmp
|
|
|
|
WHERE id_group IN ($str_user_groups) " . $where_sql);
|
2008-10-15 20:40:34 +02:00
|
|
|
}
|
|
|
|
|
2013-08-09 08:53:36 +02:00
|
|
|
$table = new stdClass();
|
2008-10-15 20:40:34 +02:00
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
|
|
|
$table->size = array ();
|
|
|
|
$table->cellpadding = 4;
|
|
|
|
$table->cellspacing = 4;
|
2015-04-22 16:46:08 +02:00
|
|
|
$table->width = "100%";
|
|
|
|
$table->class= "databox data";
|
2008-10-15 20:40:34 +02:00
|
|
|
$table->align = array ();
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->head[0] = '<span title="' . __('Position') . '">' . __('P.') . '</span>';
|
|
|
|
$table->align[0] = 'center';
|
|
|
|
|
|
|
|
$table->head[1] = __('Alert action');
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->head[2] = __('SNMP Agent');
|
|
|
|
$table->size[2] = "90px";
|
2009-11-04 19:10:48 +01:00
|
|
|
$table->align[2] = 'center';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
$table->head[3] = __('Enterprise String');
|
2008-10-15 20:40:34 +02:00
|
|
|
$table->align[3] = 'center';
|
|
|
|
|
2015-01-21 14:47:54 +01:00
|
|
|
$table->head[4] = __('Custom Value/Enterprise String');
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->align[4] = 'center';
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->head[5] = __('Description');
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$table->head[6] = '<span title="' . __('Times fired') . '">' . __('TF.') . '</span>';
|
|
|
|
$table->size[6] = "50px";
|
2008-10-15 20:40:34 +02:00
|
|
|
$table->align[6] = 'center';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->head[7] = __('Last fired');
|
2010-10-22 15:01:25 +02:00
|
|
|
$table->align[7] = 'center';
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->head[8] = __('Action');
|
2014-03-31 17:00:16 +02:00
|
|
|
$table->size[8] = "90px";
|
2013-07-17 19:39:27 +02:00
|
|
|
$table->align[8] = 'center';
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$table->head[9] = html_print_checkbox ("all_delete_box", "1", false, true);
|
|
|
|
$table->size[9] = "10px";
|
|
|
|
$table->align[9] = 'center';
|
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
foreach ($result as $row) {
|
|
|
|
$data = array ();
|
2013-07-17 19:39:27 +02:00
|
|
|
$data[0] = $row["position"];
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$url = "index.php?" .
|
|
|
|
"sec=snmpconsole&" .
|
|
|
|
"sec2=godmode/snmpconsole/snmp_alert&" .
|
|
|
|
"id_alert_snmp=" . $row["id_as"] ."&" .
|
|
|
|
"update_alert=1";
|
2014-03-31 17:00:16 +02:00
|
|
|
$data[1] = '<table>';
|
|
|
|
$data[1] .= '<tr>';
|
|
|
|
$data[1] .= '<a href="' . $url . '">' .
|
2013-08-05 16:23:27 +02:00
|
|
|
alerts_get_alert_action_name ($row["id_alert"]) . '</a>';
|
2014-03-31 17:00:16 +02:00
|
|
|
$other_actions = db_get_all_rows_filter('talert_snmp_action', array('id_alert_snmp'=>$row['id_as']));
|
|
|
|
$data[1] .= '</tr>';
|
|
|
|
|
|
|
|
if ($other_actions != false) {
|
|
|
|
foreach ($other_actions as $action) {
|
|
|
|
$data[1] .= '<tr>';
|
|
|
|
$data[1] .= '<td>'. alerts_get_alert_action_name ($action["alert_type"]).'</td>';
|
2014-09-02 09:02:44 +02:00
|
|
|
$data[1] .= '<td> <a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_action=1&action_id='.$action['id'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">' .
|
2014-03-31 17:00:16 +02:00
|
|
|
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . '</a> </td>';
|
|
|
|
$data[1] .= '</tr>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$data[1] .= '</table>';
|
|
|
|
|
2013-07-17 19:39:27 +02:00
|
|
|
$data[2] = $row["agent"];
|
|
|
|
$data[3] = $row["oid"];
|
|
|
|
$data[4] = $row["custom_oid"];
|
|
|
|
$data[5] = $row["description"];
|
|
|
|
$data[6] = $row["times_fired"];
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2011-11-17 17:55:32 +01:00
|
|
|
if (($row["last_fired"] != "1970-01-01 00:00:00") and ($row["last_fired"] != "01-01-1970 00:00:00")) {
|
2013-07-17 19:39:27 +02:00
|
|
|
$data[7] = ui_print_timestamp($row["last_fired"], true);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
}
|
|
|
|
else {
|
2013-07-17 19:39:27 +02:00
|
|
|
$data[7] = __('Never');
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2008-10-15 20:40:34 +02:00
|
|
|
|
2013-08-09 08:38:57 +02:00
|
|
|
$data[8] = '<a href="index.php?' .
|
|
|
|
'sec=snmpconsole&' .
|
|
|
|
'sec2=godmode/snmpconsole/snmp_alert&' .
|
|
|
|
'update_alert=1&'.
|
|
|
|
'id_alert_snmp='.$row["id_as"].'">' .
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>' .
|
2014-03-31 17:00:16 +02:00
|
|
|
'<a href="javascript:show_add_action_snmp(\'' . $row['id_as'] . '\');">' .
|
|
|
|
html_print_image('images/add.png', true, array('title' => __("Add action"))) .
|
|
|
|
'</a>' .
|
2014-09-02 09:02:44 +02:00
|
|
|
'<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row["id_as"].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">' .
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . '</a>';
|
2014-03-31 17:00:16 +02:00
|
|
|
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$data[9] = html_print_checkbox_extended("delete_ids[]",
|
|
|
|
$row['id_as'], false, false, false, 'class="chk_delete"', true);
|
|
|
|
|
2008-10-22 15:20:06 +02:00
|
|
|
$idx = count ($table->data); //The current index of the table is 1 less than the count of table data so we count before adding to table->data
|
|
|
|
array_push ($table->data, $data);
|
2008-11-20 22:26:59 +01:00
|
|
|
|
|
|
|
$table->rowclass[$idx] = get_priority_class ($row["priority"]);
|
2008-10-15 20:40:34 +02:00
|
|
|
}
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2014-03-31 17:00:16 +02:00
|
|
|
# DIALOG ADD MORE ACTIONS
|
|
|
|
echo '<div id="add_action_snmp-div" style="display:none;text-align:left">';
|
|
|
|
|
|
|
|
echo '<form id="add_action_form" method="post">';
|
|
|
|
echo '<table class="databox_color" style="width:100%">';
|
|
|
|
echo '<tr>';
|
|
|
|
echo '<td class="datos2" style="font-weight:bold;padding:6px;">';
|
|
|
|
echo __('ID Alert SNMP');
|
|
|
|
echo '</td>';
|
|
|
|
echo '<td class="datos">';
|
|
|
|
html_print_input_text('id_alert_snmp', '', '', 3,10,false,true);
|
|
|
|
echo '</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
echo '<tr class="datos2">';
|
|
|
|
echo '<td class="datos2" style="font-weight:bold;padding:6px;">';
|
|
|
|
echo __('Action');
|
|
|
|
echo '</td>';
|
|
|
|
echo '<td class="datos2">';
|
|
|
|
|
|
|
|
switch ($config['dbtype']) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
html_print_select_from_sql(
|
|
|
|
'SELECT id, name
|
|
|
|
FROM talert_actions
|
|
|
|
ORDER BY name',
|
|
|
|
"alert_type", $alert_type, '', '', 0, false, false, false);
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
html_print_select_from_sql(
|
|
|
|
'SELECT id, dbms_lob.substr(name,4000,1) as name
|
|
|
|
FROM talert_actions
|
|
|
|
ORDER BY dbms_lob.substr(name,4000,1)',
|
|
|
|
"alert_type", $alert_type, '', '', 0, false, false, false);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
echo '</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
|
|
|
|
$al = array(
|
|
|
|
'al_field1' => $al_field1,
|
|
|
|
'al_field2' => $al_field2,
|
|
|
|
'al_field3' => $al_field3,
|
|
|
|
'al_field4' => $al_field4,
|
|
|
|
'al_field5' => $al_field5,
|
|
|
|
'al_field6' => $al_field6,
|
|
|
|
'al_field7' => $al_field7,
|
|
|
|
'al_field8' => $al_field8,
|
|
|
|
'al_field9' => $al_field9,
|
|
|
|
'al_field10' => $al_field10);
|
|
|
|
|
|
|
|
for ($i = 1; $i <= 10; $i++) {
|
|
|
|
echo '<tr id="table_macros-field'.$i.'"><td class="datos" valign="top">'.html_print_image('images/spinner.gif',true);
|
|
|
|
echo '<td class="datos">' . html_print_image('images/spinner.gif',true);
|
|
|
|
html_print_input_hidden('field'.$i.'_value', isset($al['al_field'.$i]) ? $al['al_field'.$i] : '');
|
|
|
|
echo '</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
html_print_div(array('id' => 'help_snmp_alert_hint', 'content' => ui_print_help_icon ("snmp_alert_field1", true), 'hidden' => true));
|
|
|
|
|
|
|
|
echo '</table>';
|
2015-07-14 14:07:04 +02:00
|
|
|
html_print_input_hidden('add_alert', 1);
|
2014-03-31 17:00:16 +02:00
|
|
|
echo html_print_submit_button (__('Add'), 'addbutton', false, array('class' => "sub next", 'style' => "float:right"), true);
|
|
|
|
echo '</form>';
|
|
|
|
echo '</div>';
|
|
|
|
# END DIALOG ADD MORE ACTIONS
|
|
|
|
|
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
if (!empty ($table->data)) {
|
2013-08-05 16:23:27 +02:00
|
|
|
echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">';
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_table ($table);
|
2013-08-05 16:23:27 +02:00
|
|
|
|
|
|
|
ui_pagination ($count, $url_pagination);
|
|
|
|
|
|
|
|
echo '<div style="text-align:right; width: ' . $table->width . '; margin-bottom: 30px;">';
|
|
|
|
html_print_input_hidden('multiple_delete', 1);
|
|
|
|
html_print_submit_button(__('Delete selected'), 'delete_button', false, 'class="sub delete"');
|
|
|
|
echo '</div>';
|
|
|
|
echo '</form>';
|
2008-10-15 20:40:34 +02:00
|
|
|
}
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
echo '<div style="text-align:right; width:' . $table->width . ';">';
|
|
|
|
echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">';
|
|
|
|
html_print_input_hidden('create_alert', 1);
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_submit_button (__('Create'), "add_alert", false, 'class="sub next"');
|
2008-10-15 20:40:34 +02:00
|
|
|
echo "</form></div>";
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
|
2008-11-20 22:26:59 +01:00
|
|
|
echo '<div style="margin-left: 30px; line-height: 17px; vertical-align: top; width:120px;">';
|
|
|
|
echo '<h3>'.__('Legend').'</h3>';
|
2013-08-05 16:23:27 +02:00
|
|
|
foreach (get_priorities() as $num => $name) {
|
|
|
|
echo '<span class="' . get_priority_class ($num).'">' . $name . '</span>';
|
2008-11-20 22:26:59 +01:00
|
|
|
echo '<br />';
|
|
|
|
}
|
|
|
|
echo '</div>';
|
2013-08-05 16:23:27 +02:00
|
|
|
|
|
|
|
unset ($table);
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2014-03-31 17:00:16 +02:00
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
?>
|
2008-10-15 20:40:34 +02:00
|
|
|
<script language="javascript" type="text/javascript">
|
2013-08-05 16:23:27 +02:00
|
|
|
|
2008-10-15 20:40:34 +02:00
|
|
|
function time_changed () {
|
|
|
|
var time = this.value;
|
|
|
|
if (time == -1) {
|
|
|
|
$('#time_threshold').fadeOut ('normal', function () {
|
|
|
|
$('#div-time_other').fadeIn ('normal');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready (function () {
|
|
|
|
$('#time_threshold').change (time_changed);
|
2013-03-05 15:57:35 +01:00
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$("input[name=all_delete_box]").change (function() {
|
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
$("input[name='delete_ids[]']").check();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$("input[name='delete_ids[]']").uncheck();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-03-05 15:57:35 +01:00
|
|
|
$("#alert_type").change (function () {
|
2014-03-31 17:00:16 +02:00
|
|
|
values = Array ();
|
2013-08-05 16:23:27 +02:00
|
|
|
values.push ({
|
|
|
|
name: "page",
|
|
|
|
value: "godmode/alerts/alert_commands"
|
|
|
|
});
|
|
|
|
values.push ({
|
|
|
|
name: "get_alert_command",
|
|
|
|
value: "1"
|
|
|
|
});
|
|
|
|
values.push ({
|
|
|
|
name: "id_action",
|
|
|
|
value: this.value
|
|
|
|
});
|
|
|
|
|
2014-03-27 14:02:34 +01:00
|
|
|
values.push ({
|
|
|
|
name: "get_recovery_fields",
|
|
|
|
value: "0"
|
|
|
|
});
|
2013-08-05 16:23:27 +02:00
|
|
|
jQuery.get (
|
|
|
|
<?php
|
|
|
|
echo "'" . ui_get_full_url("ajax.php", false, false, false) . "'";
|
|
|
|
?>,
|
2013-03-05 15:57:35 +01:00
|
|
|
values,
|
|
|
|
function (data, status) {
|
|
|
|
original_command = js_html_entity_decode (data["command"]);
|
|
|
|
command_description = js_html_entity_decode (data["description"]);
|
2013-08-05 16:23:27 +02:00
|
|
|
for (i = 1; i <= 10; i++) {
|
2013-03-05 15:57:35 +01:00
|
|
|
var old_value = '';
|
|
|
|
// Only keep the value if is provided from hidden (first time)
|
2013-08-05 16:23:27 +02:00
|
|
|
|
|
|
|
var id_field = $("[name=field" + i + "_value]").attr('id');
|
|
|
|
|
|
|
|
if (id_field == "hidden-field" + i + "_value") {
|
|
|
|
old_value = $("[name=field" + i + "_value]").val();
|
2013-03-05 15:57:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// If the row is empty, hide de row
|
2013-08-05 16:23:27 +02:00
|
|
|
if (data["fields_rows"][i] == '') {
|
|
|
|
$('#table_macros-field' + i).hide();
|
2013-03-05 15:57:35 +01:00
|
|
|
}
|
|
|
|
else {
|
2014-03-31 17:00:16 +02:00
|
|
|
$('#table_macros-field' + i).replaceWith(data["fields_rows"][i]);
|
2013-03-05 15:57:35 +01:00
|
|
|
|
|
|
|
// The row provided has a predefined class. We delete it
|
2013-08-05 16:23:27 +02:00
|
|
|
$('#table_macros-field' + i)
|
|
|
|
.removeAttr('class');
|
2015-09-23 09:11:01 +02:00
|
|
|
|
|
|
|
//Remove this to put the help message in alert commands, to do it more general
|
2013-03-05 15:57:35 +01:00
|
|
|
// Add help hint only in first field
|
2015-09-23 09:11:01 +02:00
|
|
|
/*if (i == 1) {
|
2013-08-05 16:23:27 +02:00
|
|
|
var td_content =
|
|
|
|
$('#table_macros-field' + i)
|
|
|
|
.find('td').eq(0);
|
|
|
|
|
|
|
|
td_content
|
|
|
|
.html(
|
|
|
|
td_content.html() +
|
|
|
|
$('#help_snmp_alert_hint').html()
|
|
|
|
);
|
2015-09-23 09:11:01 +02:00
|
|
|
}*/
|
|
|
|
|
2013-08-05 16:23:27 +02:00
|
|
|
$("[name=field" + i + "_value]").val(old_value);
|
2013-07-03 15:08:56 +02:00
|
|
|
$('#table_macros-field').show();
|
2013-03-05 15:57:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"json"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
// Charge the fields of the action
|
|
|
|
$("#alert_type").trigger('change');
|
2014-09-02 09:02:44 +02:00
|
|
|
|
|
|
|
$("#submit-delete_button").click (function () {
|
|
|
|
confirmation = confirm("<?php echo __('Are you sure?'); ?>");
|
|
|
|
if (!confirmation) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
});
|
2014-03-31 17:00:16 +02:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
function show_add_action_snmp(id_alert_snmp) {
|
|
|
|
|
|
|
|
$("#add_action_snmp-div").hide()
|
|
|
|
.dialog ({
|
|
|
|
resizable: true,
|
|
|
|
draggable: true,
|
|
|
|
title: '<?php echo __('Add action '); ?>',
|
|
|
|
modal: true,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
},
|
|
|
|
width: 550,
|
|
|
|
height: 400
|
|
|
|
})
|
|
|
|
.show ();
|
|
|
|
$("#text-id_alert_snmp").val(id_alert_snmp);
|
|
|
|
}
|
2008-10-15 20:40:34 +02:00
|
|
|
</script>
|