2006-03-27 05:37:27 +02:00
< ? php
2008-07-30 20:39:40 +02:00
2009-06-08 20:21:21 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
2010-03-02 17:41:27 +01:00
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
2009-06-08 20:21:21 +02:00
// Please see http://pandorafms.org for full contribution list
2006-03-27 05:37:27 +02:00
2008-04-01 15:53:11 +02: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.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
2008-08-22 20:07:32 +02:00
2007-03-12 18:58:52 +01:00
// Load global vars
2009-01-07 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions.php: Removed safe_sql_string. Cleaned documenation so
it would be parsed without errors by phpdoc
* include/functions_exportserver.php: Aggregate all exportserver functions
here.
* include/functions_db.php: Cleaned up documentation. Added
get_modulegroups and get_modulegroup_name.
* godmode/db/db_refine.php: Fixed the selection box.
* godmode/agentes/agent_disk_conf_editor.php: Added todo. Don't handle
the footer anymore
* godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager.php, godmode/agentes/agent_manager.php,
godmode/agentes/alert_manager.php:
Removed the ACL part since it was redundant due to the inclusion.
Just made sure that it was included (checking on $id_agente)
* godmode/agentes/manage_config.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/planned_downtime.php: Style fix
* godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor_prediction.php: Fixed prediction
module creation/update bugs
* godmode/setup/links.php: No more relying on antique (PHP4) functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1321 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-07 16:57:33 +01:00
check_login ();
2007-03-12 18:58:52 +01:00
2008-01-10 17:40:00 +01:00
// Take some parameters (GET)
2009-02-04 12:20:31 +01:00
$offset = ( int ) get_parameter ( " offset " );
$group_id = ( int ) get_parameter ( " group_id " );
$ag_group = get_parameter ( " ag_group_refresh " , - 1 );
2010-07-19 14:01:55 +02:00
$sortField = get_parameter ( 'sort_field' );
$sort = get_parameter ( 'sort' , 'none' );
2015-12-16 11:47:33 +01:00
$recursion = ( bool ) get_parameter ( 'recursion' , false );
2015-08-04 16:40:55 +02:00
$disabled = get_parameter ( 'disabled' , 0 );
2017-10-25 16:04:05 +02:00
$os = get_parameter ( 'os' , 0 );
2009-02-04 12:20:31 +01:00
if ( $ag_group == - 1 )
$ag_group = ( int ) get_parameter ( " ag_group " , - 1 );
if (( $ag_group == - 1 ) && ( $group_id != 0 ))
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new
functions and better security and validation
* pandora_console/include/functions_db.php: Renamed some functions and
created agentmodule functions for consistency with documentation and to
avoid searching for and typing certain function names:
get_agentmodules is now get_agent_modules;
dame_grupo is now get_group_name;
dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new;
dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name;
dame_nombre_modulo_agentemodulo is now get_agentmodule_name;
dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type;
dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is
now get_group_name; get_agentmodule_count is get_agent_modules_count;
get_agentmodule_group is new; get_agent_group is new;
* pandora_console/include/functions_reporting.php,
pandora_console/include/functions.php,
pandora_console/operation/incidents/incident.php,
pandora_console/operation/users/user.php,
pandora_console/operation/users/user_edit.php,
pandora_console/operation/events/events.php,
pandora_console/operation/visual_console/index.php,
pandora_console/operation/agentes/estado_grupo.php,
pandora_console/operation/agentes/export_csv.php,
pandora_console/operation/agentes/estado_agente.php,
pandora_console/operation/agentes/estado_ultimopaquete.php,
pandora_console/operation/agentes/estado_generalagente.php,
pandora_console/operation/agentes/sla_view.php,
pandora_console/operation/agentes/exportdata.php,
pandora_console/operation/agentes/ver_agente.php,
pandora_console/operation/agentes/tactical.php,
pandora_console/operation/agentes/networkmap.php,
pandora_console/operation/messages/message.php,
pandora_console/operation/reporting/reporting_xml.php,
pandora_console/operation/reporting/reporting_viewer.php,
pandora_console/reporting/fgraph.php,
pandora_console/godmode/groups/group_list.php,
pandora_console/godmode/users/user_list.php,
pandora_console/godmode/users/configure_user.php,
pandora_console/godmode/db/db_refine.php,
pandora_console/godmode/db/db_info.php,
pandora_console/godmode/db/db_purge.php,
pandora_console/godmode/agentes/manage_config.php,
pandora_console/godmode/agentes/modificar_agente.php,
pandora_console/godmode/agentes/configurar_agente.php,
pandora_console/godmode/agentes/manage_config_remote.php,
pandora_console/godmode/modules/manage_network_components_form_network.php,
pandora_console/godmode/modules/manage_network_components_form_wmi.php,
pandora_console/godmode/reporting/reporting_builder.php,
pandora_console/godmode/reporting/map_builder.php,
pandora_console/godmode/reporting/graph_builder.php: Renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
$ag_group = $group_id ;
2009-02-04 12:20:31 +01:00
2013-01-14 16:11:07 +01:00
if ( ! check_acl ( $config [ " id_user " ], 0 , " AW " ) && ! check_acl ( $config [ " id_user " ], 0 , " AD " )) {
* 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-02-04 12:20:31 +01:00
" Trying to access agent manager " );
require ( " general/noaccess.php " );
exit ;
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new
functions and better security and validation
* pandora_console/include/functions_db.php: Renamed some functions and
created agentmodule functions for consistency with documentation and to
avoid searching for and typing certain function names:
get_agentmodules is now get_agent_modules;
dame_grupo is now get_group_name;
dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new;
dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name;
dame_nombre_modulo_agentemodulo is now get_agentmodule_name;
dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type;
dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is
now get_group_name; get_agentmodule_count is get_agent_modules_count;
get_agentmodule_group is new; get_agent_group is new;
* pandora_console/include/functions_reporting.php,
pandora_console/include/functions.php,
pandora_console/operation/incidents/incident.php,
pandora_console/operation/users/user.php,
pandora_console/operation/users/user_edit.php,
pandora_console/operation/events/events.php,
pandora_console/operation/visual_console/index.php,
pandora_console/operation/agentes/estado_grupo.php,
pandora_console/operation/agentes/export_csv.php,
pandora_console/operation/agentes/estado_agente.php,
pandora_console/operation/agentes/estado_ultimopaquete.php,
pandora_console/operation/agentes/estado_generalagente.php,
pandora_console/operation/agentes/sla_view.php,
pandora_console/operation/agentes/exportdata.php,
pandora_console/operation/agentes/ver_agente.php,
pandora_console/operation/agentes/tactical.php,
pandora_console/operation/agentes/networkmap.php,
pandora_console/operation/messages/message.php,
pandora_console/operation/reporting/reporting_xml.php,
pandora_console/operation/reporting/reporting_viewer.php,
pandora_console/reporting/fgraph.php,
pandora_console/godmode/groups/group_list.php,
pandora_console/godmode/users/user_list.php,
pandora_console/godmode/users/configure_user.php,
pandora_console/godmode/db/db_refine.php,
pandora_console/godmode/db/db_info.php,
pandora_console/godmode/db/db_purge.php,
pandora_console/godmode/agentes/manage_config.php,
pandora_console/godmode/agentes/modificar_agente.php,
pandora_console/godmode/agentes/configurar_agente.php,
pandora_console/godmode/agentes/manage_config_remote.php,
pandora_console/godmode/modules/manage_network_components_form_network.php,
pandora_console/godmode/modules/manage_network_components_form_wmi.php,
pandora_console/godmode/reporting/reporting_builder.php,
pandora_console/godmode/reporting/map_builder.php,
pandora_console/godmode/reporting/graph_builder.php: Renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
}
2009-02-04 12:20:31 +01:00
2010-09-21 14:09:04 +02:00
enterprise_include_once ( 'include/functions_policies.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 ( 'include/functions_agents.php' );
require_once ( 'include/functions_users.php' );
2010-09-21 14:09:04 +02:00
2008-01-10 17:40:00 +01:00
$search = get_parameter ( " search " , " " );
2007-09-27 17:12:49 +02:00
2011-12-07 16:04:40 +01:00
// Prepare the tab system to the future
$tab = 'view' ;
/* Setup tab */
2012-09-27 15:02:16 +02:00
$viewtab [ 'text' ] = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente">'
2013-06-20 11:21:28 +02:00
. html_print_image ( " images/operation.png " , true , array ( " title " => __ ( 'View' )))
. '</a>' ;
2013-04-10 09:57:54 +02:00
$viewtab [ 'operation' ] = true ;
2013-06-20 11:21:28 +02:00
2013-04-10 09:57:54 +02:00
$viewtab [ 'active' ] = false ;
2013-06-20 11:21:28 +02:00
2011-12-07 16:04:40 +01:00
$onheader = array ( 'view' => $viewtab );
2010-03-02 17:41:27 +01:00
// Header
2013-05-23 17:42:32 +02:00
ui_print_page_header ( __ ( 'Agents defined in Pandora' ), " images/agent_mc.png " , false , " " , true , $onheader );
2007-03-12 18:58:52 +01:00
2013-01-14 16:11:07 +01:00
// Perform actions
$agent_to_delete = ( int ) get_parameter ( 'borrar_agente' );
$enable_agent = ( int ) get_parameter ( 'enable_agent' );
$disable_agent = ( int ) get_parameter ( 'disable_agent' );
2017-12-04 13:50:13 +01:00
if ( $disable_agent != 0 ){
$server_name = db_get_row_sql ( 'select server_name from tagente where id_agente = ' . $disable_agent );
}
elseif ( $enable_agent != 0 ) {
$server_name = db_get_row_sql ( 'select server_name from tagente where id_agente = ' . $enable_agent );
}
2013-01-14 16:11:07 +01:00
$result = null ;
if ( $agent_to_delete ) {
$id_agente = $agent_to_delete ;
$agent_name = agents_get_name ( $id_agente );
$id_grupo = agents_get_agent_group ( $id_agente );
if ( check_acl ( $config [ " id_user " ], $id_grupo , " AW " )) {
$id_agentes [ 0 ] = $id_agente ;
$result = agents_delete_agent ( $id_agentes );
}
else {
// NO permissions.
db_pandora_audit ( " ACL Violation " ,
" Trying to delete agent \ ' $agent_name\ ' " );
require ( " general/noaccess.php " );
exit ;
}
2011-08-17 16:20:45 +02:00
ui_print_result_message ( $result , __ ( 'Success deleted agent.' ), __ ( 'Could not be deleted.' ));
2013-01-14 16:11:07 +01:00
2013-09-04 14:49:27 +02:00
if ( enterprise_installed ()) {
// Check if the remote config file still exist
if ( isset ( $config [ " remote_config " ])) {
enterprise_include_once ( 'include/functions_config_agents.php' );
2014-01-16 18:26:27 +01:00
if ( enterprise_hook ( 'config_agents_has_remote_configuration' , array ( $id_agente ))) {
2013-09-04 14:49:27 +02:00
ui_print_error_message ( __ ( 'Maybe the files conf or md5 could not be deleted' ));
}
2013-05-13 12:52:51 +02:00
}
2011-08-17 16:27:56 +02:00
}
2011-08-17 16:20:45 +02:00
}
2013-02-27 10:51:48 +01:00
if ( $enable_agent ) {
2013-01-14 16:11:07 +01:00
$result = db_process_sql_update ( 'tagente' , array ( 'disabled' => 0 ), array ( 'id_agente' => $enable_agent ));
2017-04-18 10:42:23 +02:00
$alias = agents_get_alias ( $enable_agent );
2013-01-14 16:11:07 +01:00
if ( $result ) {
2016-09-13 10:28:26 +02:00
// Update the agent from the metaconsole cache
enterprise_include_once ( 'include/functions_agents.php' );
$values = array ( 'disabled' => 0 );
2017-12-04 13:50:13 +01:00
enterprise_hook ( 'agent_update_from_cache' , array ( $enable_agent , $values , $server_name ));
2016-09-13 10:28:26 +02:00
2017-04-18 10:42:23 +02:00
db_pandora_audit ( " Agent management " , 'Enable ' . $alias );
2013-01-14 16:11:07 +01:00
}
else {
2017-04-18 10:42:23 +02:00
db_pandora_audit ( " Agent management " , 'Fail to enable ' . $alias );
2013-01-14 16:11:07 +01:00
}
ui_print_result_message ( $result ,
__ ( 'Successfully enabled' ), __ ( 'Could not be enabled' ));
}
2013-02-27 10:51:48 +01:00
if ( $disable_agent ) {
2013-01-14 16:11:07 +01:00
$result = db_process_sql_update ( 'tagente' , array ( 'disabled' => 1 ), array ( 'id_agente' => $disable_agent ));
2017-04-18 10:42:23 +02:00
$alias = agents_get_alias ( $disable_agent );
2013-01-14 16:11:07 +01:00
if ( $result ) {
2016-09-13 10:28:26 +02:00
// Update the agent from the metaconsole cache
enterprise_include_once ( 'include/functions_agents.php' );
$values = array ( 'disabled' => 1 );
2017-12-04 13:50:13 +01:00
enterprise_hook ( 'agent_update_from_cache' , array ( $disable_agent , $values , $server_name ));
2016-09-13 10:28:26 +02:00
2017-04-18 10:42:23 +02:00
db_pandora_audit ( " Agent management " , 'Disable ' . $alias );
2013-01-14 16:11:07 +01:00
}
else {
2017-04-18 10:42:23 +02:00
db_pandora_audit ( " Agent management " , 'Fail to disable ' . $alias );
2013-01-14 16:11:07 +01:00
}
ui_print_result_message ( $result ,
__ ( 'Successfully disabled' ), __ ( 'Could not be disabled' ));
}
2015-04-01 13:24:53 +02:00
echo " <table cellpadding='4' cellspacing='4' class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'>
2013-06-20 11:21:28 +02:00
< tr > " ;
echo " <form method='post'
2012-04-24 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/menu.php,
godmode/agentes/agent_template.php,
godmode/agentes/fields_manager.php,
godmode/agentes/agent_conf_gis.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/agent_manager.php,
godmode/menu.php: Fixed some problems with links and new menu structure.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6127 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-04-24 12:02:06 +02:00
action = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente' > " ;
2007-03-02 18:56:07 +01:00
2013-05-23 17:42:32 +02:00
echo " <td> " ;
echo __ ( 'Group' ) . ' ' ;
2011-07-13 18:39:35 +02:00
$own_info = get_user_info ( $config [ 'id_user' ]);
2015-12-16 11:47:33 +01:00
if ( ! $own_info [ 'is_admin' ] && ! check_acl ( $config [ 'id_user' ], 0 , " AW " ))
2011-07-13 18:39:35 +02:00
$return_all_group = false ;
else
$return_all_group = true ;
2017-06-27 11:35:48 +02:00
html_print_select_groups ( false , " AR " , $return_all_group , " ag_group " , $ag_group , 'this.form.submit();' , '' , 0 , false , false , true , '' , false );
2015-04-10 00:58:24 +02:00
2015-01-12 16:20:07 +01:00
echo " <td> " ;
echo __ ( 'Show Agents' ) . ' ' ;
$fields = array (
2015-06-08 13:13:09 +02:00
2 => __ ( 'Everyone' ),
1 => __ ( 'Only disabled' ),
0 => __ ( 'Only enabled' ),
);
2015-01-12 16:20:07 +01:00
html_print_select ( $fields , " disabled " , $disabled , 'this.form.submit()' );
echo " </td> " ;
2010-04-22 18:51:23 +02:00
2017-10-25 16:04:05 +02:00
echo " <td> " ;
echo __ ( 'Operative System' ) . ' ' ;
$pre_fields = db_get_all_rows_sql ( 'select distinct(tagente.id_os),tconfig_os.description from tagente,tconfig_os where tagente.id_os = tconfig_os.id_os' );
$fields = array ();
foreach ( $pre_fields as $key => $value ) {
$fields [ $value [ 'id_os' ]] = $value [ 'description' ];
}
html_print_select ( $fields , " os " , $os , 'this.form.submit()' , 'All' , 0 );
echo " </td> " ;
2013-06-20 11:21:28 +02:00
echo " <td> " ;
2013-05-23 17:42:32 +02:00
echo __ ( 'Recursion' ) . ' ' ;
2011-07-11 06:28:21 +02:00
html_print_checkbox ( " recursion " , 1 , $recursion , false , false , 'this.form.submit()' );
2008-01-10 17:40:00 +01:00
2013-06-20 11:21:28 +02:00
echo " </td><td> " ;
2013-05-23 17:42:32 +02:00
echo __ ( 'Search' ) . ' ' ;
html_print_input_text ( " search " , $search , '' , 12 );
2008-01-10 17:40:00 +01:00
2017-10-25 16:04:05 +02:00
echo ui_print_help_tip ( __ ( 'Search filter by alias, name, description, IP address or custom fields content' ), true );
2013-05-23 17:42:32 +02:00
echo " </td><td> " ;
2010-05-25 23:38:57 +02:00
echo " <input name='srcbutton' type='submit' class='sub search' value=' " . __ ( 'Search' ) . " '> " ;
2008-01-10 17:40:00 +01:00
echo " </form> " ;
2009-08-06 20:55:54 +02:00
echo " <td> " ;
2013-05-23 17:42:32 +02:00
echo " </tr></table> " ;
2010-10-25 17:55:16 +02:00
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
$order_collation = " " ;
switch ( $config [ " dbtype " ]) {
case " mysql " :
2017-08-23 09:35:17 +02:00
$order_collation = " " ;
2017-10-10 14:55:17 +02:00
$order_collation = " COLLATE utf8_general_ci " ;
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
break ;
case " postgresql " :
case " oracle " :
$order_collation = " " ;
break ;
}
2010-07-19 14:01:55 +02:00
$selected = 'border: 1px solid black;' ;
$selectNameUp = '' ;
$selectNameDown = '' ;
$selectOsUp = '' ;
$selectOsDown = '' ;
$selectGroupUp = '' ;
$selectGroupDown = '' ;
switch ( $sortField ) {
2016-11-02 16:58:53 +01:00
case 'remote' :
switch ( $sort ) {
case 'up' :
$selectRemoteUp = $selected ;
2017-11-02 17:23:57 +01:00
$order = array ( 'field' => 'remote ' ,
2016-11-02 16:58:53 +01:00
'field2' => 'nombre ' . $order_collation ,
'order' => 'ASC' );
break ;
case 'down' :
$selectRemoteDown = $selected ;
2017-11-02 17:23:57 +01:00
$order = array ( 'field' => 'remote ' ,
2016-11-02 16:58:53 +01:00
'field2' => 'nombre ' . $order_collation ,
'order' => 'DESC' );
break ;
}
break ;
2010-07-19 14:01:55 +02:00
case 'name' :
switch ( $sort ) {
case 'up' :
$selectNameUp = $selected ;
2016-09-27 10:31:42 +02:00
$order = array ( 'field' => 'alias ' . $order_collation ,
'field2' => 'alias ' . $order_collation ,
2013-02-27 10:51:48 +01:00
'order' => 'ASC' );
2010-07-19 14:01:55 +02:00
break ;
case 'down' :
$selectNameDown = $selected ;
2016-09-27 10:31:42 +02:00
$order = array ( 'field' => 'alias ' . $order_collation ,
'field2' => 'alias ' . $order_collation ,
2013-02-27 10:51:48 +01:00
'order' => 'DESC' );
2010-07-19 14:01:55 +02:00
break ;
}
break ;
case 'os' :
switch ( $sort ) {
case 'up' :
$selectOsUp = $selected ;
2013-02-27 10:51:48 +01:00
$order = array ( 'field' => 'id_os' ,
2016-09-27 10:31:42 +02:00
'field2' => 'alias ' . $order_collation ,
2013-02-27 10:51:48 +01:00
'order' => 'ASC' );
2010-07-19 14:01:55 +02:00
break ;
case 'down' :
$selectOsDown = $selected ;
2013-02-27 10:51:48 +01:00
$order = array ( 'field' => 'id_os' ,
2016-09-27 10:31:42 +02:00
'field2' => 'alias ' . $order_collation ,
2013-02-27 10:51:48 +01:00
'order' => 'DESC' );
2010-07-19 14:01:55 +02:00
break ;
}
break ;
case 'group' :
switch ( $sort ) {
case 'up' :
$selectGroupUp = $selected ;
2013-02-27 10:51:48 +01:00
$order = array ( 'field' => 'id_grupo' ,
2016-09-27 10:31:42 +02:00
'field2' => 'alias ' . $order_collation ,
2013-02-27 10:51:48 +01:00
'order' => 'ASC' );
2010-07-19 14:01:55 +02:00
break ;
case 'down' :
$selectGroupDown = $selected ;
2013-02-27 10:51:48 +01:00
$order = array ( 'field' => 'id_grupo' ,
2016-09-27 10:31:42 +02:00
'field2' => 'alias ' . $order_collation ,
2013-02-27 10:51:48 +01:00
'order' => 'DESC' );
2010-07-19 14:01:55 +02:00
break ;
}
break ;
default :
$selectNameUp = $selected ;
$selectNameDown = '' ;
$selectOsUp = '' ;
$selectOsDown = '' ;
$selectGroupUp = '' ;
$selectGroupDown = '' ;
2016-09-27 10:31:42 +02:00
$order = array ( 'field' => 'alias ' . $order_collation ,
'field2' => 'alias ' . $order_collation ,
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
'order' => 'ASC' );
2010-07-19 14:01:55 +02:00
break ;
}
2009-02-04 12:20:31 +01:00
$search_sql = '' ;
2013-02-27 10:51:48 +01:00
if ( $search != " " ) {
2016-08-31 15:34:05 +02:00
$sql = " SELECT DISTINCT taddress_agent.id_agent FROM taddress
INNER JOIN taddress_agent ON
taddress . id_a = taddress_agent . id_a
WHERE taddress . ip LIKE '%$search%' " ;
$id = db_get_all_rows_sql ( $sql );
if ( $id != '' ){
$aux = $id [ 0 ][ 'id_agent' ];
2017-01-31 11:42:12 +01:00
$search_sql = " AND ( LOWER(nombre) " . $order_collation . "
LIKE LOWER ( '%$search%' ) OR tagente . id_agente = $aux " ;
2016-08-31 15:34:05 +02:00
if ( count ( $id ) >= 2 ){
for ( $i = 1 ; $i < count ( $id ); $i ++ ){
$aux = $id [ $i ][ 'id_agent' ];
$search_sql .= " OR tagente.id_agente = $aux " ;
}
}
$search_sql .= " ) " ;
} else {
$search_sql = " AND ( nombre " . $order_collation . "
2017-03-29 13:30:43 +02:00
LIKE LOWER ( '%$search%' ) OR alias " . $order_collation . "
2017-10-25 16:04:05 +02:00
LIKE LOWER ( '%$search%' ) OR comentarios " . $order_collation . " LIKE LOWER ( '%$search%' )
OR EXISTS ( SELECT * FROM tagent_custom_data
WHERE id_agent = id_agente AND description LIKE '%$search%' )) " ;
2016-08-31 15:34:05 +02:00
}
2008-01-10 17:40:00 +01:00
}
2015-06-08 09:18:00 +02:00
if ( $disabled == 1 )
2015-01-12 16:20:07 +01:00
{
2017-10-25 16:04:05 +02:00
$search_sql .= " AND disabled = " . $disabled . $search_sql ;
2015-01-12 16:20:07 +01:00
}
2015-06-08 09:18:00 +02:00
else {
if ( $disabled == 0 ) {
2017-10-25 16:04:05 +02:00
$search_sql .= " AND disabled = 0 " . $search_sql ;
2015-01-12 16:20:07 +01:00
}
}
2017-10-25 16:04:05 +02:00
if ( $os != 0 ){
$search_sql .= " AND id_os = " . $os ;
}
2011-11-24 19:19:09 +01:00
// Show only selected groups
2010-04-22 18:51:23 +02:00
if ( $ag_group > 0 ) {
2011-07-11 06:28:21 +02:00
$ag_groups = array ();
$ag_groups = ( array ) $ag_group ;
if ( $recursion ) {
$ag_groups = groups_get_id_recursive ( $ag_group , true );
}
2009-02-04 12:20:31 +01:00
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.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/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
switch ( $config [ " dbtype " ]) {
case " mysql " :
$sql = sprintf ( ' SELECT *
FROM tagente
2011-07-11 06:28:21 +02:00
WHERE id_grupo IN ( % s )
2013-02-27 10:51:48 +01:00
% s
2016-09-05 15:32:40 +02:00
ORDER BY % s % s , % s % s
2013-02-27 10:51:48 +01:00
LIMIT % d , % d ' ,
2016-09-05 15:32:40 +02:00
implode ( " , " , $ag_groups ), $search_sql , $order [ 'field' ], $order [ 'order' ], $order [ 'field2' ], $order [ 'order' ], $offset , $config [ " block_size " ]);
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.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/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
break ;
case " postgresql " :
$sql = sprintf ( ' SELECT *
FROM tagente
2011-07-11 06:28:21 +02:00
WHERE id_grupo IN ( % s )
2013-02-27 10:51:48 +01:00
% s
2016-09-05 15:32:40 +02:00
ORDER BY % s % s , % s % s
2013-02-27 10:51:48 +01:00
LIMIT % d OFFSET % d ' ,
2016-09-05 15:32:40 +02:00
implode ( " , " , $ag_groups ), $search_sql , $order [ 'field' ], $order [ 'order' ], $order [ 'field2' ], $order [ 'order' ], $config [ " block_size " ], $offset );
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.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/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
break ;
2011-04-11 19:05:20 +02:00
case " oracle " :
$set = array ();
$set [ 'limit' ] = $config [ " block_size " ];
$set [ 'offset' ] = $offset ;
$sql = sprintf ( ' SELECT *
FROM tagente
2011-07-11 06:28:21 +02:00
WHERE id_grupo IN ( % s )
2013-02-27 10:51:48 +01:00
% s
2016-09-05 15:32:40 +02:00
ORDER BY % s % s , % s % s ' ,
implode ( " , " , $ag_groups ), $search_sql , $order [ 'field' ], $order [ 'order' ], $order [ 'field2' ], $order [ 'order' ]);
2011-04-11 19:05:20 +02:00
$sql = oracle_recode_query ( $sql , $set );
break ;
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.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/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
}
2015-12-14 11:19:14 +01:00
$sql_total = sprintf ( ' SELECT COUNT ( * )
FROM tagente
WHERE id_grupo IN ( % s )
% s ' ,
implode ( " , " , $ag_groups ), $search_sql );
$total_agents = db_get_sql ( $sql_total );
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.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/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
}
else {
2018-02-12 11:14:04 +01:00
// Concatenate AW and AD permisions to get all the possible groups where the user can manage
$user_groupsAW = users_get_groups ( $config [ 'id_user' ], 'AW' );
$user_groupsAD = users_get_groups ( $config [ 'id_user' ], 'AD' );
2013-08-01 18:20:36 +02:00
2018-02-12 11:14:04 +01:00
$user_groups = $user_groupsAW + $user_groupsAD ;
$sql = sprintf ( ' SELECT COUNT ( * )
FROM tagente
WHERE id_grupo IN ( % s )
% s ' ,
implode ( ',' , array_keys ( $user_groups )),
$search_sql );
$total_agents = db_get_sql ( $sql );
switch ( $config [ " dbtype " ]) {
case " mysql " :
$sql = sprintf ( ' SELECT *
FROM tagente
WHERE id_grupo IN ( % s )
% s
ORDER BY % s % s , % s % s
LIMIT % d , % d ' ,
implode ( ',' , array_keys ( $user_groups )),
$search_sql , $order [ 'field' ], $order [ 'order' ], $order [ 'field2' ], $order [ 'order' ], $offset , $config [ " block_size " ]);
break ;
case " postgresql " :
$sql = sprintf ( ' SELECT *
FROM tagente
WHERE id_grupo IN ( % s )
% s
ORDER BY % s % s , % s % s
LIMIT % d OFFSET % d ' ,
implode ( ',' , array_keys ( $user_groups )),
$search_sql , $order [ 'field' ], $order [ 'order' ], $order [ 'field2' ], $order [ 'order' ], $config [ " block_size " ], $offset );
break ;
case " oracle " :
$set = array ();
$set [ 'limit' ] = $config [ " block_size " ];
$set [ 'offset' ] = $offset ;
$sql = sprintf ( ' SELECT *
FROM tagente
WHERE id_grupo IN ( % s )
% s
ORDER BY % s % s , % s % s ' ,
implode ( ',' , array_keys ( $user_groups )),
$search_sql , $order [ 'field' ], $order [ 'order' ], $order [ 'field2' ], $order [ 'order' ]);
$sql = oracle_recode_query ( $sql , $set );
break ;
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
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,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
}
2008-01-10 17:40:00 +01:00
}
* 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
$agents = db_get_all_rows_sql ( $sql );
2007-03-02 18:56:07 +01:00
2011-04-11 19:05:20 +02:00
// Delete rnum row generated by oracle_recode_query() function
if (( $config [ 'dbtype' ] == 'oracle' ) && ( $agents !== false )) {
for ( $i = 0 ; $i < count ( $agents ); $i ++ ) {
2013-02-27 10:51:48 +01:00
unset ( $agents [ $i ][ 'rnum' ]);
2011-04-11 19:05:20 +02:00
}
}
2007-03-12 18:58:52 +01:00
// Prepare pagination
2017-12-14 17:28:33 +01:00
ui_pagination ( $total_agents , " index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id= $ag_group &recursion= $recursion &search= $search &sort_field= $sortField &sort= $sort &disabled= $disabled &os= $os " , $offset );
2007-03-12 18:58:52 +01:00
2009-02-04 12:20:31 +01:00
if ( $agents !== false ) {
2009-06-23 14:44:35 +02:00
2015-04-01 13:24:53 +02:00
echo " <table cellpadding='4' id='agent_list' cellspacing='4' width='100%' class='databox data'> " ;
2010-07-19 14:01:55 +02:00
echo " <th> " . __ ( 'Agent name' ) . ' ' .
2017-12-14 17:28:33 +01:00
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=name&sort=up&disabled=$disabled">' . html_print_image ( " images/sort_up.png " , true , array ( " style " => $selectNameUp )) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=name&sort=down&disabled=$disabled">' . html_print_image ( " images/sort_down.png " , true , array ( " style " => $selectNameDown )) . '</a>' ;
2010-07-19 14:01:55 +02:00
echo " </th> " ;
2016-11-02 16:58:53 +01:00
echo " <th title=' " . __ ( 'Remote agent configuration' ) . " '> " . __ ( 'R' ) . ' ' .
2017-12-14 17:28:33 +01:00
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=remote&sort=up&disabled=$disabled">' . html_print_image ( " images/sort_up.png " , true , array ( " style " => $selectRemoteUp )) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=remote&sort=down&disabled=$disabled">' . html_print_image ( " images/sort_down.png " , true , array ( " style " => $selectRemoteDown )) . '</a>' ;
2016-11-02 16:58:53 +01:00
echo " </th> " ;
2010-07-19 14:01:55 +02:00
echo " <th> " . __ ( 'OS' ) . ' ' .
2017-12-14 17:28:33 +01:00
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=os&sort=up&disabled=$disabled">' . html_print_image ( " images/sort_up.png " , true , array ( " style " => $selectOsUp )) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=os&sort=down&disabled=$disabled">' . html_print_image ( " images/sort_down.png " , true , array ( " style " => $selectOsDown )) . '</a>' ;
2010-07-19 14:01:55 +02:00
echo " </th> " ;
2017-07-24 15:53:31 +02:00
echo " <th> " . __ ( 'Type' ) . " </th> " ;
2010-07-19 14:01:55 +02:00
echo " <th> " . __ ( 'Group' ) . ' ' .
2017-12-14 17:28:33 +01:00
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=group&sort=up&disabled=$disabled">' . html_print_image ( " images/sort_up.png " , true , array ( " style " => $selectGroupUp )) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=' . $ag_group . '&recursion=' . $recursion . '&search=' . $search . '&os=' . $os . '&offset=' . $offset . '&sort_field=group&sort=down&disabled=$disabled">' . html_print_image ( " images/sort_down.png " , true , array ( " style " => $selectGroupDown )) . '</a>' ;
2010-07-19 14:01:55 +02:00
echo " </th> " ;
2013-08-01 18:20:36 +02:00
echo " <th> " . __ ( 'Description' ) . " </th> " ;
2015-06-12 15:50:46 +02:00
echo " <th style='text-align:left'> " . __ ( 'Actions' ) . " </th> " ;
2007-03-12 18:58:52 +01:00
$color = 1 ;
2009-08-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/visual_console/index.php,
pandora_console/operation/users/user.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/estado_agente.php,
operation/agentes/alerts_status.php, include/styles/pandora.css,
include/styles/pandora_black.css,include/styles/pandora_blackmetal.css,
include/styles/pandora_width.css, include/styles/pandora_minimal.css,
include/styles/pandora_red.css: the table list now has rows with alternate
colours for easy see the data.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-10 11:55:53 +02:00
$rowPair = true ;
$iterator = 0 ;
2009-02-04 12:20:31 +01:00
foreach ( $agents as $agent ) {
2016-11-02 16:58:53 +01:00
/* Begin Update tagente.remote 0/1 with remote agent function return */
2017-02-10 11:43:12 +01:00
if ( enterprise_hook ( 'config_agents_has_remote_configuration' , array ( $agent [ 'id_agente' ]))){
2016-11-02 16:58:53 +01:00
db_process_sql_update ( 'tagente' , array ( 'remote' => 1 ), 'id_agente = ' . $agent [ 'id_agente' ] . '' );
}
else {
db_process_sql_update ( 'tagente' , array ( 'remote' => 0 ), 'id_agente = ' . $agent [ 'id_agente' ] . '' );
}
/* End Update tagente.remote 0/1 with remote agent function return */
2009-02-04 12:20:31 +01:00
$id_grupo = $agent [ " id_grupo " ];
2013-02-27 10:51:48 +01:00
2013-01-14 16:11:07 +01:00
if ( ! check_acl ( $config [ " id_user " ], $id_grupo , " AW " , $agent [ 'id_agente' ]) && ! check_acl ( $config [ " id_user " ], $id_grupo , " AD " , $agent [ 'id_agente' ]))
2009-02-04 12:20:31 +01:00
continue ;
2011-05-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: added new parameter for the "check_acl" function
the $id_agent, by default is 0, and this parameter now only is used in the
enterprise ACL check (as you see in the hook for enterprise into the
function source). And cleaned source code style.
* include/functions_agents.php, operation/search_modules.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php,
godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, godmode/alerts/alert_list.list.php:
added checks for the ACL enterprise.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4347 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-12 16:33:07 +02:00
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
if ( $color == 1 ) {
2007-03-12 18:58:52 +01:00
$tdcolor = " datos " ;
$color = 0 ;
2011-05-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: added new parameter for the "check_acl" function
the $id_agent, by default is 0, and this parameter now only is used in the
enterprise ACL check (as you see in the hook for enterprise into the
function source). And cleaned source code style.
* include/functions_agents.php, operation/search_modules.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php,
godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, godmode/alerts/alert_list.list.php:
added checks for the ACL enterprise.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4347 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-12 16:33:07 +02:00
}
2007-03-12 18:58:52 +01:00
else {
$tdcolor = " datos2 " ;
$color = 1 ;
}
2009-02-04 12:20:31 +01:00
2009-08-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/visual_console/index.php,
pandora_console/operation/users/user.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/estado_agente.php,
operation/agentes/alerts_status.php, include/styles/pandora.css,
include/styles/pandora_black.css,include/styles/pandora_blackmetal.css,
include/styles/pandora_width.css, include/styles/pandora_minimal.css,
include/styles/pandora_red.css: the table list now has rows with alternate
colours for easy see the data.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-10 11:55:53 +02:00
if ( $rowPair )
$rowclass = 'rowPair' ;
else
$rowclass = 'rowOdd' ;
$rowPair = ! $rowPair ;
$iterator ++ ;
2009-02-04 12:20:31 +01:00
// Agent name
2009-08-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/visual_console/index.php,
pandora_console/operation/users/user.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/estado_agente.php,
operation/agentes/alerts_status.php, include/styles/pandora.css,
include/styles/pandora_black.css,include/styles/pandora_blackmetal.css,
include/styles/pandora_width.css, include/styles/pandora_minimal.css,
include/styles/pandora_red.css: the table list now has rows with alternate
colours for easy see the data.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-10 11:55:53 +02:00
echo " <tr class=' $rowclass '><td class=' $tdcolor ' width='40%'> " ;
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
if ( $agent [ " disabled " ]) {
2009-02-04 12:20:31 +01:00
echo " <em> " ;
}
echo '<span class="left">' ;
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
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,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
echo " <strong> " ;
2013-02-27 10:51:48 +01:00
if ( check_acl ( $config [ " id_user " ], $agent [ " id_grupo " ], " AW " )) {
2013-01-14 16:11:07 +01:00
$main_tab = 'main' ;
}
else {
$main_tab = 'module' ;
}
2016-09-22 10:27:35 +02:00
if ( $agent [ " alias " ] == '' ){
$agent [ " alias " ] = $agent [ " nombre " ];
}
echo " <a alt = " . $agent [ " nombre " ] . " href='index.php?sec=gagente&
2013-01-14 16:11:07 +01:00
sec2 = godmode / agentes / configurar_agente & tab = $main_tab &
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
id_agente = " . $agent["id_agente"] . " ' > " .
2016-09-22 10:27:35 +02:00
'<span style="font-size: 7pt" title="' . $agent [ " nombre " ] . '">' . $agent [ " alias " ] . '</span>' .
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
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,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
" </a> " ;
echo " </strong> " ;
2017-09-04 10:26:30 +02:00
2017-10-18 11:15:51 +02:00
$in_planned_downtime = db_get_sql ( ' SELECT executed FROM tplanned_downtime
INNER JOIN tplanned_downtime_agents ON tplanned_downtime . id = tplanned_downtime_agents . id_downtime
WHERE tplanned_downtime_agents . id_agent = '. $agent["id_agente"] . ' AND tplanned_downtime . executed = 1 ' );
2009-02-04 12:20:31 +01:00
if ( $agent [ " disabled " ]) {
2011-04-13 18:11:02 +02:00
ui_print_help_tip ( __ ( 'Disabled' ));
2017-09-04 10:26:30 +02:00
if ( ! $in_planned_downtime ) {
echo " </em> " ;
}
}
2017-10-18 11:15:51 +02:00
if ( $agent [ 'quiet' ]) {
echo " " ;
html_print_image ( " images/dot_green.disabled.png " , false , array ( " border " => '0' , " title " => __ ( 'Quiet' ), " alt " => " " ));
}
2017-09-04 10:26:30 +02:00
if ( $in_planned_downtime ) {
ui_print_help_tip ( __ ( 'Agent in planned downtime' ), false , 'images/minireloj-16.png' );
2009-02-04 12:20:31 +01:00
echo " </em> " ;
}
2017-09-04 10:26:30 +02:00
2009-02-04 12:20:31 +01:00
echo '</span><div class="left actions" style="visibility: hidden; clear: left">' ;
2013-02-27 10:51:48 +01:00
if ( check_acl ( $config [ " id_user " ], $agent [ " id_grupo " ], " AW " )) {
2013-01-14 16:11:07 +01:00
echo ' < a href = " index.php?sec=gagente&
sec2 = godmode / agentes / configurar_agente & tab = main &
id_agente = '.$agent["id_agente"].' " >'.__('Edit').'</a>';
echo ' | ' ;
}
2012-04-24 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/menu.php,
godmode/agentes/agent_template.php,
godmode/agentes/fields_manager.php,
godmode/agentes/agent_conf_gis.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/agent_manager.php,
godmode/menu.php: Fixed some problems with links and new menu structure.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6127 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-04-24 12:02:06 +02:00
echo ' < a href = " index.php?sec=gagente&
2009-02-04 12:20:31 +01:00
sec2 = godmode / agentes / configurar_agente & tab = module &
id_agente = '.$agent["id_agente"].' " >'.__('Modules').'</a>';
echo ' | ' ;
2012-04-24 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/menu.php,
godmode/agentes/agent_template.php,
godmode/agentes/fields_manager.php,
godmode/agentes/agent_conf_gis.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/agent_manager.php,
godmode/menu.php: Fixed some problems with links and new menu structure.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6127 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-04-24 12:02:06 +02:00
echo ' < a href = " index.php?sec=gagente&
2009-02-04 12:20:31 +01:00
sec2 = godmode / agentes / configurar_agente & tab = alert &
id_agente = '.$agent["id_agente"].' " >'.__('Alerts').'</a>';
echo ' | ' ;
2013-01-30 15:09:28 +01:00
echo ' < a href = " index.php?sec=estado
2009-02-04 12:20:31 +01:00
& sec2 = operation / agentes / ver_agente
& id_agente = '.$agent["id_agente"].' " >'.__('View').'</a>';
echo '</div>' ;
2015-07-02 12:38:45 +02:00
echo " </td> " ;
echo " <td align='left' class=' $tdcolor '> " ;
// Has remote configuration ?
if ( enterprise_installed ()) {
enterprise_include_once ( 'include/functions_config_agents.php' );
2017-02-10 11:43:12 +01:00
if ( enterprise_hook ( 'config_agents_has_remote_configuration' , array ( $agent [ " id_agente " ]))) {
2015-07-02 12:38:45 +02:00
echo " <a href='index.php? " .
" sec=gagente& " .
" sec2=godmode/agentes/configurar_agente& " .
" tab=remote_configuration& " .
" id_agente= " . $agent [ " id_agente " ] . " &disk_conf=1'> " ;
echo html_print_image ( " images/application_edit.png " , true , array ( " align " => 'middle' , " title " => __ ( 'Edit remote config' )));
echo " </a> " ;
}
}
2015-06-12 15:50:46 +02:00
echo " </td> " ;
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
2009-02-04 12:20:31 +01:00
// Operating System icon
2015-06-12 15:50:46 +02:00
echo " <td class=' $tdcolor ' align='left' valign='middle'> " ;
2011-04-13 18:11:02 +02:00
ui_print_os_icon ( $agent [ " id_os " ], false );
2009-02-04 12:20:31 +01:00
echo " </td> " ;
2017-07-24 15:53:31 +02:00
// Type agent (Networt, Software or Satellite)
echo " <td class=' $tdcolor ' align='left' valign='middle'> " ;
echo ui_print_type_agent_icon ( $agent [ " id_os " ], $agent [ 'ultimo_contacto_remoto' ],
$agent [ 'ultimo_contacto' ], $agent [ 'remote' ], $agent [ 'agent_version' ]);
echo " </td> " ;
2009-02-04 12:20:31 +01:00
// Group icon and name
2015-06-12 15:50:46 +02:00
echo " <td class=' $tdcolor ' align='left' valign='middle'> " . ui_print_group_icon ( $id_grupo , true ) . " </td> " ;
2009-02-04 12:20:31 +01:00
// Description
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_ui.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php.
operation/integria_incidents/incident.incident.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php,
mobile/operation/events/events.php,
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
godmode/users/configure_user.php,
godmode/modules/manage_network_templates.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
now we are trying that more easy and standar, now the string name of
agent have the equal number of characters in all code...but there
are two styles, small and medium size for agents text name, modules
text name, but description is only size. You can set this sizes in
the visual setup page into your Pandora.
MERGED from 4.0.2
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-14 18:23:23 +02:00
echo " <td class=' " . $tdcolor . " f9'> " .
ui_print_truncate_text ( $agent [ " comentarios " ], 'description' , true , true , true , '[…]' , 'font-size: 6.5pt;' ) . " </td> " ;
2009-02-04 12:20:31 +01:00
// Action
2009-09-14 17:35:22 +02:00
//When there is only one element in page it's necesary go back page.
if (( count ( $agents ) == 1 ) && ( $offset >= $config [ " block_size " ]))
$offsetArg = $offset - $config [ " block_size " ];
else
$offsetArg = $offset ;
2015-06-12 15:50:46 +02:00
echo " <td class=' $tdcolor ' align='left' style='width:7%' valign='middle'> " ;
2013-01-14 16:11:07 +01:00
if ( $agent [ 'disabled' ]) {
echo " <a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
2015-01-12 16:20:07 +01:00
enable_agent = " . $agent["id_agente"] . " & group_id = $ag_group & recursion = $recursion & search = $search & offset = $offsetArg & sort_field = $sortField & sort = $sort & disabled = $disabled '' > " .
2013-01-14 16:11:07 +01:00
html_print_image ( 'images/lightbulb_off.png' , true , array ( 'alt' => __ ( 'Enable agent' ), 'title' => __ ( 'Enable agent' ))) . " </a> " ;
}
else {
echo " <a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
2015-01-12 16:20:07 +01:00
disable_agent = " . $agent["id_agente"] . " & group_id = $ag_group & recursion = $recursion & search = $search & offset = $offsetArg & sort_field = $sortField & sort = $sort & disabled = $disabled ' > " .
2013-01-14 16:11:07 +01:00
html_print_image ( 'images/lightbulb.png' , true , array ( 'alt' => __ ( 'Disable agent' ), 'title' => __ ( 'Disable agent' ))) . " </a> " ;
}
2013-02-27 10:51:48 +01:00
if ( check_acl ( $config [ " id_user " ], $agent [ " id_grupo " ], " AW " )) {
2013-01-14 16:11:07 +01:00
echo " <a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
2015-01-12 16:20:07 +01:00
borrar_agente = " . $agent["id_agente"] . " & group_id = $ag_group & recursion = $recursion & search = $search & offset = $offsetArg & sort_field = $sortField & sort = $sort & disabled = $disabled ' " ;
2013-01-14 16:11:07 +01:00
echo ' onClick="if (!confirm(\' ' . __ ( 'Are you sure?' ) . '\')) return false;">' ;
echo html_print_image ( 'images/cross.png' , true , array ( " border " => '0' )) . " </a> " ;
}
echo " </td> " ;
2006-03-27 05:37:27 +02:00
}
2007-06-06 18:23:24 +02:00
echo " </table> " ;
2017-12-14 17:28:33 +01:00
ui_pagination ( $total_agents , " index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id= $ag_group &search= $search &sort_field= $sortField &sort= $sort &disabled= $disabled &os= $os " , $offset );
2015-04-01 13:24:53 +02:00
echo " <table width='100%'><tr><td align='right'> " ;
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
}
else {
2015-06-15 15:50:28 +02:00
ui_print_info_message ( array ( 'no_close' => true , 'message' => __ ( 'There are no defined agents' ) ) );
2007-04-21 18:14:11 +02:00
}
2007-04-11 05:12:48 +02:00
2013-02-27 10:51:48 +01:00
if ( check_acl ( $config [ " id_user " ], 0 , " AW " )) {
2013-01-14 16:11:07 +01:00
// Create agent button
2015-04-01 13:24:53 +02:00
echo '<div style="text-align: right;">' ;
2013-01-14 16:11:07 +01:00
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">' ;
html_print_input_hidden ( 'new_agent' , 1 );
2013-11-07 12:27:23 +01:00
html_print_submit_button ( __ ( 'Create agent' ), 'crt-2' , false ,
2013-02-27 10:51:48 +01:00
'class="sub next"' );
2013-01-14 16:11:07 +01:00
echo " </form> " ;
2013-10-07 13:11:30 +02:00
echo '</div>' ;
2013-01-14 16:11:07 +01:00
}
echo " </td></tr></table> " ;
2006-10-07 13:52:52 +02:00
?>
2009-02-04 12:20:31 +01:00
< script type = " text/javascript " >
2013-08-01 18:20:36 +02:00
$ ( document ) . ready ( function () {
$ ( " table#agent_list tr " ) . hover ( function () {
$ ( " .actions " , this ) . css ( " visibility " , " " );
},
function () {
$ ( " .actions " , this ) . css ( " visibility " , " hidden " );
2013-02-27 10:51:48 +01:00
});
2013-08-01 18:20:36 +02:00
$ ( " #ag_group " ) . click (
function () {
2015-06-08 13:13:09 +02:00
$ ( this ) . css ( " width " , " auto " );
$ ( this ) . css ( " min-width " , " 100px " );
2013-08-01 18:20:36 +02:00
});
$ ( " #ag_group " ) . blur ( function () {
2015-06-08 13:13:09 +02:00
$ ( this ) . css ( " width " , " 100px " );
2013-02-27 10:51:48 +01:00
});
2013-08-01 18:20:36 +02:00
});
2009-02-04 12:20:31 +01:00
</ script >