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');
|
2011-07-11 06:28:21 +02:00
|
|
|
$recursion = get_parameter('recursion');
|
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');
|
|
|
|
|
|
|
|
$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
|
|
|
|
|
|
|
// Check if the remote config file still exist
|
2011-08-17 16:27:56 +02:00
|
|
|
if (isset ($config["remote_config"])) {
|
2013-08-19 08:43:12 +02:00
|
|
|
enterprise_include_once('include/functions_config_agents.php');
|
|
|
|
if (enterprise_hook('config_agents_has_remote_configuration', $id_agente)) {
|
2013-05-13 12:52:51 +02:00
|
|
|
ui_print_error_message(__('Maybe the files conf or md5 could not be deleted'));
|
|
|
|
}
|
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));
|
|
|
|
|
|
|
|
if ($result) {
|
|
|
|
db_pandora_audit("Agent management", 'Enable ' . $enable_agent);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
db_pandora_audit("Agent management", 'Fail to enable ' . $enable_agent);
|
|
|
|
}
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
if ($result) {
|
|
|
|
db_pandora_audit("Agent management", 'Disable ' . $disable_agent);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
db_pandora_audit("Agent management", 'Fail to disable ' . $disable_agent);
|
|
|
|
}
|
|
|
|
|
|
|
|
ui_print_result_message ($result,
|
|
|
|
__('Successfully disabled'), __('Could not be disabled'));
|
|
|
|
}
|
|
|
|
|
2013-06-20 11:21:28 +02:00
|
|
|
echo "<table cellpadding='4' cellspacing='4' class='databox' width='98%' style='font-weight: bold; margin-bottom: 10px;'>
|
|
|
|
<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']);
|
|
|
|
if (!$own_info['is_admin'] && !check_acl ($config['id_user'], 0, "PM"))
|
|
|
|
$return_all_group = false;
|
|
|
|
else
|
|
|
|
$return_all_group = true;
|
|
|
|
html_print_select_groups(false, "AR", $return_all_group, "ag_group", $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false, 'width:100px;');
|
2010-04-22 18:51:23 +02:00
|
|
|
|
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
|
|
|
|
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
|
|
|
|
2013-05-23 17:42:32 +02:00
|
|
|
echo '<div style="text-align: right; float: right;">';
|
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 '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
2011-04-27 15:43:31 +02:00
|
|
|
html_print_input_hidden ('new_agent', 1);
|
|
|
|
html_print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"');
|
2010-10-25 17:55:16 +02:00
|
|
|
echo "</form>";
|
2013-05-23 17:42:32 +02:00
|
|
|
echo "</div>";
|
2008-01-10 17:40:00 +01:00
|
|
|
|
2013-08-01 18:20:36 +02:00
|
|
|
|
2010-07-19 14:01:55 +02:00
|
|
|
$selected = 'border: 1px solid black;';
|
|
|
|
$selectNameUp = '';
|
|
|
|
$selectNameDown = '';
|
|
|
|
$selectOsUp = '';
|
|
|
|
$selectOsDown = '';
|
|
|
|
$selectGroupUp = '';
|
|
|
|
$selectGroupDown = '';
|
|
|
|
switch ($sortField) {
|
|
|
|
case 'name':
|
|
|
|
switch ($sort) {
|
|
|
|
case 'up':
|
|
|
|
$selectNameUp = $selected;
|
2013-02-27 10:51:48 +01:00
|
|
|
$order = array('field' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'field2' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'order' => 'ASC');
|
2010-07-19 14:01:55 +02:00
|
|
|
break;
|
|
|
|
case 'down':
|
|
|
|
$selectNameDown = $selected;
|
2013-02-27 10:51:48 +01:00
|
|
|
$order = array('field' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'field2' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'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',
|
|
|
|
'field2' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'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',
|
|
|
|
'field2' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'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',
|
|
|
|
'field2' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'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',
|
|
|
|
'field2' => 'nombre COLLATE utf8_general_ci',
|
|
|
|
'order' => 'DESC');
|
2010-07-19 14:01:55 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$selectNameUp = $selected;
|
|
|
|
$selectNameDown = '';
|
|
|
|
$selectOsUp = '';
|
|
|
|
$selectOsDown = '';
|
|
|
|
$selectGroupUp = '';
|
|
|
|
$selectGroupDown = '';
|
2012-06-14 18:10:10 +02:00
|
|
|
$order = array('field' => 'nombre COLLATE utf8_general_ci', 'field2' => 'nombre COLLATE utf8_general_ci', '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 != "") {
|
2009-10-13 Sancho Lerena <slerena@artica.es>
Upps, Tuesday #13, bad day for a last commit before launch RC1 ! :-S
* general/logon_ok.php: Fixed ugly format of table showing last activity
(has a too wide table width).
* godmode/admin_access_logs.php: Removed that crappy div fashion code and
replaced by old and reliable table-based-code :-) to fix the mess with the
pagination.
* godmode/agentes/configurar_agente.php: fixed problem with postprocess
values very bug (like 0.0000000123), parameter is now passed as string
because PHP is passing the value as scientific notation and mYsql don't
understand that.
* operation/agentes/exportdata.php,
* operation/search_results.php,
* godmode/reporting/map_builder.php,
* godmode/agentes/agent_manager.php,
* godmode/reporting/graph_builder.php,
* godmode/agentes/modificar_agente.php: Added non-case search SQL code for make
agent searches non case sensitive (nombre COLLATE utf8_general_ci LIKE...)
* module_manager_editor_common.php: More size for postprocess field.
* pandora_console/godmode/alerts/configure_alert_action.php: More width for
field2 in action form.
* godmode/alerts/configure_alert_command.php: Command field has more width
and added a help icon for macro subtitutions.
* include/functions_db.php: get_agent_name() now defaults to non uppercase
the agent names, because 3.0 has case sensitive agent names, and all
data must show the real Case.
* include/styles/pandora.css: removed uppercase transition for menu items
and agent tabs.
* operation/agentes/estado_agente.php: Agent is not shown in uppercase
anymore.
* operation/agentes/estado_generalagente.php: Agent name and parent name
is not in uppercase. OS version shows only last 15 characters or full string
if strlen() < 15.
* operation/agentes/status_monitor.php: Agent name is not in uppercase
anymore.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2015 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-13 20:59:48 +02:00
|
|
|
$search_sql = " AND ( nombre COLLATE utf8_general_ci LIKE '%$search%' OR direccion LIKE '%$search%') ";
|
2008-01-10 17:40:00 +01:00
|
|
|
}
|
|
|
|
|
2011-11-24 19:19:09 +01:00
|
|
|
// Show only selected groups
|
2010-04-22 18:51:23 +02:00
|
|
|
if ($ag_group > 0) {
|
2009-02-04 12:20:31 +01:00
|
|
|
$sql = sprintf ('SELECT COUNT(*)
|
|
|
|
FROM tagente
|
|
|
|
WHERE id_grupo = %d
|
2013-02-27 10:51:48 +01:00
|
|
|
%s',
|
2009-02-04 12:20:31 +01:00
|
|
|
$ag_group, $search_sql);
|
* 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
|
|
|
$total_agents = db_get_sql ($sql);
|
2013-05-13 12:52:51 +02:00
|
|
|
|
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
|
|
|
|
ORDER BY %s, %s %s
|
|
|
|
LIMIT %d, %d',
|
2012-06-14 18:10:10 +02:00
|
|
|
implode (",", $ag_groups), $search_sql, $order['field'], $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
|
|
|
|
ORDER BY %s, %s %s
|
|
|
|
LIMIT %d OFFSET %d',
|
2012-06-14 18:10:10 +02:00
|
|
|
implode (",", $ag_groups), $search_sql, $order['field'], $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
|
2012-06-14 18:10:10 +02:00
|
|
|
ORDER BY %s, %s %s',
|
|
|
|
implode (",", $ag_groups), $search_sql, $order['field'], $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
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2013-08-01 18:20:36 +02:00
|
|
|
|
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
|
|
|
// Admin user get ANY group, even if they doesnt exist
|
|
|
|
if (check_acl ($config['id_user'], 0, "PM")) {
|
2013-01-14 16:11:07 +01:00
|
|
|
$sql = sprintf ('SELECT COUNT(*) FROM tagente WHERE 1=1 %s', $search_sql);
|
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
|
|
|
$total_agents = db_get_sql ($sql);
|
|
|
|
switch ($config["dbtype"]) {
|
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
|
|
|
case "mysql":
|
|
|
|
$sql = sprintf ('SELECT *
|
2013-02-27 10:51:48 +01:00
|
|
|
FROM tagente
|
|
|
|
WHERE 1=1
|
|
|
|
%s
|
2013-01-14 16:11:07 +01:00
|
|
|
ORDER BY %s, %s %s LIMIT %d, %d', $search_sql, $order['field'], $order['field2'],
|
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
|
|
|
$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 *
|
2013-02-27 10:51:48 +01:00
|
|
|
FROM tagente
|
|
|
|
WHERE 1=1
|
|
|
|
%s
|
2013-01-14 16:11:07 +01:00
|
|
|
ORDER BY %s, %s %s LIMIT %d OFFSET %d', $search_sql, $order['field'], $order['field2'],
|
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
|
|
|
$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 *
|
2013-02-27 10:51:48 +01:00
|
|
|
FROM tagente
|
|
|
|
WHERE 1=1
|
|
|
|
%s
|
2013-01-14 16:11:07 +01:00
|
|
|
ORDER BY %s, %s %s', $search_sql, $order['field'], $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
|
|
|
}
|
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
|
|
|
}
|
|
|
|
else {
|
2013-01-14 16:11:07 +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');
|
|
|
|
|
|
|
|
$user_groups = $user_groupsAW + $user_groupsAD;
|
|
|
|
|
2011-11-24 19:19:09 +01:00
|
|
|
$sql = sprintf ('SELECT COUNT(*)
|
|
|
|
FROM tagente
|
2013-01-14 16:11:07 +01:00
|
|
|
WHERE id_grupo IN (%s)
|
2013-02-27 10:51:48 +01:00
|
|
|
%s',
|
2013-01-14 16:11:07 +01:00
|
|
|
implode (',', array_keys ($user_groups)),
|
|
|
|
$search_sql);
|
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
|
|
|
|
2011-11-24 19:19:09 +01:00
|
|
|
$total_agents = db_get_sql ($sql);
|
2013-02-27 10:51:48 +01:00
|
|
|
|
2011-11-24 19:19:09 +01:00
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
$sql = sprintf ('SELECT *
|
|
|
|
FROM tagente
|
2013-01-14 16:11:07 +01:00
|
|
|
WHERE id_grupo IN (%s)
|
2013-02-27 10:51:48 +01:00
|
|
|
%s
|
|
|
|
ORDER BY %s, %s %s
|
|
|
|
LIMIT %d, %d',
|
2013-01-14 16:11:07 +01:00
|
|
|
implode (',', array_keys ($user_groups)),
|
|
|
|
$search_sql, $order['field'], $order['field2'], $order['order'], $offset, $config["block_size"]);
|
2011-11-24 19:19:09 +01:00
|
|
|
break;
|
|
|
|
case "postgresql":
|
|
|
|
$sql = sprintf ('SELECT *
|
|
|
|
FROM tagente
|
2013-01-14 16:11:07 +01:00
|
|
|
WHERE id_grupo IN (%s)
|
2013-02-27 10:51:48 +01:00
|
|
|
%s
|
|
|
|
ORDER BY %s, %s %s
|
|
|
|
LIMIT %d OFFSET %d',
|
2013-01-14 16:11:07 +01:00
|
|
|
implode (',', array_keys ($user_groups)),
|
|
|
|
$search_sql, $order['field'], $order['field2'], $order['order'], $config["block_size"], $offset);
|
2011-11-24 19:19:09 +01:00
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$set = array ();
|
|
|
|
$set['limit'] = $config["block_size"];
|
|
|
|
$set['offset'] = $offset;
|
|
|
|
$sql = sprintf ('SELECT *
|
|
|
|
FROM tagente
|
2013-01-14 16:11:07 +01:00
|
|
|
WHERE id_grupo IN (%s)
|
2013-02-27 10:51:48 +01:00
|
|
|
%s
|
2012-06-14 18:10:10 +02:00
|
|
|
ORDER BY %s, %s %s',
|
2013-01-14 16:11:07 +01:00
|
|
|
implode (',', array_keys ($user_groups)),
|
2012-06-14 18:10:10 +02:00
|
|
|
$search_sql, $order['field'], $order['field2'], $order['order']);
|
2011-11-24 19:19:09 +01:00
|
|
|
$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
|
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
|
|
|
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", $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
|
|
|
|
2011-06-28 15:31:52 +02:00
|
|
|
echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='98%' class='databox'>";
|
2010-07-19 14:01:55 +02:00
|
|
|
echo "<th>".__('Agent name') . ' ' .
|
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
|
|
|
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=up">' . 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 .'&offset='.$offset.'&sort_field=name&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>';
|
2010-07-19 14:01:55 +02:00
|
|
|
echo "</th>";
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
echo "<th title='".__('Remote agent configuration')."'>".__('R')."</th>";
|
2010-07-19 14:01:55 +02:00
|
|
|
echo "<th>".__('OS'). ' ' .
|
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
|
|
|
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=os&sort=up">' . 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 .'&offset='.$offset.'&sort_field=os&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectOsDown)) . '</a>';
|
2010-07-19 14:01:55 +02:00
|
|
|
echo "</th>";
|
|
|
|
echo "<th>".__('Group'). ' ' .
|
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
|
|
|
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=group&sort=up">' . 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 .'&offset='.$offset.'&sort_field=group&sort=down">' . 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>";
|
|
|
|
echo "<th>" . __('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) {
|
|
|
|
$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>";
|
|
|
|
if ($agent['quiet']) {
|
|
|
|
html_print_image("images/dot_green.disabled.png", false, array("border" => '0', "title" => __('Quiet'), "alt" => ""));
|
|
|
|
echo " ";
|
|
|
|
}
|
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';
|
|
|
|
}
|
|
|
|
|
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 "<a 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"] . "'>" .
|
|
|
|
ui_print_truncate_text($agent["nombre"], 'agent_medium', true, true, true, '[…]', 'font-size: 7pt') .
|
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>";
|
2009-02-04 12:20:31 +01:00
|
|
|
if ($agent["disabled"]) {
|
2011-04-13 18:11:02 +02:00
|
|
|
ui_print_help_tip(__('Disabled'));
|
2009-02-04 12:20:31 +01:00
|
|
|
echo "</em>";
|
|
|
|
}
|
|
|
|
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>';
|
|
|
|
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
|
|
|
echo "<td align='center' class='$tdcolor'>";
|
|
|
|
// Has remote configuration ?
|
2013-08-08 08:23:48 +02:00
|
|
|
if (enterprise_installed()) {
|
2013-08-19 08:43:12 +02:00
|
|
|
enterprise_include_once('include/functions_config_agents.php');
|
|
|
|
if (enterprise_hook('config_agents_has_remote_configuration', $agent["id_agente"])) {
|
2013-08-08 08:23:48 +02:00
|
|
|
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&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>";
|
|
|
|
}
|
2006-07-03 12:49:42 +02:00
|
|
|
}
|
2009-02-04 12:20:31 +01: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
|
2010-09-27 12:31:21 +02:00
|
|
|
echo "<td class='$tdcolor' align='center' 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>";
|
|
|
|
// Group icon and name
|
2011-04-13 18:11:02 +02:00
|
|
|
echo "<td class='$tdcolor' align='center' 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;
|
|
|
|
|
2013-01-14 16:11:07 +01:00
|
|
|
echo "<td class='$tdcolor' align='center' valign='middle'>";
|
|
|
|
|
|
|
|
if ($agent['disabled']) {
|
|
|
|
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
|
|
|
enable_agent=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort''>".
|
|
|
|
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&
|
|
|
|
disable_agent=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort'>".
|
|
|
|
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&
|
|
|
|
borrar_agente=".$agent["id_agente"]."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort'";
|
|
|
|
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>";
|
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
|
|
|
ui_pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort", $offset);
|
2009-02-04 12:20:31 +01:00
|
|
|
echo "<table width='95%'><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 {
|
2013-08-01 18:20:36 +02:00
|
|
|
echo "<div class='nf'>" . __('There are no defined agents') . "</div>";
|
2007-04-24 15:38:44 +02:00
|
|
|
echo " </td></tr><tr><td>";
|
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
|
|
|
|
echo '<a name="bottom">';
|
|
|
|
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
|
|
|
html_print_input_hidden ('new_agent', 1);
|
2013-02-27 10:51:48 +01:00
|
|
|
html_print_submit_button (__('Create agent'), 'crt', false,
|
|
|
|
'class="sub next"');
|
2013-01-14 16:11:07 +01:00
|
|
|
echo "</form>";
|
|
|
|
}
|
|
|
|
|
|
|
|
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 () {
|
|
|
|
$(this).css ("width", "auto");
|
|
|
|
$(this).css ("min-width", "100px");
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#ag_group").blur (function () {
|
2013-02-27 10:51:48 +01:00
|
|
|
$(this).css ("width", "100px");
|
|
|
|
});
|
2013-08-01 18:20:36 +02:00
|
|
|
|
|
|
|
});
|
2009-02-04 12:20:31 +01:00
|
|
|
</script>
|