2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:15:58 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2010-05-31 13:41:10 +02:00
|
|
|
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
2009-06-08 20:15:58 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2006-07-17 18:37:43 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-08-22 20:07:32 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-17 18:37:43 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
2011-04-11 19:05:20 +02:00
|
|
|
global $config;
|
|
|
|
|
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
|
|
|
// Load global vars
|
2009-04-01 10:04:49 +02:00
|
|
|
require_once ("include/config.php");
|
2009-05-19 21:04:43 +02:00
|
|
|
require_once ("include/functions_agents.php");
|
2010-12-22 17:28:37 +01:00
|
|
|
require_once ("include/functions_reporting.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_modules.php');
|
|
|
|
require_once ('include/functions_users.php');
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
|
|
|
|
check_login();
|
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
if (!check_acl ($config['id_user'], 0, "RR")) {
|
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
|
|
|
require ("general/noaccess.php");
|
|
|
|
return;
|
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2011-04-13 18:11:02 +02:00
|
|
|
ui_require_javascript_file ('calendar');
|
2009-05-19 21:04:43 +02:00
|
|
|
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
|
|
|
|
// Header
|
2013-04-10 09:57:54 +02:00
|
|
|
ui_print_page_header (__("Export data"), "images/server_export_mc.png");
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
|
2010-04-22 18:51:23 +02:00
|
|
|
$group = get_parameter_post ('group', 0);
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
$agentName = get_parameter_post ('agent', 0);
|
2018-10-04 19:08:01 +02:00
|
|
|
$agents = agents_get_agents(
|
|
|
|
array('nombre LIKE "' . $agentName . '"'), array ('id_agente'));
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
$agent = $agents[0]['id_agente'];
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$module = (array) get_parameter_post ('module_arr', array ());
|
|
|
|
$start_date = get_parameter_post ('start_date', 0);
|
|
|
|
$end_date = get_parameter_post ('end_date', 0);
|
|
|
|
$start_time = get_parameter_post ('start_time', 0);
|
|
|
|
$end_time = get_parameter_post ('end_time', 0);
|
|
|
|
$export_type = get_parameter_post ('export_type', 'data');
|
2012-06-06 14:05:33 +02:00
|
|
|
$export_btn = get_parameter ('export_btn', 0);
|
2009-05-19 21:04:43 +02:00
|
|
|
|
2014-10-16 11:50:21 +02:00
|
|
|
$show_form = false;
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
if (!empty ($export_btn) && !empty ($module)) {
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
// Disable SQL cache
|
|
|
|
global $sql_cache;
|
2016-05-03 16:06:13 +02:00
|
|
|
$sql_cache = array ('saved' => array());
|
2012-09-12 17:53:58 +02:00
|
|
|
|
|
|
|
|
2018-06-11 16:40:10 +02:00
|
|
|
// Convert start time and end time to unix timestamps.
|
|
|
|
// The date/time will have the user's timezone,
|
|
|
|
// so we need to change it to the system's timezone.
|
|
|
|
$fixed_offset = get_fixed_offset();
|
|
|
|
$start = strtotime ($start_date . " " . $start_time) - $fixed_offset;
|
|
|
|
$end = strtotime ($end_date . " " . $end_time) - $fixed_offset;
|
2009-05-19 21:04:43 +02:00
|
|
|
$period = $end - $start;
|
2012-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js,
godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_list.list.php,
godmode/gis_maps/configure_gis_map.php,
include/functions_visual_map_editor.php, include/functions_ui.php,
operation/tree.php, operation/agentes/exportdata.excel.php,
operation/agentes/exportdata.php, operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/ajax.php, operation/events/events_validate.php,
operation/messages/message_edit.php,
operation/messages/message_list.php,
operation/reporting/reporting_viewer.php,
operation/netflow/nf_live_view.php,
operation/incidents/incident.php, operation/search_modules.php:
started to use the new function "ui_print_agent_autocomplete_input"
to make more easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-18 13:28:09 +02:00
|
|
|
$data = array ();
|
2009-05-19 21:04:43 +02:00
|
|
|
|
2018-06-11 16:40:10 +02:00
|
|
|
// If time is negative or zero, don't process - it's invalid
|
2009-05-19 21:04:43 +02:00
|
|
|
if ($start < 1 || $end < 1) {
|
2011-04-13 18:11:02 +02:00
|
|
|
ui_print_error_message (__('Invalid time specified'));
|
2009-05-19 21:04:43 +02:00
|
|
|
return;
|
|
|
|
}
|
2012-09-12 17:53:58 +02:00
|
|
|
|
|
|
|
//******************************************************************
|
2009-05-19 21:04:43 +02:00
|
|
|
// Starts, ends and dividers
|
2012-09-12 17:53:58 +02:00
|
|
|
//******************************************************************
|
2009-05-19 21:04:43 +02:00
|
|
|
switch ($export_type) {
|
|
|
|
case "data":
|
|
|
|
case "avg":
|
|
|
|
default:
|
|
|
|
//HTML output - don't style or use XHTML just in case somebody needs to copy/paste it. (Office doesn't handle <thead> and <tbody>)
|
2015-09-29 13:14:55 +02:00
|
|
|
$datastart = '<table style="width:100%;" class="databox data">' .
|
2014-04-01 15:50:58 +02:00
|
|
|
'<tr>' .
|
|
|
|
'<th>' . __('Agent') . '</th>' .
|
|
|
|
'<th>' . __('Module') . '</th>' .
|
|
|
|
'<th>' . __('Data') . '</th>' .
|
|
|
|
'<th>' .__('Timestamp') . '</th>' .
|
|
|
|
'</tr>';
|
2015-09-29 13:14:55 +02:00
|
|
|
$rowstart = '<tr><td>';
|
|
|
|
$divider = '</td><td>';
|
2009-05-19 21:04:43 +02:00
|
|
|
$rowend = '</td></tr>';
|
|
|
|
$dataend = '</table>';
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2010-02-01 20:22:34 +01:00
|
|
|
}
|
2012-09-12 17:53:58 +02:00
|
|
|
|
|
|
|
//******************************************************************
|
2010-02-01 20:22:34 +01:00
|
|
|
// Data processing
|
2012-09-12 17:53:58 +02:00
|
|
|
//******************************************************************
|
2010-02-01 20:22:34 +01:00
|
|
|
$data = array ();
|
|
|
|
switch ($export_type) {
|
|
|
|
case "data":
|
2010-12-22 17:28:37 +01:00
|
|
|
case "avg":
|
2010-02-01 20:22:34 +01:00
|
|
|
// Show header
|
|
|
|
echo $datastart;
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
foreach ($module as $selected) {
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
$output = "";
|
2014-10-16 16:10:53 +02:00
|
|
|
$work_period = SECONDS_1DAY;
|
2010-11-26 13:44:18 +01:00
|
|
|
if ($work_period > $period) {
|
|
|
|
$work_period = $period;
|
|
|
|
}
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
$work_end = $end - $period + $work_period;
|
2016-04-04 08:43:51 +02:00
|
|
|
$work_start = $work_end - $work_period;
|
2010-02-01 20:22:34 +01:00
|
|
|
//Buffer to get data, anyway this will report a memory exhaustin
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2014-10-16 16:10:53 +02:00
|
|
|
$flag_last_time_slice = false;
|
2010-11-26 13:44:18 +01:00
|
|
|
while ($work_end <= $end) {
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
$data = array (); // Reinitialize array for each module chunk
|
2014-04-01 15:50:58 +02:00
|
|
|
|
2010-12-22 17:28:37 +01:00
|
|
|
if ($export_type == "avg") {
|
|
|
|
$arr = array ();
|
2014-10-16 16:10:53 +02:00
|
|
|
$arr["data"] =
|
|
|
|
reporting_get_agentmodule_data_average(
|
|
|
|
$selected, $work_period, $work_end);
|
2010-12-22 17:28:37 +01:00
|
|
|
if ($arr["data"] === false) {
|
2015-02-11 09:54:44 +01:00
|
|
|
$work_end = $work_end + $work_period;
|
2010-12-22 17:28:37 +01:00
|
|
|
continue;
|
2012-09-12 17:53:58 +02:00
|
|
|
}
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$arr["module_name"] = modules_get_agentmodule_name ($selected);
|
|
|
|
$arr["agent_name"] = modules_get_agentmodule_agent_name ($selected);
|
|
|
|
$arr["agent_id"] = modules_get_agentmodule_agent ($selected);
|
2012-09-12 17:53:58 +02:00
|
|
|
$arr["utimestamp"] = $end;
|
2010-12-22 17:28:37 +01:00
|
|
|
array_push ($data, $arr);
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
}
|
|
|
|
else {
|
2014-04-01 15:50:58 +02:00
|
|
|
$data_single = modules_get_agentmodule_data(
|
|
|
|
$selected, $work_period, $work_end);
|
|
|
|
|
2010-12-22 17:28:37 +01:00
|
|
|
if (!empty ($data_single)) {
|
|
|
|
$data = array_merge ($data, $data_single);
|
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
}
|
2012-04-23 13:52:41 +02:00
|
|
|
|
2014-10-16 16:10:53 +02:00
|
|
|
|
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
foreach ($data as $key => $module) {
|
|
|
|
$output .= $rowstart;
|
2016-10-03 12:24:15 +02:00
|
|
|
$alias = db_get_value ("alias","tagente","id_agente",$module['agent_id']);
|
|
|
|
$output .= io_safe_output($alias);
|
2010-02-01 20:22:34 +01:00
|
|
|
$output .= $divider;
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$output .= io_safe_output($module['module_name']);
|
2010-02-01 20:22:34 +01:00
|
|
|
$output .= $divider;
|
|
|
|
$output .= $module['data'];
|
|
|
|
$output .= $divider;
|
2016-04-04 08:43:51 +02:00
|
|
|
switch($export_type) {
|
2018-06-11 16:40:10 +02:00
|
|
|
case "data":
|
|
|
|
// Change from the system's timezone to the user's timezone
|
|
|
|
$output .= date("Y-m-d G:i:s", $module['utimestamp'] + $fixed_offset);
|
|
|
|
break;
|
|
|
|
case "avg":
|
|
|
|
// Change from the system's timezone to the user's timezone
|
|
|
|
$output .= date ("Y-m-d G:i:s", $work_start + $fixed_offset)
|
|
|
|
. ' - '
|
|
|
|
. date ("Y-m-d G:i:s", $work_end + $fixed_offset);
|
|
|
|
break;
|
2016-04-04 08:43:51 +02:00
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
$output .= $rowend;
|
|
|
|
}
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
switch ($export_type) {
|
|
|
|
default:
|
|
|
|
case "data":
|
|
|
|
case "avg":
|
|
|
|
echo $output;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
unset($output);
|
|
|
|
$output = "";
|
|
|
|
unset($data);
|
|
|
|
unset($data_single);
|
2014-10-16 16:10:53 +02:00
|
|
|
|
|
|
|
// The last time slice is executed now exit of
|
|
|
|
// while loop
|
|
|
|
if ($flag_last_time_slice)
|
|
|
|
breaK;
|
|
|
|
|
2015-09-29 13:12:17 +02:00
|
|
|
if (($work_end + $work_period) > $end || $work_period == 0) {
|
2014-10-16 16:10:53 +02:00
|
|
|
// Get the last timelapse
|
|
|
|
$work_period = $end - $work_end;
|
|
|
|
$work_end = $end;
|
|
|
|
$flag_last_time_slice = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$work_end = $work_end + $work_period;
|
|
|
|
}
|
2016-04-04 08:43:51 +02:00
|
|
|
$work_start = $work_end - $work_period;
|
2010-02-01 20:22:34 +01:00
|
|
|
}
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
unset ($output);
|
|
|
|
$output = "";
|
2010-02-01 20:22:34 +01:00
|
|
|
} // main foreach
|
2014-10-16 16:10:53 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
echo $dataend;
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
}
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
}
|
|
|
|
elseif (!empty ($export_btn) && empty ($module)) {
|
2011-04-13 18:11:02 +02:00
|
|
|
ui_print_error_message (__('No modules specified'));
|
2014-10-16 11:50:21 +02:00
|
|
|
$show_form = true;
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
}
|
|
|
|
|
2014-10-16 11:50:21 +02:00
|
|
|
if (empty($export_btn) || $show_form) {
|
2012-06-06 14:05:33 +02:00
|
|
|
echo '<form method="post" action="index.php?sec=reporting&sec2=operation/agentes/exportdata" name="export_form" id="export_form">';
|
2012-04-26 12:03:53 +02:00
|
|
|
|
2015-06-12 15:50:46 +02:00
|
|
|
$table->width = '100%';
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->border = 0;
|
|
|
|
$table->cellspacing = 3;
|
|
|
|
$table->cellpadding = 5;
|
2015-06-12 15:50:46 +02:00
|
|
|
$table->class = "databox filters";
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->style[0] = 'vertical-align: top;';
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->data = array ();
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//Group selector
|
2014-10-16 14:00:15 +02:00
|
|
|
$table->data[0][0] = '<b>' . __('Group') . '</b>';
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
$groups = users_get_groups ($config['id_user'], "RR", users_can_manage_group_all());
|
2014-07-24 10:40:59 +02:00
|
|
|
|
2012-09-13 19:47:21 +02:00
|
|
|
$table->data[0][1] = html_print_select_groups($config['id_user'],
|
2018-07-06 10:22:57 +02:00
|
|
|
"RR", true, "group", $group, '', '', 0, true, false, true,
|
2017-06-27 11:10:07 +02:00
|
|
|
'', false);
|
2012-09-12 17:53:58 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//Agent selector
|
|
|
|
$table->data[1][0] = '<b>'.__('Source agent').'</b>';
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
if ($group > 0) {
|
|
|
|
$filter['id_grupo'] = (array) $group;
|
2012-07-25 11:59:03 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-04-25 11:12:42 +02:00
|
|
|
$filter['id_grupo'] = array_keys ($groups);
|
|
|
|
}
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
$agents = array ();
|
2012-12-28 18:06:17 +01:00
|
|
|
$rows = agents_get_agents ($filter, false, 'RR');
|
2012-04-25 11:12:42 +02:00
|
|
|
if ($rows == null) $rows = array();
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
$agents[$row['id_agente']] = $row['nombre'];
|
|
|
|
}
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//Src code of lightning image with skins
|
|
|
|
$src_code = html_print_image ('images/lightning.png', true, false, true);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-09-13 19:47:21 +02:00
|
|
|
$params = array();
|
|
|
|
$params['return'] = true;
|
|
|
|
$params['show_helptip'] = true;
|
|
|
|
$params['input_name'] = 'agent';
|
|
|
|
$params['selectbox_group'] = 'group';
|
|
|
|
$params['value'] = agents_get_name ($agent);
|
|
|
|
$params['javascript_is_function_select'] = true;
|
|
|
|
$params['add_none_module'] = false;
|
|
|
|
$params['selectbox_id'] = 'module_arr';
|
|
|
|
$table->data[1][1] = ui_print_agent_autocomplete_input($params);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//Module selector
|
|
|
|
$table->data[2][0] = '<b>'.__('Modules').'</b>';
|
2012-06-06 18:13:12 +02:00
|
|
|
$table->data[2][0] .= ui_print_help_tip(__("No modules of type string. You can not calculate their average"),true);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
if ($agent > 0) {
|
|
|
|
$modules = agents_get_modules ($agent);
|
2012-07-25 11:59:03 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-04-25 11:12:42 +02:00
|
|
|
$modules = array ();
|
|
|
|
}
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2014-10-16 11:50:21 +02:00
|
|
|
if (!empty($modules)) { //remove modules of type string because you cant calculate their average.
|
2012-06-06 18:13:12 +02:00
|
|
|
$i = 0;
|
|
|
|
foreach ($modules as $key=>$module) {
|
|
|
|
$id_module_type = modules_get_agentmodule_type ($key);
|
|
|
|
switch ($id_module_type) {
|
|
|
|
case 3:
|
|
|
|
case 10:
|
|
|
|
case 17:
|
|
|
|
case 23:
|
|
|
|
case 33:
|
|
|
|
unset($modules[$i]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
$disabled_export_button = false;
|
|
|
|
if (empty($modules)) {
|
|
|
|
$disabled_export_button = true;
|
|
|
|
}
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->data[2][1] = html_print_select ($modules, "module_arr[]", array_keys ($modules), '', '', 0, true, true, true, 'w155', false);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//Start date selector
|
|
|
|
$table->data[3][0] = '<b>'.__('Begin date').'</b>';
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2015-02-16 18:37:16 +01:00
|
|
|
$table->data[3][1] = html_print_input_text ('start_date',
|
|
|
|
date ("Y-m-d", get_system_time () - SECONDS_1DAY), false, 10, 10, true);
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->data[3][1] .= html_print_image ("images/calendar_view_day.png", true, array ("alt" => "calendar", "onclick" => "scwShow(scwID('text-start_date'),this);"));
|
2015-02-16 18:37:16 +01:00
|
|
|
$table->data[3][1] .= html_print_input_text ('start_time',
|
2015-09-29 13:12:17 +02:00
|
|
|
date ("H:i:s", get_system_time () - SECONDS_1DAY), false, 10, 9, true);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//End date selector
|
|
|
|
$table->data[4][0] = '<b>'.__('End date').'</b>';
|
2015-02-16 18:37:16 +01:00
|
|
|
$table->data[4][1] = html_print_input_text ('end_date',
|
|
|
|
date ("Y-m-d", get_system_time ()), false, 10, 10, true);
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->data[4][1] .= html_print_image ("images/calendar_view_day.png", true, array ("alt" => "calendar", "onclick" => "scwShow(scwID('text-end_date'),this);"));
|
2015-02-16 18:37:16 +01:00
|
|
|
$table->data[4][1] .= html_print_input_text ('end_time',
|
2015-09-29 13:12:17 +02:00
|
|
|
date ("H:i:s", get_system_time ()), false, 10, 9, true);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
//Export type
|
|
|
|
$table->data[5][0] = '<b>'.__('Export type').'</b>';
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
$export_types = array ();
|
|
|
|
$export_types["data"] = __('Data table');
|
|
|
|
$export_types["csv"] = __('CSV');
|
|
|
|
$export_types["excel"] = __('MS Excel');
|
|
|
|
$export_types["avg"] = __('Average per hour/day');
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
$table->data[5][1] = html_print_select ($export_types, "export_type", $export_type, '', '', 0, true, false, true, 'w130', false);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
html_print_table ($table);
|
2012-07-25 11:59:03 +02:00
|
|
|
|
2012-04-25 11:12:42 +02:00
|
|
|
// Submit button
|
2015-06-12 15:50:46 +02:00
|
|
|
echo '<div class="action-buttons" style="width:100%;">';
|
2012-09-13 19:47:21 +02:00
|
|
|
html_print_button (__('Export'), 'export_btn', false, 'change_action()', 'class="sub wand"');
|
2012-04-25 11:12:42 +02:00
|
|
|
echo '</div></form>';
|
|
|
|
}
|
2011-04-13 18:11:02 +02:00
|
|
|
ui_require_jquery_file ('pandora.controls');
|
|
|
|
ui_require_jquery_file ('ajaxqueue');
|
|
|
|
ui_require_jquery_file ('bgiframe');
|
2009-06-08 20:15:58 +02:00
|
|
|
?>
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
<script type="text/javascript">
|
2012-09-13 19:47:21 +02:00
|
|
|
/* <![CDATA[ */
|
|
|
|
function change_action() {
|
|
|
|
type = $("#export_type").val();
|
|
|
|
var f = document.forms.export_form;
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
|
2012-09-13 19:47:21 +02:00
|
|
|
switch (type) {
|
|
|
|
case 'csv':
|
|
|
|
f.action = "operation/agentes/exportdata.csv.php";
|
|
|
|
break;
|
|
|
|
case 'excel':
|
|
|
|
f.action = "operation/agentes/exportdata.excel.php";
|
|
|
|
break;
|
|
|
|
case 'avg':
|
|
|
|
case 'data':
|
|
|
|
f.action = "index.php?sec=reporting&sec2=operation/agentes/exportdata&export_btn=1";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
$("#export_form").submit();
|
2012-04-26 16:42:48 +02:00
|
|
|
}
|
2012-09-13 19:47:21 +02:00
|
|
|
/* ]]> */
|
2013-04-10 09:57:54 +02:00
|
|
|
</script>
|