2009-03-18 16:42:15 +01:00
< ? php
2009-06-08 20:21:21 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2009-03-18 16:42:15 +01:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
2009-06-08 20:21:21 +02:00
// This program is distributed in the hope that it will be useful,
2009-03-18 16:42:15 +01:00
// 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.
2009-06-08 20:21:21 +02:00
2009-03-18 16:42:15 +01:00
// Load global vars
check_login ();
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 , " PM " )) {
* 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 " ,
2009-04-02 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Final DB changes proposed for closing this month the DB
scheme. tagente-> new server_name field to assign server (old fields will
be removed). talert_templates has two new types (warning, critical).
tevento has "user_comment" new field. Tserver has three new fields,
server_type (so some old fields will be deleted), threads and queued_modules
this last two are for statistical options. Tusuario add language type to
override global language.
* update_manager/main.php: Minor changes for correct ACL usage. Non PM
users could see in what revision it the system, but only that.
* pandoradb_migrate_v2.x_to_v3.0.sql: Updated script for new DB changes.
* general/noaccess.php: Added footer and ending div. Page was very ugly
when showing noaccess errors, nobody see it ???.
* godmode/menu.php: A LOT of ACL fixes on several options.
* godmode/agentes/agent_manager.php: Fixed a crazy floating icon.
* godmode/agentes/manage_config_remote.php: A LOT of changes, rewriting
stuff, because was not working. This also adds a lot of ACL checks.
* godmode/agentes/massive_config.php, massive*: ACL changes.
* godmode/agentes/modificar_agente.php: Fixed ACL problems.
* godmode/agentes/module_manager_editor.php: Fixed bad module categories for
some types (data, plugin and prediction).
* godmode/alerts/alert_list.php: Fixed ACL problem.
* godmode/reporting/graph_builder.php: Added ACl restriction for
non-viewable agents for current user. Seems to be a problem with data
with more than 2 sources.
* godmode/reporting/map_builder.php: ACL checks improved.
* godmode/reporting/reporting_builder.php: ACL checks added (was missing),
some code ported from 2.1, other is new. New fields shown in list.
* include/functions.php: Fixed the annoying bug of "bad counters" in
function human_time_description_raw(). Function used,format_numeric() should
not be used never to calculate nothing, only to print formatted strings.
* include/functions_db.php: Added function user_access_to_agent() to know
if a given user has access to a given agent.
* include/functioins_report.php: get_report() should let admin to watch any
report. Fixed.
* agentes/alerts_status.php: Fixed ACL problem for view alert.
* operation/incidents/incident.php: Bad call for pagination() was giving
problems to pagination call. Somebody changes pagination() interface and
make this broken. Please if you change any interface, be sure that is compatible
with old code or make a post in the list about this !
* godmode/users/user_edit.php: Additional ACL check to do not let anybody
to watch non accesible users. Even for see the username or description.
* reporting/pchart_graph.php:Progress bar shown text in white when > 60%.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-02 21:16:59 +02:00
" Trying to access massive module update " );
2009-03-18 16:42:15 +01:00
require ( " general/noaccess.php " );
return ;
}
require_once ( 'include/functions_modules.php' );
* 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
require_once ( $config [ 'homedir' ] . " /include/functions_agents.php " );
require_once ( $config [ 'homedir' ] . " /include/functions_groups.php " );
require_once ( $config [ 'homedir' ] . '/include/functions_users.php' );
2013-07-25 13:00:22 +02:00
require_once ( $config [ 'homedir' ] . '/include/functions_categories.php' );
2009-03-18 16:42:15 +01:00
2009-03-23 16:22:19 +01:00
$module_type = ( int ) get_parameter ( 'module_type' );
2009-09-09 12:39:24 +02:00
$idGroupMassive = ( int ) get_parameter ( 'id_group_massive' );
$idAgentMassive = ( int ) get_parameter ( 'id_agent_massive' );
$group_select = get_parameter ( 'groups_select' );
2010-10-04 17:58:05 +02:00
$module_name = get_parameter ( 'module_name' );
2012-06-18 13:22:13 +02:00
$agents_select = get_parameter ( 'agents' , array ());
2010-10-04 17:58:05 +02:00
$agents_id = get_parameter ( 'id_agents' );
$modules_select = get_parameter ( 'module' );
$selection_mode = get_parameter ( 'selection_mode' , 'modules' );
2011-09-03 06:31:36 +02:00
$recursion = get_parameter ( 'recursion' );
2009-03-18 16:42:15 +01:00
$update = ( bool ) get_parameter_post ( 'update' );
2012-06-18 13:22:13 +02:00
if ( $update ) {
$agents_ = '' ;
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
if ( $selection_mode == 'modules' ) {
2010-10-04 17:58:05 +02:00
$force = get_parameter ( 'force_type' , false );
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
if ( $agents_select == false ) {
2010-10-04 17:58:05 +02:00
$agents_select = array ();
$agents_ = array ();
}
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
foreach ( $agents_select as $agent_name ) {
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.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/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.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/estado_agente.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/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.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
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.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/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/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.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_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/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.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.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
$agents_ [] = agents_get_agent_id ( $agent_name );
2010-10-04 17:58:05 +02:00
}
$modules_ = $module_name ;
}
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
else if ( $selection_mode == 'agents' ) {
2010-10-04 17:58:05 +02:00
$force = get_parameter ( 'force_group' , false );
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2010-10-04 17:58:05 +02:00
$agents_ = $agents_id ;
$modules_ = $modules_select ;
}
2009-05-29 12:32:26 +02:00
2010-10-04 17:58:05 +02:00
$success = 0 ;
$count = 0 ;
2009-05-29 12:32:26 +02:00
2015-07-06 11:49:48 +02:00
if ( $agents_ == false )
2010-10-04 17:58:05 +02:00
$agents_ = array ();
// If the option to select all of one group or module type is checked
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
if ( $force ) {
if ( $force == 'type' ) {
2015-07-06 11:49:48 +02:00
$type_condition = '' ;
2012-08-22 16:09:05 +02:00
if ( $module_type != 0 )
2015-07-06 11:49:48 +02:00
$type_condition = " AND tam.id_tipo_modulo = $module_type " ;
$sql = " SELECT ta.id_agente
FROM tagente ta
INNER JOIN tagente_modulo tam
ON ta . id_agente = tam . id_agente
AND tam . delete_pending = 0
$type_condition
GROUP BY ta . id_agente " ;
$agents_ = db_get_all_rows_sql ( $sql );
if ( $agents_ === false )
$agents_ = array ();
// Create an array of agent ids
$agents_ = extract_column ( $agents_ , 'id_agente' );
2012-08-22 16:09:05 +02:00
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
foreach ( $agents_ as $id_agent ) {
2015-07-06 11:49:48 +02:00
$filter = array (
'id_agente' => $id_agent ,
'delete_pending' => 0
);
if ( $module_type != 0 )
$filter [ 'id_tipo_modulo' ] = $module_type ;
2013-01-28 13:06:50 +01:00
2015-07-06 11:49:48 +02:00
$module_name = db_get_all_rows_filter ( 'tagente_modulo' , $filter , 'nombre' );
if ( $module_name === false )
2010-10-04 17:58:05 +02:00
$module_name = array ();
2015-07-06 11:49:48 +02:00
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
foreach ( $module_name as $mod_name ) {
2015-07-06 11:49:48 +02:00
$result = process_manage_edit ( $mod_name [ 'nombre' ], $id_agent );
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
$count ++ ;
2010-10-04 17:58:05 +02:00
$success += ( int ) $result ;
}
}
}
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
else if ( $force == 'group' ) {
2015-07-06 11:49:48 +02:00
$agents_ = array_keys ( agents_get_group_agents ( $group_select , false , 'none' ));
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
foreach ( $agents_ as $id_agent ) {
2015-07-07 17:38:24 +02:00
$filter = array (
'id_agente' => $id_agent ,
'delete_pending' => 0
);
2015-07-06 11:49:48 +02:00
$module_name = db_get_all_rows_filter ( 'tagente_modulo' , $filter , 'nombre' );
if ( $module_name === false )
2010-10-04 17:58:05 +02:00
$module_name = array ();
2015-07-06 11:49:48 +02:00
2010-10-04 17:58:05 +02:00
foreach ( $module_name as $mod_name ) {
2015-07-06 11:49:48 +02:00
$result = process_manage_edit ( $mod_name [ 'nombre' ], $id_agent );
$count ++ ;
2010-10-04 17:58:05 +02:00
$success += ( int ) $result ;
}
}
}
}
2015-07-06 11:49:48 +02:00
else {
// Standard procedure
foreach ( $agents_ as $agent_ ) {
if ( $modules_ == false )
$modules_ = array ();
foreach ( $modules_ as $module_ ) {
2015-07-07 17:38:24 +02:00
2015-11-16 15:52:11 +01:00
$result = process_manage_edit ( $module_ , $agent_ );
$count ++ ;
$success += ( int ) $result ;
2015-07-07 17:38:24 +02:00
2015-07-06 11:49:48 +02:00
}
2010-10-04 17:58:05 +02:00
}
}
2011-04-13 18:11:02 +02:00
ui_print_result_message ( $success > 0 ,
2015-07-06 11:49:48 +02:00
__ ( 'Successfully updated' ) . " ( " . $success . " / " . $count . " ) " ,
2010-10-04 17:58:05 +02:00
__ ( 'Could not be updated' ));
2010-10-29 Miguel de Dios <miguel.dedios@artica.es>
* extensions/dbmanager.php, godmode/agentes/module_manager_editor.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: now in the source code pick
more info in the audit for actions.
Pending tasks: #3089687
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3480 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-29 14:35:34 +02:00
2015-07-07 17:38:24 +02:00
$info = 'Modules: ' . json_encode ( $modules_ ) . ' Agents: ' . json_encode ( $agents_ );
2010-10-29 Miguel de Dios <miguel.dedios@artica.es>
* extensions/dbmanager.php, godmode/agentes/module_manager_editor.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: now in the source code pick
more info in the audit for actions.
Pending tasks: #3089687
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3480 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-29 14:35:34 +02:00
if ( $success > 0 ) {
2015-07-06 11:49:48 +02:00
db_pandora_audit ( " Massive management " , " Edit module " , false , false , $info );
2010-10-29 Miguel de Dios <miguel.dedios@artica.es>
* extensions/dbmanager.php, godmode/agentes/module_manager_editor.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: now in the source code pick
more info in the audit for actions.
Pending tasks: #3089687
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3480 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-29 14:35:34 +02:00
}
else {
2015-07-06 11:49:48 +02:00
db_pandora_audit ( " Massive management " , " Fail try to edit module " , false , false , $info );
2010-10-29 Miguel de Dios <miguel.dedios@artica.es>
* extensions/dbmanager.php, godmode/agentes/module_manager_editor.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: now in the source code pick
more info in the audit for actions.
Pending tasks: #3089687
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3480 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-29 14:35:34 +02:00
}
2009-03-18 16:42:15 +01:00
}
$table -> id = 'delete_table' ;
2015-06-15 15:50:28 +02:00
$table -> class = 'databox filters' ;
$table -> width = '100%' ;
2009-03-18 16:42:15 +01:00
$table -> data = array ();
$table -> style = array ();
2015-06-15 15:50:28 +02:00
$table -> style [ 0 ] = 'font-weight: bold;' ;
2009-03-18 16:42:15 +01:00
$table -> style [ 2 ] = 'font-weight: bold' ;
$table -> rowstyle = array ();
$table -> size = array ();
$table -> size [ 0 ] = '15%' ;
2011-09-03 06:31:36 +02:00
$table -> size [ 1 ] = '35%' ;
2009-03-18 16:42:15 +01:00
$table -> size [ 2 ] = '15%' ;
$table -> size [ 3 ] = '35%' ;
2009-03-23 16:22:19 +01:00
if ( ! $module_type ) {
$table -> rowstyle [ 'edit1' ] = 'display: none' ;
2016-10-14 10:16:21 +02:00
$table -> rowstyle [ 'edit0' ] = 'display: none' ;
2013-11-04 15:21:45 +01:00
$table -> rowstyle [ 'edit1_1' ] = 'display: none' ;
2009-03-23 16:22:19 +01:00
$table -> rowstyle [ 'edit2' ] = 'display: none' ;
2009-09-09 12:39:24 +02:00
$table -> rowstyle [ 'edit3' ] = 'display: none' ;
2011-04-14 16:51:46 +02:00
$table -> rowstyle [ 'edit35' ] = 'display: none' ;
2009-09-09 12:39:24 +02:00
$table -> rowstyle [ 'edit4' ] = 'display: none' ;
$table -> rowstyle [ 'edit5' ] = 'display: none' ;
2009-09-09 13:05:59 +02:00
$table -> rowstyle [ 'edit6' ] = 'display: none' ;
2009-09-09 13:23:19 +02:00
$table -> rowstyle [ 'edit7' ] = 'display: none' ;
2009-03-23 16:22:19 +01:00
}
2015-06-23 12:15:09 +02:00
$agents = agents_get_group_agents ( array_keys ( users_get_groups ()),
false , " none " );
2012-04-08 14:43:18 +02:00
switch ( $config [ " dbtype " ]) {
case " mysql " :
$module_types = db_get_all_rows_filter ( 'tagente_modulo,ttipo_modulo' ,
array ( 'tagente_modulo.id_tipo_modulo = ttipo_modulo.id_tipo' ,
'id_agente' => array_keys ( $agents ),
'disabled' => 0 ,
'order' => 'ttipo_modulo.nombre' ),
array ( 'DISTINCT(id_tipo)' ,
'CONCAT(ttipo_modulo.descripcion," (",ttipo_modulo.nombre,")") AS description' ));
break ;
2015-09-02 09:39:04 +02:00
case " oracle " :
$module_types = db_get_all_rows_filter ( 'tagente_modulo,ttipo_modulo' ,
array ( 'tagente_modulo.id_tipo_modulo = ttipo_modulo.id_tipo' ,
'id_agente' => array_keys ( $agents ),
'disabled' => 0 ,
'order' => 'ttipo_modulo.nombre' ),
array ( 'id_tipo' ,
'ttipo_modulo.descripcion || \' (\' || ttipo_modulo.nombre || \')\' AS description' ));
break ;
2012-04-08 14:43:18 +02:00
case " postgresql " :
$module_types = db_get_all_rows_filter ( 'tagente_modulo,ttipo_modulo' ,
array ( 'tagente_modulo.id_tipo_modulo = ttipo_modulo.id_tipo' ,
'id_agente' => array_keys ( $agents ),
'disabled' => 0 ,
'order' => 'description' ),
array ( 'DISTINCT(id_tipo)' ,
'ttipo_modulo.descripcion || \' (\' || ttipo_modulo.nombre || \')\' AS description' ));
break ;
}
2009-03-23 16:22:19 +01:00
if ( $module_types === false )
$module_types = array ();
$types = '' ;
foreach ( $module_types as $type ) {
$types [ $type [ 'id_tipo' ]] = $type [ 'description' ];
2009-03-18 16:42:15 +01:00
}
2011-04-14 16:51:46 +02:00
$snmp_versions [ '1' ] = 'v. 1' ;
$snmp_versions [ '2' ] = 'v. 2' ;
$snmp_versions [ '2c' ] = 'v. 2c' ;
$snmp_versions [ '3' ] = 'v. 3' ;
2015-04-10 09:43:44 +02:00
$table -> width = '100%' ;
2009-03-18 16:42:15 +01:00
$table -> data = array ();
2012-08-22 16:09:05 +02:00
2010-10-04 17:58:05 +02:00
2014-03-25 13:39:26 +01:00
$table -> data [ 'selection_mode' ][ 0 ] = __ ( 'Selection mode' );
2017-02-21 12:52:48 +01:00
$table -> data [ 'selection_mode' ][ 1 ] = '<span style="width:110px;display:inline-block;">' . __ ( 'Select modules first ' ) . '</span>' .
2017-02-17 12:08:07 +01:00
html_print_radio_button_extended ( " selection_mode " , 'modules' , '' , $selection_mode , false , '' , 'style="margin-right: 40px;"' , true ) . '<br>' ;
2017-02-21 12:52:48 +01:00
$table -> data [ 'selection_mode' ][ 1 ] .= '<span style="width:110px;display:inline-block;">' . __ ( 'Select agents first ' ) . '</span>' .
2014-03-25 13:39:26 +01:00
html_print_radio_button_extended ( " selection_mode " , 'agents' , '' , $selection_mode , false , '' , 'style="margin-right: 40px;"' , true );
$table -> rowclass [ 'form_modules_1' ] = 'select_modules_row' ;
$table -> data [ 'form_modules_1' ][ 0 ] = __ ( 'Module type' );
$table -> data [ 'form_modules_1' ][ 0 ] .= '<span id="module_loading" class="invisible">' ;
$table -> data [ 'form_modules_1' ][ 0 ] .= html_print_image ( 'images/spinner.png' , true );
$table -> data [ 'form_modules_1' ][ 0 ] .= '</span>' ;
2010-10-04 17:58:05 +02:00
$types [ 0 ] = __ ( 'All' );
2014-03-25 13:39:26 +01:00
$table -> colspan [ 'form_modules_1' ][ 1 ] = 2 ;
$table -> data [ 'form_modules_1' ][ 1 ] = html_print_select ( $types ,
2010-10-04 17:58:05 +02:00
'module_type' , '' , false , __ ( 'Select' ), - 1 , true , false , true );
2014-03-25 13:39:26 +01:00
$table -> data [ 'form_modules_1' ][ 3 ] = __ ( 'Select all modules of this type' ) . ' ' .
2015-06-23 12:15:09 +02:00
html_print_checkbox_extended ( " force_type " , 'type' , '' , '' , false ,
'' , 'style="margin-right: 40px;"' , true );
2009-03-23 16:22:19 +01:00
$modules = array ();
if ( $module_type != '' ) {
2009-09-08 17:38:43 +02:00
$filter = array ( 'id_tipo_modulo' => $module_type );
}
else {
$filter = false ;
}
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.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/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.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/estado_agente.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/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.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
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.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/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/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.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_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/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.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.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
$names = agents_get_modules ( array_keys ( $agents ),
2009-09-08 17:38:43 +02:00
'DISTINCT(nombre)' , $filter , false );
foreach ( $names as $name ) {
$modules [ $name [ 'nombre' ]] = $name [ 'nombre' ];
2009-03-23 16:22:19 +01:00
}
2009-09-08 17:38:43 +02:00
2014-03-25 13:39:26 +01:00
$table -> rowclass [ 'form_agents_1' ] = 'select_agents_row' ;
$table -> data [ 'form_agents_1' ][ 0 ] = __ ( 'Agent group' );
2011-04-27 15:43:31 +02:00
$groups = groups_get_all ( true );
2010-10-04 17:58:05 +02:00
$groups [ 0 ] = __ ( 'All' );
2014-03-25 13:39:26 +01:00
$table -> colspan [ 'form_agents_1' ][ 1 ] = 2 ;
2015-09-29 10:17:35 +02:00
$table -> data [ 'form_agents_1' ][ 1 ] = html_print_select_groups ( false , 'AW' , true , 'groups_select' ,
'' , false , '' , '' , true ) .
2014-03-25 13:39:26 +01:00
' ' . __ ( 'Group recursion' ) . ' ' .
html_print_checkbox ( " recursion " , 1 , false , true , false );
$table -> data [ 'form_agents_1' ][ 3 ] = __ ( 'Select all modules of this group' ) . ' ' .
2015-06-23 12:15:09 +02:00
html_print_checkbox_extended ( " force_group " , 'group' , '' , '' , false ,
'' , 'style="margin-right: 40px;"' , true );
2010-10-04 17:58:05 +02:00
2014-03-25 13:39:26 +01:00
2016-11-17 12:55:29 +01:00
$table -> rowclass [ 'form_modules_3' ] = '' ;
$table -> data [ 'form_modules_3' ][ 0 ] = __ ( 'Module Status' );
$table -> colspan [ 'form_modules_3' ][ 1 ] = 2 ;
$status_list = array ();
$status_list [ AGENT_MODULE_STATUS_NORMAL ] = __ ( 'Normal' );
$status_list [ AGENT_MODULE_STATUS_WARNING ] = __ ( 'Warning' );
$status_list [ AGENT_MODULE_STATUS_CRITICAL_BAD ] = __ ( 'Critical' );
$status_list [ AGENT_MODULE_STATUS_UNKNOWN ] = __ ( 'Unknown' );
$status_list [ AGENT_MODULE_STATUS_NOT_NORMAL ] = __ ( 'Not normal' );
$status_list [ AGENT_MODULE_STATUS_NOT_INIT ] = __ ( 'Not init' );
$table -> data [ 'form_modules_3' ][ 1 ] = html_print_select ( $status_list ,
'status_module' , 'selected' , '' , __ ( 'All' ), AGENT_MODULE_STATUS_ALL , true );
$table -> data [ 'form_modules_3' ][ 3 ] = '' ;
2014-03-25 13:39:26 +01:00
2017-05-16 16:37:48 +02:00
$tags = tags_get_user_tags ();
$table -> rowstyle [ 'form_modules_4' ] = 'vertical-align: top;' ;
$table -> rowclass [ 'form_modules_4' ] = 'select_modules_row select_modules_row_2' ;
$table -> data [ 'form_modules_4' ][ 0 ] = __ ( 'Tags' );
$table -> data [ 'form_modules_4' ][ 1 ] = html_print_select ( $tags , 'tags[]' ,
$tags_name , false , __ ( 'Any' ), - 1 , true , true , true );
2014-03-25 13:39:26 +01:00
$table -> rowstyle [ 'form_modules_2' ] = 'vertical-align: top;' ;
$table -> rowclass [ 'form_modules_2' ] = 'select_modules_row select_modules_row_2' ;
$table -> data [ 'form_modules_2' ][ 0 ] = __ ( 'Modules' );
$table -> data [ 'form_modules_2' ][ 1 ] = html_print_select ( $modules , 'module_name[]' ,
$module_name , false , __ ( 'Select' ), - 1 , true , true , true );
$table -> data [ 'form_modules_2' ][ 2 ] = __ ( 'When select modules' );
$table -> data [ 'form_modules_2' ][ 2 ] .= '<br>' ;
$table -> data [ 'form_modules_2' ][ 2 ] .= html_print_select (
2013-01-28 13:06:50 +01:00
array ( 'common' => __ ( 'Show common agents' ),
'all' => __ ( 'Show all agents' )),
'agents_selection_mode' ,
2012-04-03 18:33:38 +02:00
'common' , false , '' , '' , true );
2014-03-25 13:39:26 +01:00
$table -> data [ 'form_modules_2' ][ 3 ] = html_print_select ( array (), 'agents[]' ,
2010-10-04 17:58:05 +02:00
$agents_select , false , __ ( 'None' ), 0 , true , true , false );
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php,
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
operation/tree.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php,
operation/agentes/datos_agente.php,
operation/agentes/alerts_status.php, operation/menu.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/servers/manage_recontask.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
godmode/setup/os.php, godmode/users/configure_profile.php,
godmode/events/events.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/graph_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_menu.php, include/functions_visual_map.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
2014-03-25 13:39:26 +01:00
$table -> rowclass [ 'form_agents_2' ] = 'select_agents_row' ;
2016-11-17 12:55:29 +01:00
$table -> data [ 'form_agents_2' ][ 0 ] = __ ( 'Agent Status' );
2014-03-25 13:39:26 +01:00
$table -> colspan [ 'form_agents_2' ][ 1 ] = 2 ;
$status_list = array ();
2015-06-08 13:13:09 +02:00
$status_list [ AGENT_STATUS_NORMAL ] = __ ( 'Normal' );
2014-03-25 13:39:26 +01:00
$status_list [ AGENT_STATUS_WARNING ] = __ ( 'Warning' );
$status_list [ AGENT_STATUS_CRITICAL ] = __ ( 'Critical' );
$status_list [ AGENT_STATUS_UNKNOWN ] = __ ( 'Unknown' );
2015-06-08 13:13:09 +02:00
$status_list [ AGENT_STATUS_NOT_NORMAL ] = __ ( 'Not normal' );
2014-03-25 13:39:26 +01:00
$status_list [ AGENT_STATUS_NOT_INIT ] = __ ( 'Not init' );
$table -> data [ 'form_agents_2' ][ 1 ] = html_print_select ( $status_list ,
'status_agents' , 'selected' , '' , __ ( 'All' ), AGENT_STATUS_ALL , true );
$table -> data [ 'form_agents_2' ][ 3 ] = '' ;
$table -> rowstyle [ 'form_agents_3' ] = 'vertical-align: top;' ;
$table -> rowclass [ 'form_agents_3' ] = 'select_agents_row select_agents_row_2' ;
$table -> data [ 'form_agents_3' ][ 0 ] = __ ( 'Agents' );
$table -> data [ 'form_agents_3' ][ 1 ] = html_print_select ( $agents , 'id_agents[]' ,
2010-10-04 17:58:05 +02:00
$agents_id , false , '' , '' , true , true , false );
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php,
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
operation/tree.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php,
operation/agentes/datos_agente.php,
operation/agentes/alerts_status.php, operation/menu.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/servers/manage_recontask.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
godmode/setup/os.php, godmode/users/configure_profile.php,
godmode/events/events.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/graph_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_menu.php, include/functions_visual_map.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
2014-03-25 13:39:26 +01:00
$table -> data [ 'form_agents_3' ][ 2 ] = __ ( 'When select agents' );
$table -> data [ 'form_agents_3' ][ 2 ] .= '<br>' ;
$table -> data [ 'form_agents_3' ][ 2 ] .= html_print_select (
2013-01-28 13:06:50 +01:00
array ( 'common' => __ ( 'Show common modules' ),
2016-06-29 10:41:34 +02:00
'all' => __ ( 'Show all modules' ), 'unknown' => __ ( 'Show unknown and not init modules' )),
2013-01-28 13:06:50 +01:00
'modules_selection_mode' ,
2012-04-03 18:33:38 +02:00
'common' , false , '' , '' , true );
2014-03-25 13:39:26 +01:00
$table -> data [ 'form_agents_3' ][ 3 ] = html_print_select ( array (), 'module[]' ,
2010-10-04 17:58:05 +02:00
$modules_select , false , '' , '' , true , true , false );
2009-09-09 12:39:24 +02:00
2016-10-14 10:16:21 +02:00
$table -> data [ 'edit0' ][ 0 ] = __ ( 'Dynamic Interval' );
$table -> data [ 'edit0' ][ 1 ] = html_print_extended_select_for_time ( 'dynamic_interval' , '' , '' , 'None' , '0' , 10 , true , 'width:150px' , false );
$table -> data [ 'edit0' ][ 2 ] = '<table width="100%"><tr><td><em>' . __ ( 'Dynamic Min.' ) . '</em></td>' ;
$table -> data [ 'edit0' ][ 2 ] .= '<td align="right">' .
html_print_input_text ( 'dynamic_min' , '' , '' , 10 , 255 , true ) . '</td></tr>' ;
$table -> data [ 'edit0' ][ 2 ] .= '<tr><td><em>' . __ ( 'Dynamic Max.' ) . '</em></td>' ;
$table -> data [ 'edit0' ][ 2 ] .= '<td align="right">' .
html_print_input_text ( 'dynamic_max' , '' , '' , 10 , 255 , true ) . '</td></tr></table>' ;
$table -> data [ 'edit0' ][ 3 ] = __ ( 'Dynamic Two Tailed: ' );
$table -> data [ 'edit0' ][ 3 ] .= html_print_checkbox ( " dynamic_two_tailed " , 1 , '' , true );
2014-03-25 13:39:26 +01:00
2009-03-18 16:42:15 +01:00
$table -> data [ 'edit1' ][ 0 ] = __ ( 'Warning status' );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] = '<table width="100%">' ;
$table -> data [ 'edit1' ][ 1 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<em>' . __ ( 'Min.' ) . '</em>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td align="right">' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 1 ] .= html_print_input_text (
2016-08-25 11:49:23 +02:00
'min_warning' , '' , '' , 5 , 255 , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<em>' . __ ( 'Max.' ) . '</em>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td align="right">' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 1 ] .= html_print_input_text (
2016-08-25 11:49:23 +02:00
'max_warning' , '' , '' , 5 , 255 , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td>' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 1 ] .= '<em>' . __ ( 'Str.' ) . '</em>' ;
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td align="right">' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 1 ] .= html_print_input_text (
2016-08-25 11:49:23 +02:00
'str_warning' , '' , '' , 5 , 255 , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td>' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 1 ] .= '<em>' .
__ ( 'Inverse interval' ) . '</em>' ;
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '<td align="right">' ;
2015-02-25 11:39:28 +01:00
$table -> data [ 'edit1' ][ 1 ] .=
html_print_select (
2015-06-23 12:15:09 +02:00
array (
'' => __ ( 'No change' ),
2015-02-25 11:39:28 +01:00
'1' => __ ( 'Yes' ),
'0' => __ ( 'No' )),
'warning_inverse' , '' , '' , '' , '' , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 1 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 1 ] .= '</table>' ;
2012-09-17 Ramon Novoa <rnovoa@artica.es>
* include/javascript/pandora_modules.js,
include/functions_network_components.php,
pandoradb.sql,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added inverse intervals for
warning and critical limits.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6977 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-17 16:29:45 +02:00
2009-03-18 16:42:15 +01:00
$table -> data [ 'edit1' ][ 2 ] = __ ( 'Critical status' );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 3 ] = '<table width="100%">' ;
$table -> data [ 'edit1' ][ 3 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<em>' . __ ( 'Min.' ) . '</em>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td align="right">' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 3 ] .= html_print_input_text (
2016-08-25 11:49:23 +02:00
'min_critical' , '' , '' , 5 , 255 , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<em>' . __ ( 'Max.' ) . '</em>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td align="right">' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 3 ] .= html_print_input_text (
2016-08-25 11:49:23 +02:00
'max_critical' , '' , '' , 5 , 255 , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<em>' . __ ( 'Str.' ) . '</em>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td align="right">' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 3 ] .= html_print_input_text (
2016-08-25 11:49:23 +02:00
'str_critical' , '' , '' , 5 , 255 , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td>' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1' ][ 3 ] .= '<em>' .
__ ( 'Inverse interval' ) . '</em>' ;
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '<td align="right">' ;
2015-02-25 11:39:28 +01:00
$table -> data [ 'edit1' ][ 3 ] .=
html_print_select (
array ( '' => __ ( 'No change' ),
'1' => __ ( 'Yes' ),
'0' => __ ( 'No' )),
'critical_inverse' , '' , '' , '' , '' , true );
2013-02-25 11:29:52 +01:00
$table -> data [ 'edit1' ][ 3 ] .= '</td>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</tr>' ;
$table -> data [ 'edit1' ][ 3 ] .= '</table>' ;
2009-03-18 16:42:15 +01:00
2013-11-04 15:21:45 +01:00
$table -> data [ 'edit1_1' ][ 0 ] = '<b>' . __ ( 'Description' ) . '</b>' ;
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit1_1' ][ 1 ] = html_print_textarea ( 'descripcion' , 2 , 50 ,
'' , '' , true );
2013-11-04 15:21:45 +01:00
$table -> colspan [ 'edit1_1' ][ 1 ] = 3 ;
2009-09-09 12:39:24 +02:00
$table -> data [ 'edit2' ][ 0 ] = __ ( 'Interval' );
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit2' ][ 1 ] = html_print_extended_select_for_time (
'module_interval' , 0 , '' , __ ( 'No change' ), '0' , 10 , true , 'width: 150px' );
2009-09-09 12:39:24 +02:00
$table -> data [ 'edit2' ][ 2 ] = __ ( 'Disabled' );
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit2' ][ 3 ] = html_print_select (
array (
'' => __ ( 'No change' ),
'1' => __ ( 'Yes' ),
'0' => __ ( 'No' )),
'disabled' , '' , '' , '' , '' , true );
2009-09-09 12:39:24 +02:00
2015-02-09 19:34:36 +01:00
$table -> data [ 'edit3' ][ 0 ] = __ ( 'Post process' ) .
ui_print_help_icon ( 'postprocess' , true );
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit3' ][ 1 ] = html_print_input_text ( 'post_process' , '' ,
'' , 10 , 15 , true );
2009-09-09 12:39:24 +02:00
$table -> data [ 'edit3' ][ 2 ] = __ ( 'SMNP community' );
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit3' ][ 3 ] = html_print_input_text ( 'snmp_community' , '' ,
'' , 10 , 15 , true );
2015-02-09 19:34:36 +01:00
2017-01-17 09:21:46 +01:00
$target_ip_values = array ();
$target_ip_values [ 'auto' ] = __ ( 'Auto' );
$target_ip_values [ 'force_pri' ] = __ ( 'Force primary key' );
$target_ip_values [ 'custom' ] = __ ( 'Custom' );
2013-09-02 16:02:37 +02:00
$table -> data [ 'edit35' ][ 0 ] = __ ( 'Target IP' );
2017-01-17 09:21:46 +01:00
$table -> data [ 'edit35' ][ 1 ] = html_print_select ( $target_ip_values ,
'ip_target' , '' , '' , __ ( 'No change' ), '' , true , false , false , '' , false , 'width:200px;' );
$table -> data [ 'edit35' ][ 1 ] .= html_print_input_text ( 'custom_ip_target' , '' , '' , 15 , 60 , true );
2011-04-14 16:51:46 +02:00
$table -> data [ 'edit35' ][ 2 ] = __ ( 'SNMP version' );
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit35' ][ 3 ] = html_print_select ( $snmp_versions ,
'tcp_send' , '' , '' , __ ( 'No change' ), '' , true , false , false , '' );
2012-04-04 14:58:46 +02:00
$table -> data [ 'edit36' ][ 0 ] = __ ( 'Auth user' );
2015-06-23 12:15:09 +02:00
$table -> data [ 'edit36' ][ 1 ] = html_print_input_text ( 'plugin_user_snmp' ,
'' , '' , 15 , 60 , true );
$table -> data [ 'edit36' ][ 2 ] = __ ( 'Auth password' ) .
ui_print_help_tip ( __ ( " The pass length must be eight character minimum. " ), true );
2012-04-04 14:58:46 +02:00
$table -> data [ 'edit36' ][ 3 ] = html_print_input_text ( 'plugin_pass_snmp' , '' , '' , 15 , 60 , true );
$table -> data [ 'edit37' ][ 0 ] = __ ( 'Privacy method' );
$table -> data [ 'edit37' ][ 1 ] = html_print_select ( array ( 'DES' => __ ( 'DES' ), 'AES' => __ ( 'AES' )), 'custom_string_1' , '' , '' , __ ( 'No change' ), '' , true );
$table -> data [ 'edit37' ][ 2 ] = __ ( 'Privacy pass' ) . ui_print_help_tip ( __ ( " The pass length must be eight character minimum. " ), true );
$table -> data [ 'edit37' ][ 3 ] = html_print_input_text ( 'custom_string_2' , '' , '' , 15 , 60 , true );
$table -> data [ 'edit38' ][ 0 ] = __ ( 'Auth method' );
$table -> data [ 'edit38' ][ 1 ] = html_print_select ( array ( 'MD5' => __ ( 'MD5' ), 'SHA' => __ ( 'SHA' )), 'plugin_parameter' , '' , '' , __ ( 'No change' ), '' , true );
$table -> data [ 'edit38' ][ 2 ] = __ ( 'Security level' );
$table -> data [ 'edit38' ][ 3 ] = html_print_select ( array ( 'noAuthNoPriv' => __ ( 'Not auth and not privacy method' ),
'authNoPriv' => __ ( 'Auth and not privacy method' ), 'authPriv' => __ ( 'Auth and privacy method' )), 'custom_string_3' , '' , '' , __ ( 'No change' ), '' , true );
2009-09-09 12:39:24 +02:00
$table -> data [ 'edit4' ][ 0 ] = __ ( 'Value' );
$table -> data [ 'edit4' ][ 1 ] = '<em>' . __ ( 'Min.' ) . '</em>' ;
2011-04-27 15:43:31 +02:00
$table -> data [ 'edit4' ][ 1 ] .= html_print_input_text ( 'min' , '' , '' , 5 , 15 , true );
2009-09-09 12:39:24 +02:00
$table -> data [ 'edit4' ][ 1 ] .= '<br /><em>' . __ ( 'Max.' ) . '</em>' ;
2011-04-27 15:43:31 +02:00
$table -> data [ 'edit4' ][ 1 ] .= html_print_input_text ( 'max' , '' , '' , 5 , 15 , true );
2009-09-18 17:14:44 +02:00
$table -> data [ 'edit4' ][ 2 ] = __ ( 'Module group' );
2013-01-10 13:18:13 +01:00
// Create module groups values for select
$module_groups = modules_get_modulegroups ();
$module_groups [ 0 ] = __ ( 'Not assigned' );
2011-11-30 10:38:35 +01:00
$table -> data [ 'edit4' ][ 3 ] = html_print_select ( $module_groups ,
'id_module_group' , '' , '' , __ ( 'No change' ), '' , true , false , false );
2009-09-09 12:39:24 +02:00
2009-09-09 13:05:59 +02:00
$table -> data [ 'edit5' ][ 0 ] = __ ( 'Username' );
2011-04-27 15:43:31 +02:00
$table -> data [ 'edit5' ][ 1 ] = html_print_input_text ( 'plugin_user' , '' , '' , 15 , 60 , true );
2009-09-09 13:05:59 +02:00
$table -> data [ 'edit5' ][ 2 ] = __ ( 'Password' );
2011-04-27 15:43:31 +02:00
$table -> data [ 'edit5' ][ 3 ] = html_print_input_password ( 'plugin_pass' , '' , '' , 15 , 60 , true );
2009-09-09 13:05:59 +02:00
2012-02-02 17:54:46 +01:00
// Export target
2009-09-09 13:23:19 +02:00
$table -> data [ 'edit6' ][ 0 ] = __ ( 'Export target' );
2012-02-02 17:54:46 +01:00
$targets2 = db_get_all_rows_sql ( " SELECT id, name FROM tserver_export ORDER by name " );
2012-06-01 13:12:39 +02:00
if ( $targets2 === false )
$targets2 = array ();
2012-02-02 17:54:46 +01:00
$targets = array_merge ( array ( 0 => __ ( 'None' )), $targets2 );
$table -> data [ 'edit6' ][ 1 ] = html_print_select ( $targets , 'id_export' , '' , '' , __ ( 'No change' ), '' , true , false , false );
2012-06-01 09:49:08 +02:00
$table -> data [ 'edit6' ][ 2 ] = __ ( 'Unit' );
$table -> data [ 'edit6' ][ 3 ] = html_print_input_text ( 'unit' , '' , '' , 15 , 60 , true );
2009-09-09 13:05:59 +02:00
2009-03-18 16:42:15 +01:00
/* FF stands for Flip-flop */
2011-04-13 18:11:02 +02:00
$table -> data [ 'edit7' ][ 0 ] = __ ( 'FF threshold' ) . ' ' . ui_print_help_icon ( 'ff_threshold' , true );
2014-05-25 08:35:37 +02:00
$table -> colspan [ 'edit7' ][ 1 ] = 3 ;
$table -> data [ 'edit7' ][ 1 ] = __ ( 'Mode' ) . ' ' . html_print_select ( array ( '' => __ ( 'No change' ), '1' => __ ( 'Each state changing' ), '0' => __ ( 'All state changing' )), 'each_ff' , '' , '' , '' , '' , true ) . '<br />' ;
$table -> data [ 'edit7' ][ 1 ] .= __ ( 'All state changing' ) . ' : ' . html_print_input_text ( 'min_ff_event' , '' , '' , 5 , 15 , true ) . '<br />' ;
$table -> data [ 'edit7' ][ 1 ] .= __ ( 'Each state changing' ) . ' : ' ;
$table -> data [ 'edit7' ][ 1 ] .= __ ( 'To normal' ) . html_print_input_text ( 'min_ff_event_normal' , '' , '' , 5 , 15 , true ) . ' ' ;
$table -> data [ 'edit7' ][ 1 ] .= __ ( 'To warning' ) . html_print_input_text ( 'min_ff_event_warning' , '' , '' , 5 , 15 , true ) . ' ' ;
$table -> data [ 'edit7' ][ 1 ] .= __ ( 'To critical' ) . html_print_input_text ( 'min_ff_event_critical' , '' , '' , 5 , 15 , true ) . ' ' ;
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit8' ][ 0 ] = __ ( 'FF interval' );
$table -> data [ 'edit8' ][ 1 ] = html_print_input_text ( 'module_ff_interval' , '' , '' , 5 , 10 , true ) . ui_print_help_tip ( __ ( 'Module execution flip flop time interval (in secs).' ), true );
$table -> data [ 'edit8' ][ 2 ] = __ ( 'FF timeout' );
$table -> data [ 'edit8' ][ 3 ] = html_print_input_text ( 'ff_timeout' , '' , '' , 5 , 10 , true ) . ui_print_help_tip ( __ ( 'Timeout in secs from start of flip flop counting. If this value is exceeded, FF counter is reset. Set to 0 for no timeout.' ), true );
$table -> data [ 'edit9' ][ 0 ] = __ ( 'Historical data' );
$table -> data [ 'edit9' ][ 1 ] = html_print_select ( array ( '' => __ ( 'No change' ), '1' => __ ( 'Yes' ), '0' => __ ( 'No' )), 'history_data' , '' , '' , '' , '' , true );
2009-03-18 16:42:15 +01:00
2011-06-08 10:49:34 +02:00
/* Tags avalaible */
$id_tag = array ();
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit10' ][ 0 ] = __ ( 'Tags' );
$table -> data [ 'edit10' ][ 1 ] = html_print_select_from_sql ( 'SELECT id_tag, name FROM ttag ORDER BY name' ,
2011-06-08 10:49:34 +02:00
'id_tag[]' , $id_tag , '' , __ ( 'None' ), '0' , true , true , false , false );
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit10' ][ 2 ] = __ ( 'Category' );
$table -> data [ 'edit10' ][ 3 ] = html_print_select ( categories_get_all_categories ( 'forselect' ), 'id_category' , '' , '' , __ ( 'No change' ), '' , true , false , false );
2013-07-25 13:00:22 +02:00
2013-08-06 14:53:39 +02:00
if ( enterprise_installed ()) {
2014-06-01 04:25:20 +02:00
$table -> rowspan [ 'edit10' ][ 0 ] = $table -> rowspan [ 'edit10' ][ 1 ] = 2 ;
2013-08-06 14:53:39 +02:00
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit101' ][ 2 ] = __ ( 'Policy linking status' ) . ui_print_help_tip ( __ ( " This field only has sense in modules adopted by a policy. " ), true );
$table -> data [ 'edit101' ][ 3 ] = html_print_select ( array ( MODULE_PENDING_LINK => __ ( 'Linked' ), MODULE_PENDING_UNLINK => __ ( 'Unlinked' )), 'policy_linked' , '' , '' , __ ( 'No change' ), '' , true , false , false );
2013-07-25 13:00:22 +02:00
}
2011-06-08 10:49:34 +02:00
2014-06-01 04:25:20 +02:00
if ( $table -> rowspan [ 'edit10' ][ 0 ] == 2 ) {
$table -> rowspan [ 'edit10' ][ 0 ] = $table -> rowspan [ 'edit10' ][ 1 ] = 3 ;
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
}
else {
2014-06-01 04:25:20 +02:00
$table -> rowspan [ 'edit10' ][ 0 ] = $table -> rowspan [ 'edit10' ][ 1 ] = 2 ;
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
}
2016-11-30 13:05:37 +01:00
$table -> data [ 'edit102' ][ 2 ] = __ ( 'Discard unknown events' );
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit102' ][ 3 ] = html_print_select (
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
array ( '' => __ ( 'No change' ),
'1' => __ ( 'Yes' ),
'0' => __ ( 'No' )),
'throw_unknown_events' , '' , '' , '' , '' , true );
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit12' ][ 0 ] = '<b>' . __ ( 'Critical instructions' ) . '</b>' . ui_print_help_tip ( __ ( " Instructions when the status is critical " ), true );
$table -> data [ 'edit12' ][ 1 ] = html_print_textarea ( 'critical_instructions' , 2 , 50 , '' , '' , true );
2012-09-17 18:03:38 +02:00
$table -> colspan [ 'edit12' ][ 1 ] = 3 ;
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit13' ][ 0 ] = '<b>' . __ ( 'Warning instructions' ) . '</b>' . ui_print_help_tip ( __ ( " Instructions when the status is warning " ), true );
$table -> data [ 'edit13' ][ 1 ] = html_print_textarea ( 'warning_instructions' , 2 , 50 , '' , '' , true );
2014-05-25 08:35:37 +02:00
$table -> colspan [ 'edit13' ][ 1 ] = 3 ;
2014-06-01 04:25:20 +02:00
$table -> data [ 'edit14' ][ 0 ] = '<b>' . __ ( 'Unknown instructions' ) . '</b>' . ui_print_help_tip ( __ ( " Instructions when the status is unknown " ), true );
$table -> data [ 'edit14' ][ 1 ] = html_print_textarea ( 'unknown_instructions' , 2 , 50 , '' , '' , true );
$table -> colspan [ 'edit14' ][ 1 ] = 3 ;
$table -> data [ 'edit11' ][ 0 ] = __ ( 'Quiet' );
$table -> data [ 'edit11' ][ 0 ] .= ui_print_help_tip ( __ ( 'The module still store data but the alerts and events will be stop' ), true );
$table -> data [ 'edit11' ][ 1 ] = html_print_select ( array ( - 1 => __ ( 'No change' ),
2012-08-22 16:09:05 +02:00
1 => __ ( 'Yes' ), 0 => __ ( 'No' )),
" quiet_select " , - 1 , " " , '' , 0 , true );
2014-09-15 11:45:05 +02:00
$table -> data [ 'edit11' ][ 2 ] = __ ( 'Timeout' );
$table -> data [ 'edit11' ][ 3 ] = html_print_input_text (
'max_timeout' , '' , '' , 5 , 10 , true ) . ' ' .
ui_print_help_tip (
__ ( 'Seconds that agent will wait for the execution of the module.' ), true );
2012-08-22 16:09:05 +02:00
2015-02-04 11:18:34 +01:00
echo '<form method="post" ' .
'action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" ' .
'id="form_edit">' ;
2011-04-27 15:43:31 +02:00
html_print_table ( $table );
2009-03-18 16:42:15 +01:00
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
echo '<div class="action-buttons" style="width: ' . $table -> width . '">' ;
2011-04-27 15:43:31 +02:00
html_print_input_hidden ( 'update' , 1 );
html_print_submit_button ( __ ( 'Update' ), 'go' , false , 'class="sub upd"' );
2009-03-18 16:42:15 +01:00
echo '</div>' ;
echo '</form>' ;
echo '<h3 class="error invisible" id="message"> </h3>' ;
2010-10-04 17:58:05 +02:00
//Hack to translate text "none" in PHP to javascript
echo '<span id ="none_text" style="display: none;">' . __ ( 'None' ) . '</span>' ;
2011-04-13 18:11:02 +02:00
ui_require_jquery_file ( 'pandora.controls' );
2010-10-04 17:58:05 +02:00
2013-01-28 15:38:34 +01:00
if ( $selection_mode == 'modules' ) {
2010-10-04 17:58:05 +02:00
$modules_row = '' ;
$agents_row = 'none' ;
}
else {
$modules_row = 'none' ;
$agents_row = '' ;
}
2010-10-19 13:04:20 +02:00
2009-03-18 16:42:15 +01:00
?>
< script type = " text/javascript " >
/* <![CDATA[ */
2015-02-04 11:18:34 +01:00
var limit_parameters_massive = < ? php echo $config [ 'limit_parameters_massive' ]; ?> ;
2009-03-18 16:42:15 +01:00
$ ( document ) . ready ( function () {
2015-02-04 11:18:34 +01:00
$ ( " #form_edit " ) . submit ( function () {
var get_parameters_count = window . location . href . slice (
window . location . href . indexOf ( '?' ) + 1 ) . split ( '&' ) . length ;
var post_parameters_count = $ ( " #form_edit " ) . serializeArray () . length ;
var count_parameters =
get_parameters_count + post_parameters_count ;
if ( count_parameters > limit_parameters_massive ) {
alert ( " <?php echo __('Unsucessful sending the data, please contact with your administrator or make with less elements.'); ?> " );
return false ;
}
});
2017-01-17 09:21:46 +01:00
$ ( " #text-custom_ip_target " ) . hide ();
2015-02-04 11:18:34 +01:00
2010-10-04 17:58:05 +02:00
$ ( " #id_agents " ) . change ( agent_changed_by_multiple_agents );
$ ( " #module_name " ) . change ( module_changed_by_multiple_modules );
clean_lists ();
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2017-05-16 16:37:48 +02:00
2010-10-04 17:58:05 +02:00
$ ( " .select_modules_row " ) . css ( 'display' , '<?php echo $modules_row?>' );
$ ( " .select_agents_row " ) . css ( 'display' , '<?php echo $agents_row?>' );
2017-05-16 16:37:48 +02:00
$ ( " .select_modules_row_2 " ) . css ( 'display' , 'none' );
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2012-04-03 18:33:38 +02:00
// Trigger change to refresh selection when change selection mode
$ ( " #agents_selection_mode " ) . change ( function () {
$ ( " #module_name " ) . trigger ( 'change' );
});
$ ( " #modules_selection_mode " ) . change ( function () {
$ ( " #id_agents " ) . trigger ( 'change' );
});
2009-03-23 16:22:19 +01:00
$ ( " #module_type " ) . change ( function () {
2012-04-03 18:33:38 +02:00
$ ( 'input[type=checkbox]' ) . attr ( 'checked' , false );
2010-10-04 17:58:05 +02:00
if ( this . value < 0 ) {
clean_lists ();
$ ( " .select_modules_row_2 " ) . css ( 'display' , 'none' );
return ;
}
else {
$ ( " #module " ) . html ( '<?php echo __(' None '); ?>' );
$ ( " #module_name " ) . html ( '' );
2012-03-09 12:47:56 +01:00
$ ( 'input[type=checkbox]' ) . removeAttr ( 'disabled' );
2010-10-04 17:58:05 +02:00
$ ( " .select_modules_row_2 " ) . css ( 'display' , '' );
}
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . hide ();
2010-10-04 17:58:05 +02:00
2015-08-04 12:49:21 +02:00
var params = {
" page " : " operation/agentes/ver_agente " ,
" get_agent_modules_json " : 1 ,
2017-05-17 09:59:10 +02:00
" get_id_and_name " : 1 ,
2015-08-04 12:49:21 +02:00
" indexed " : 0
};
if ( this . value != '0' )
params [ 'id_tipo_modulo' ] = this . value ;
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2016-11-17 12:55:29 +01:00
var status_module = $ ( '#status_module' ) . val ();
if ( status_module != '-1' )
params [ 'status_module' ] = status_module ;
2017-05-16 16:37:48 +02:00
var tags_to_search = $ ( '#tags' ) . val ();
if ( tags_to_search != null ) {
if ( tags_to_search [ 0 ] != - 1 ) {
params [ 'tags' ] = tags_to_search ;
}
}
2016-11-17 12:55:29 +01:00
2009-03-23 16:22:19 +01:00
$ ( " #module_loading " ) . show ();
2016-10-14 10:16:21 +02:00
$ ( " tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2 " ) . hide ();
2009-03-23 16:22:19 +01:00
$ ( " #module_name " ) . attr ( " disabled " , " disabled " )
$ ( " #module_name option[value!=0] " ) . remove ();
jQuery . post ( " ajax.php " ,
2015-08-04 12:49:21 +02:00
params ,
2009-03-23 16:22:19 +01:00
function ( data , status ) {
jQuery . each ( data , function ( id , value ) {
option = $ ( " <option></option> " ) . attr ( " value " , value [ " nombre " ]) . html ( value [ " nombre " ]);
$ ( " #module_name " ) . append ( option );
});
$ ( " #module_loading " ) . hide ();
$ ( " #module_name " ) . removeAttr ( " disabled " );
},
" json "
);
});
2010-10-04 17:58:05 +02:00
function show_form () {
2013-08-27 11:29:36 +02:00
$ ( " td#delete_table-0-1, " +
" td#delete_table-edit1-1, " +
" td#delete_table-edit2-1 " ) . css ( " width " , " 300px " );
2009-03-18 16:42:15 +01:00
$ ( " #form_edit input[type=text] " ) . attr ( " value " , " " );
2011-09-03 06:31:36 +02:00
$ ( " #form_edit input[type=checkbox] " ) . not ( " #checkbox-recursion " ) . removeAttr ( " checked " );
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . show ();
2010-10-04 17:58:05 +02:00
}
function clean_lists () {
$ ( " #id_agents " ) . html ( '<?php echo __(' None '); ?>' );
$ ( " #module_name " ) . html ( '<?php echo __(' None '); ?>' );
$ ( " #agents " ) . html ( '<?php echo __(' None '); ?>' );
$ ( " #module " ) . html ( '<?php echo __(' None '); ?>' );
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit36, " +
" tr#delete_table-edit37, " +
" tr#delete_table-edit38, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . hide ();
2010-10-04 17:58:05 +02:00
$ ( 'input[type=checkbox]' ) . attr ( 'checked' , false );
$ ( 'input[type=checkbox]' ) . attr ( 'disabled' , true );
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
2010-10-04 17:58:05 +02:00
$ ( '#module_type' ) . val ( - 1 );
$ ( '#groups_select' ) . val ( - 1 );
}
$ ( 'input[type=checkbox]' ) . change (
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
function () {
2013-01-28 15:38:34 +01:00
if ( this . id == " checkbox-force_type " ) {
if ( this . checked ) {
2010-10-04 17:58:05 +02:00
$ ( " .select_modules_row_2 " ) . css ( 'display' , 'none' );
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit8, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit9, " +
" tr#delete_table-edit10 " ) . show ();
2010-10-04 17:58:05 +02:00
}
else {
$ ( " .select_modules_row_2 " ) . css ( 'display' , '' );
2013-01-28 15:38:34 +01:00
if ( $ ( '#module_name option:selected' ) . val () == undefined ) {
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . hide ();
2010-10-04 17:58:05 +02:00
}
}
}
2013-01-28 15:38:34 +01:00
else if ( this . id == " checkbox-recursion " ) {
2012-06-01 13:12:39 +02:00
$ ( " #checkbox-force_group " ) . attr ( " checked " , false );
2011-09-03 06:31:36 +02:00
$ ( " #groups_select " ) . trigger ( " change " );
}
2013-01-28 15:38:34 +01:00
else if ( this . id == " checkbox-warning_inverse " ) {
return ; //Do none
}
else if ( this . id == " checkbox-critical_inverse " ) {
return ; //Do none
}
2016-10-14 10:16:21 +02:00
else if ( this . id == " checkbox-dynamic_two_tailed " ) {
return ; //Do none
}
2010-10-04 17:58:05 +02:00
else {
2012-06-01 13:12:39 +02:00
if ( this . id == " checkbox-force_group " ) {
$ ( " #checkbox-recursion " ) . attr ( " checked " , false );
}
2013-01-28 15:38:34 +01:00
if ( this . checked ) {
2010-10-04 17:58:05 +02:00
$ ( " .select_agents_row_2 " ) . css ( 'display' , 'none' );
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . show ();
2010-10-04 17:58:05 +02:00
}
else {
$ ( " .select_agents_row_2 " ) . css ( 'display' , '' );
2013-01-28 15:38:34 +01:00
if ( $ ( '#id_agents option:selected' ) . val () == undefined ) {
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . hide ();
2012-03-09 12:47:56 +01:00
}
2010-10-04 17:58:05 +02:00
}
}
}
);
$ ( " #module_name " ) . change ( show_form );
$ ( " #id_agents " ) . change ( show_form );
$ ( " #form_edit input[name=selection_mode] " ) . change ( function () {
2016-11-17 12:55:29 +01:00
selector = $ ( " #form_edit input[name=selection_mode]:checked " ) . val ();
2010-10-04 17:58:05 +02:00
clean_lists ();
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2010-10-04 17:58:05 +02:00
if ( selector == 'agents' ) {
2016-08-17 10:27:55 +02:00
$ ( " .select_modules_row " ) . hide ();
$ ( " .select_agents_row " ) . show ();
$ ( " #groups_select " ) . trigger ( " change " );
2010-10-04 17:58:05 +02:00
}
else if ( selector == 'modules' ) {
2016-08-17 10:27:55 +02:00
$ ( " .select_agents_row " ) . hide ();
$ ( " .select_modules_row " ) . show ();
2017-05-16 16:37:48 +02:00
$ ( " #module_type " ) . trigger ( " change " );
2010-10-04 17:58:05 +02:00
}
2009-03-18 16:42:15 +01:00
});
2009-09-09 12:39:24 +02:00
2012-04-04 14:58:46 +02:00
$ ( '#tcp_send' ) . change ( function () {
if ( $ ( this ) . val () == 3 ) {
$ ( " tr#delete_table-edit36, tr#delete_table-edit37, tr#delete_table-edit38 " ) . show ();
}
else {
$ ( " tr#delete_table-edit36, tr#delete_table-edit37, tr#delete_table-edit38 " ) . hide ();
}
});
2015-09-29 10:17:35 +02:00
2017-01-17 09:21:46 +01:00
$ ( '#ip_target' ) . change ( function () {
if ( $ ( this ) . val () == 'custom' ) {
$ ( " #text-custom_ip_target " ) . show ();
}
else {
$ ( " #text-custom_ip_target " ) . hide ();
}
});
2015-09-29 10:17:35 +02:00
var recursion ;
$ ( " #checkbox-recursion " ) . click ( function () {
recursion = this . checked ? 1 : 0 ;
$ ( " #groups_select " ) . trigger ( " change " );
});
2009-09-09 12:39:24 +02:00
$ ( " #groups_select " ) . change (
function () {
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2010-10-04 17:58:05 +02:00
if ( this . value < 0 ) {
clean_lists ();
$ ( " .select_agents_row_2 " ) . css ( 'display' , 'none' );
return ;
}
else {
$ ( " #module " ) . html ( '<?php echo __(' None '); ?>' );
$ ( " #id_agents " ) . html ( '' );
2012-03-09 12:47:56 +01:00
$ ( 'input[type=checkbox]' ) . removeAttr ( 'disabled' );
2010-10-04 17:58:05 +02:00
$ ( " .select_agents_row_2 " ) . css ( 'display' , '' );
}
2013-08-27 11:29:36 +02:00
$ ( " tr#delete_table-edit1, " +
2016-10-14 10:16:21 +02:00
" tr#delete_table-edit0, " +
2013-11-04 15:21:45 +01:00
" tr#delete_table-edit1_1, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit2, " +
" tr#delete_table-edit3, " +
" tr#delete_table-edit35, " +
" tr#delete_table-edit4, " +
" tr#delete_table-edit5, " +
" tr#delete_table-edit6, " +
" tr#delete_table-edit7, " +
" tr#delete_table-edit8, " +
" tr#delete_table-edit9, " +
" tr#delete_table-edit10, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit101, " +
" tr#delete_table-edit102, " +
2013-08-27 11:29:36 +02:00
" tr#delete_table-edit11, " +
2014-05-25 08:35:37 +02:00
" tr#delete_table-edit12, " +
2014-06-01 04:25:20 +02:00
" tr#delete_table-edit13, " +
" tr#delete_table-edit14 " ) . hide ();
2012-03-09 12:47:56 +01:00
2009-09-09 12:39:24 +02:00
jQuery . post ( " ajax.php " ,
2010-10-04 17:58:05 +02:00
{ " page " : " operation/agentes/ver_agente " ,
2014-03-25 13:39:26 +01:00
" get_agents_group_json " : 1 ,
2015-09-29 10:17:35 +02:00
" recursion " : recursion ,
2014-03-25 13:39:26 +01:00
" id_group " : this . value ,
status_agents : function () {
return $ ( " #status_agents " ) . val ();
},
2013-10-08 11:48:26 +02:00
// Add a key prefix to avoid auto sorting in js object conversion
" keys_prefix " : " _ "
2009-09-09 12:39:24 +02:00
},
function ( data , status ) {
2010-10-04 17:58:05 +02:00
$ ( " #id_agents " ) . html ( '' );
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2014-03-25 13:39:26 +01:00
jQuery . each ( data , function ( id , value ) {
2013-10-08 11:48:26 +02:00
// Remove keys_prefix from the index
id = id . substring ( 1 );
2014-03-25 13:39:26 +01:00
option = $ ( " <option></option> " )
. attr ( " value " , value [ " id_agente " ])
2016-10-13 09:55:53 +02:00
. html ( value [ " alias " ]);
2010-10-04 17:58:05 +02:00
$ ( " #id_agents " ) . append ( option );
2009-09-09 12:39:24 +02:00
});
},
" json "
);
}
);
2014-03-25 13:39:26 +01:00
$ ( " #status_agents " ) . change ( function () {
$ ( " #groups_select " ) . trigger ( " change " );
});
2016-10-13 09:55:53 +02:00
if ( " <?php echo $update ?> " ){
if ( " <?php echo $selection_mode ?> " == 'agents' ){
$ ( " #groups_select " ) . trigger ( " change " );
}
}
2017-02-16 16:05:21 +01:00
2016-11-17 12:55:29 +01:00
$ ( " #status_module " ) . change ( function () {
selector = $ ( " #form_edit input[name=selection_mode]:checked " ) . val ();
if ( selector == 'agents' ) {
$ ( " #id_agents " ) . trigger ( " change " );
}
else if ( selector == 'modules' ) {
$ ( " #module_type " ) . trigger ( " change " );
}
2016-10-14 10:16:21 +02:00
});
2017-02-16 16:05:21 +01:00
2017-05-16 16:37:48 +02:00
$ ( " #tags " ) . change ( function () {
selector = $ ( " #form_edit input[name=selection_mode]:checked " ) . val ();
if ( selector == 'agents' ) {
$ ( " #id_agents " ) . trigger ( " change " );
}
else if ( selector == 'modules' ) {
$ ( " #module_type " ) . trigger ( " change " );
}
});
2009-03-18 16:42:15 +01:00
});
2016-10-14 10:16:21 +02:00
function disabled_status () {
if ( $ ( '#dynamic_interval_select' ) . val () != 0 ){
$ ( '#text-min_warning' ) . prop ( 'readonly' , true );
$ ( '#text-min_warning' ) . addClass ( 'readonly' );
$ ( '#text-max_warning' ) . prop ( 'readonly' , true );
$ ( '#text-max_warning' ) . addClass ( 'readonly' );
$ ( '#text-min_critical' ) . prop ( 'readonly' , true );
$ ( '#text-min_critical' ) . addClass ( 'readonly' );
$ ( '#text-max_critical' ) . prop ( 'readonly' , true );
$ ( '#text-max_critical' ) . addClass ( 'readonly' );
} else {
$ ( '#text-min_warning' ) . prop ( 'readonly' , false );
$ ( '#text-min_warning' ) . removeClass ( 'readonly' );
$ ( '#text-max_warning' ) . prop ( 'readonly' , false );
$ ( '#text-max_warning' ) . removeClass ( 'readonly' );
$ ( '#text-min_critical' ) . prop ( 'readonly' , false );
$ ( '#text-min_critical' ) . removeClass ( 'readonly' );
$ ( '#text-max_critical' ) . prop ( 'readonly' , false );
$ ( '#text-max_critical' ) . removeClass ( 'readonly' );
}
}
2009-03-18 16:42:15 +01:00
/* ]]> */
</ script >
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
< ? php
function process_manage_edit ( $module_name , $agents_select = null ) {
2015-06-23 12:15:09 +02:00
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
if ( is_int ( $module_name ) && $module_name < 0 ) {
2013-01-10 13:18:13 +01:00
ui_print_error_message ( __ ( 'No modules selected' ));
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
return false ;
}
2013-01-28 15:38:34 +01:00
2013-01-10 13:18:13 +01:00
if ( ! is_array ( $agents_select ))
$agents_select = array ( $agents_select );
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
/* List of fields which can be updated */
2016-10-14 10:16:21 +02:00
$fields = array ( 'dynamic_interval' , 'dynamic_max' , 'dynamic_min' , 'dynamic_two_tailed' , 'min_warning' , 'max_warning' , 'str_warning' ,
2013-01-28 15:38:34 +01:00
'min_critical' , 'max_critical' , 'str_critical' , 'min_ff_event' ,
'module_interval' , 'disabled' , 'post_process' , 'unit' ,
'snmp_community' , 'tcp_send' , 'custom_string_1' ,
'plugin_parameter' , 'custom_string_2' , 'custom_string_3' , 'min' ,
'max' , 'id_module_group' , 'plugin_user' , 'plugin_pass' ,
'id_export' , 'history_data' , 'critical_inverse' ,
'warning_inverse' , 'critical_instructions' ,
2013-07-25 13:00:22 +02:00
'warning_instructions' , 'unknown_instructions' , 'policy_linked' ,
2017-01-17 09:21:46 +01:00
'id_category' , 'disabled_types_event' , 'ip_target' , " custom_ip_target " ,
2015-03-16 12:52:05 +01:00
'descripcion' , 'min_ff_event_normal' , 'min_ff_event_warning' ,
'min_ff_event_critical' , 'each_ff' , 'module_ff_interval' ,
'ff_timeout' , 'max_timeout' );
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
$values = array ();
foreach ( $fields as $field ) {
$value = get_parameter ( $field , '' );
2014-09-15 11:45:05 +02:00
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
switch ( $field ) {
2014-06-22 16:49:33 +02:00
case 'module_interval' :
if ( $value != 0 ) {
$values [ $field ] = $value ;
}
break ;
2015-03-02 17:28:34 +01:00
case 'plugin_pass' :
if ( $value != '' ) {
$values [ 'plugin_pass' ] = io_input_password ( $value );
}
break ;
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
default :
if ( $value != '' ) {
$values [ $field ] = $value ;
}
break ;
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
}
}
2015-03-02 17:28:34 +01:00
// Specific snmp reused fields
if ( get_parameter ( 'tcp_send' , '' ) == 3 ) {
$plugin_user_snmp = get_parameter ( 'plugin_user_snmp' , '' );
if ( $plugin_user_snmp != '' ) {
$values [ 'plugin_user' ] = $plugin_user_snmp ;
}
$plugin_pass_snmp = get_parameter ( 'plugin_pass_snmp' , '' );
if ( $plugin_pass_snmp != '' ) {
$values [ 'plugin_pass' ] = io_input_password ( $plugin_pass_snmp );
}
$snmp3_privacy_pass = get_parameter ( 'custom_string_2' , '' );
if ( $snmp3_privacy_pass != '' ) {
$values [ 'custom_string_2' ] = io_input_password ( $snmp3_privacy_pass );
}
}
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
$throw_unknown_events = get_parameter ( 'throw_unknown_events' , '' );
if ( $throw_unknown_events !== '' ) {
//Set the event type that can show.
$disabled_types_event = array (
2016-11-28 13:02:17 +01:00
EVENTS_GOING_UNKNOWN => ( int ) $throw_unknown_events );
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
$values [ 'disabled_types_event' ] = json_encode ( $disabled_types_event );
}
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
if ( strlen ( get_parameter ( 'history_data' )) > 0 ) {
$values [ 'history_data' ] = get_parameter ( 'history_data' );
}
2012-08-22 16:09:05 +02:00
if ( get_parameter ( 'quiet_select' , - 1 ) != - 1 ) {
$values [ 'quiet' ] = get_parameter ( 'quiet_select' );
}
2013-01-28 15:38:34 +01:00
2013-01-10 13:18:13 +01:00
$filter_modules = false ;
if ( ! is_numeric ( $module_name ) or ( $module_name != 0 ))
$filter_modules [ 'nombre' ] = $module_name ;
2012-08-22 16:09:05 +02:00
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
// Whether to update module tag info
$update_tags = get_parameter ( 'id_tag' , false );
if ( array_search ( 0 , $agents_select ) !== false ) {
//Apply at All agents.
$modules = db_get_all_rows_filter ( 'tagente_modulo' ,
2013-01-10 13:18:13 +01:00
$filter_modules ,
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
array ( 'id_agente_modulo' ));
}
else {
2013-01-28 15:38:34 +01:00
if ( $module_name == " 0 " ) {
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
//Any module
$modules = db_get_all_rows_filter ( 'tagente_modulo' ,
array ( 'id_agente' => $agents_select ),
array ( 'id_agente_modulo' ));
}
else {
$modules = db_get_all_rows_filter ( 'tagente_modulo' ,
array ( 'id_agente' => $agents_select ,
2015-06-23 12:15:09 +02:00
'nombre' => $module_name ),
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
array ( 'id_agente_modulo' ));
}
}
if ( $modules === false )
return false ;
foreach ( $modules as $module ) {
2013-01-28 15:38:34 +01:00
$result = modules_update_agent_module (
$module [ 'id_agente_modulo' ], $values , true , $update_tags );
2015-11-16 15:52:11 +01:00
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/file_manager.php, godmode/setup/news.php,
godmode/users/configure_user.php, godmode/users/user_list.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_alerts.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php,
godmode/netflow/nf_item_list.php,
godmode/netflow/nf_report_item.php, godmode/netflow/nf.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/agentes/tactical.php,
operation/agentes/estado_generalagente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/integria_incidents/incident_detail.php,
operation/gis_maps/index.php, operation/events/events_list.php,
operation/events/events.php, operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/graph_viewer.php, operation/search_reports.php,
operation/netflow/nf_view.php: cleaned source code.
* godmode/massive/massive_operations.php,
godmode/massive/massive_edit_modules.php: fixed the massive edition
of "any" module in agents.
Fixes: #3543484
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
if ( is_error ( $result )) {
return false ;
}
}
return true ;
}
2013-02-28 12:43:10 +01:00
?>