2008-11-14 16:37:32 +01:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:26:14 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2011-03-02 22:56:48 +01:00
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
2009-06-08 20:26:14 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-11-14 16:37:32 +01:00
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
2009-06-08 20:26:14 +02:00
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
2008-11-14 16:37:32 +01: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.
|
|
|
|
|
2012-02-27 18:24:03 +01:00
|
|
|
include_once($config['homedir'] . "/include/functions_ui.php");
|
2012-12-20 16:33:23 +01:00
|
|
|
include_once($config['homedir'] . "/include/functions_tags.php");
|
2012-12-18 12:54:22 +01:00
|
|
|
enterprise_include_once ('meta/include/functions_events_meta.php');
|
2013-05-30 17:48:22 +02:00
|
|
|
enterprise_include_once ('meta/include/functions_agents_meta.php');
|
|
|
|
enterprise_include_once ('meta/include/functions_modules_meta.php');
|
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
|
|
|
|
2013-04-29 16:09:01 +02:00
|
|
|
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
/**
|
|
|
|
* @package Include
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/ldap.php,
include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/config_process.php,
include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change or add the subpackage in phpdoc
comment blocks for to organize more the result phpdoc files. Start to
document undocument functions.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1882 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-26 17:37:47 +02:00
|
|
|
* @subpackage Events
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
*/
|
|
|
|
|
2013-04-29 16:09:01 +02:00
|
|
|
function events_get_all_fields() {
|
|
|
|
|
|
|
|
$columns = array();
|
|
|
|
|
|
|
|
$columns['id_evento'] = __('Event id');
|
|
|
|
$columns['evento'] = __('Event name');
|
|
|
|
$columns['id_agente'] = __('Agent name');
|
|
|
|
$columns['id_usuario'] = __('User');
|
|
|
|
$columns['id_grupo'] = __('Group');
|
|
|
|
$columns['estado'] = __('Status');
|
|
|
|
$columns['timestamp'] = __('Timestamp');
|
|
|
|
$columns['event_type'] = __('Event type');
|
|
|
|
$columns['id_agentmodule'] = __('Agent module');
|
|
|
|
$columns['id_alert_am'] = __('Alert');
|
|
|
|
$columns['criticity'] = __('Criticity');
|
|
|
|
$columns['user_comment'] = __('Comment');
|
|
|
|
$columns['tags'] = __('Tags');
|
|
|
|
$columns['source'] = __('Source');
|
|
|
|
$columns['id_extra'] = __('Extra id');
|
|
|
|
$columns['owner_user'] = __('Owner');
|
|
|
|
$columns['ack_utimestamp'] = __('ACK Timestamp');
|
|
|
|
$columns['instructions'] = __('Instructions');
|
|
|
|
$columns['server_name'] = __('Server name');
|
|
|
|
|
|
|
|
return $columns;
|
|
|
|
}
|
|
|
|
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
/**
|
|
|
|
* Get all rows of events from the database, that
|
|
|
|
* pass the filter, and can get only some fields.
|
|
|
|
*
|
|
|
|
* @param mixed Filters elements. It can be an indexed array
|
|
|
|
* (keys would be the field name and value the expected value, and would be
|
|
|
|
* joined with an AND operator) or a string, including any SQL clause (without
|
|
|
|
* the WHERE keyword). Example:
|
|
|
|
* <code>
|
|
|
|
* Both are similars:
|
* 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_get_all_rows_filter ('table', array ('disabled', 0));
|
|
|
|
* db_get_all_rows_filter ('table', 'disabled = 0');
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
*
|
|
|
|
* Both are similars:
|
* 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_get_all_rows_filter ('table', array ('disabled' => 0, 'history_data' => 0), 'name', 'OR');
|
|
|
|
* db_get_all_rows_filter ('table', 'disabled = 0 OR history_data = 0', 'name');
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
* </code>
|
|
|
|
* @param mixed Fields of the table to retrieve. Can be an array or a coma
|
|
|
|
* separated string. All fields are retrieved by default
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return mixed False in case of error or invalid values passed. Affected rows otherwise
|
|
|
|
*/
|
2011-04-20 11:09:40 +02:00
|
|
|
function events_get_events ($filter = false, $fields = false) {
|
* 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
|
|
|
return db_get_all_rows_filter ('tevento', $filter, $fields);
|
2009-02-26 16:34:14 +01:00
|
|
|
}
|
|
|
|
|
2013-04-29 16:09:01 +02:00
|
|
|
/**
|
|
|
|
* Get the event with the id pass as parameter.
|
|
|
|
*
|
|
|
|
* @param int $id Event id
|
|
|
|
* @param mixed $fields The fields to show or by default all with false.
|
|
|
|
*
|
|
|
|
* @return mixed False in case of error or invalid values passed. Event row otherwise
|
|
|
|
*/
|
2011-04-20 11:09:40 +02:00
|
|
|
function events_get_event ($id, $fields = false) {
|
2009-02-27 13:48:05 +01:00
|
|
|
if (empty ($id))
|
|
|
|
return false;
|
|
|
|
global $config;
|
|
|
|
|
2009-04-01 10:04:49 +02:00
|
|
|
if (is_array ($fields)) {
|
|
|
|
if (! in_array ('id_grupo', $fields))
|
|
|
|
$fields[] = 'id_grupo';
|
|
|
|
}
|
|
|
|
|
* 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
|
|
|
$event = db_get_row ('tevento', 'id_evento', $id, $fields);
|
2012-12-28 18:06:17 +01:00
|
|
|
if (! check_acl ($config['id_user'], $event['id_grupo'], 'ER'))
|
2009-02-27 13:48:05 +01:00
|
|
|
return false;
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
|
2009-02-27 13:48:05 +01:00
|
|
|
return $event;
|
|
|
|
}
|
|
|
|
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
function events_get_events_grouped($sql_post, $offset = 0, $pagination = 1, $meta = false, $history = false, $total = false) {
|
2012-10-09 18:05:32 +02:00
|
|
|
global $config;
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$table = events_get_events_table($meta, $history);
|
2013-03-15 15:38:48 +01:00
|
|
|
|
|
|
|
if ($meta) {
|
2012-12-18 12:54:22 +01:00
|
|
|
$groupby_extra = ', server_id';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$groupby_extra = '';
|
|
|
|
}
|
2013-03-15 15:38:48 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
db_process_sql ('SET group_concat_max_len = 9999999');
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($total) {
|
|
|
|
$sql = "SELECT COUNT(*) FROM (SELECT *
|
|
|
|
FROM $table te
|
|
|
|
WHERE 1=1 " . $sql_post . "
|
|
|
|
GROUP BY estado, evento, id_agentmodule" . $groupby_extra . ") AS t";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$sql = "SELECT *, MAX(id_evento) AS id_evento,
|
|
|
|
GROUP_CONCAT(DISTINCT user_comment SEPARATOR '<br>') AS user_comment,
|
|
|
|
GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids,
|
|
|
|
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep,
|
|
|
|
MIN(utimestamp) AS timestamp_rep_min,
|
2014-01-27 12:45:06 +01:00
|
|
|
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user,
|
|
|
|
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario,
|
|
|
|
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente,
|
|
|
|
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity,
|
|
|
|
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
FROM $table te
|
|
|
|
WHERE 1=1 " . $sql_post . "
|
|
|
|
GROUP BY estado, evento, id_agentmodule" . $groupby_extra . "
|
|
|
|
ORDER BY timestamp_rep DESC LIMIT " . $offset . "," . $pagination;
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
break;
|
|
|
|
case "postgresql":
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($total) {
|
|
|
|
$sql = "SELECT COUNT(*)
|
|
|
|
FROM $table te
|
|
|
|
WHERE 1=1 " . $sql_post . "
|
|
|
|
GROUP BY estado, evento, id_agentmodule, id_evento, id_agente, id_usuario, id_grupo, estado, timestamp, utimestamp, event_type, id_alert_am, criticity, user_comment, tags, source, id_extra" . $groupby_extra;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$sql = "SELECT *, MAX(id_evento) AS id_evento, array_to_string(array_agg(DISTINCT user_comment), '<br>') AS user_comment,
|
|
|
|
array_to_string(array_agg(DISTINCT id_evento), ',') AS similar_ids,
|
|
|
|
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep,
|
|
|
|
MIN(utimestamp) AS timestamp_rep_min,
|
2014-01-27 12:45:06 +01:00
|
|
|
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user,
|
|
|
|
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario,
|
|
|
|
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente,
|
|
|
|
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity,
|
|
|
|
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
FROM $table te
|
|
|
|
WHERE 1=1 " . $sql_post . "
|
2014-07-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,
operation/events/events_list.php, operation/incidents/incident.php,
extensions/files_repo.php,
extensions/files_repo/sql/files_repo.postgreSQL.sql,
extensions/files_repo/functions_files_repo.php,
extensions/files_repo/files_repo_list.php,
godmode/agentes/modificar_agente.php,
godmode/snmpconsole/snmp_alert.php, godmode/db/db_info.php,
include/functions_graph.php, include/functions_db.php,
include/db/postgresql.php, include/db/oracle.php,
include/db/mysql.php, include/functions_update_manager.php,
include/functions_events.php, include/graphs/functions_flot.php,
include/graphs/fgraph.php: tiny fixes for the improve the support of
postgreSQL databases.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10354 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-07-24 18:02:06 +02:00
|
|
|
GROUP BY estado, evento, id_agentmodule, id_evento,
|
|
|
|
id_agente, id_usuario, id_grupo, estado,
|
|
|
|
timestamp, utimestamp, event_type, id_alert_am,
|
|
|
|
criticity, user_comment, tags, source, id_extra,
|
|
|
|
te.critical_instructions,
|
|
|
|
te.warning_instructions,
|
|
|
|
te.unknown_instructions,
|
|
|
|
te.owner_user,
|
|
|
|
te.ack_utimestamp,
|
|
|
|
te.custom_data " . $groupby_extra . "
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
ORDER BY timestamp_rep DESC LIMIT " . $pagination . " OFFSET " . $offset;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
if ($total) {
|
|
|
|
$sql = "SELECT COUNT(*)
|
|
|
|
FROM $table te
|
|
|
|
WHERE 1=1 " . $sql_post . "
|
|
|
|
GROUP BY estado, to_char(evento), id_agentmodule" . $groupby_extra . ") b ";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$set = array();
|
|
|
|
$set['limit'] = $pagination;
|
|
|
|
$set['offset'] = $offset;
|
|
|
|
// TODO: Remove duplicate user comments
|
|
|
|
$sql = "SELECT a.*, b.event_rep, b.timestamp_rep
|
|
|
|
FROM (SELECT * FROM $table WHERE 1=1 " . $sql_post . ") a,
|
|
|
|
(SELECT MAX (id_evento) AS id_evento, to_char(evento) AS evento,
|
|
|
|
id_agentmodule, COUNT(*) AS event_rep,
|
|
|
|
LISTAGG(user_comment, '') AS user_comment, MAX(utimestamp) AS timestamp_rep,
|
|
|
|
LISTAGG(id_evento, '') AS similar_ids,
|
2013-03-07 17:35:37 +01:00
|
|
|
MIN(utimestamp) AS timestamp_rep_min,
|
2014-01-27 12:45:06 +01:00
|
|
|
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user,
|
|
|
|
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario,
|
|
|
|
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente,
|
|
|
|
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity,
|
|
|
|
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
FROM $table te
|
|
|
|
WHERE 1=1 " . $sql_post . "
|
|
|
|
GROUP BY estado, to_char(evento), id_agentmodule" . $groupby_extra . ") b
|
|
|
|
WHERE a.id_evento=b.id_evento AND
|
|
|
|
to_char(a.evento)=to_char(b.evento)
|
|
|
|
AND a.id_agentmodule=b.id_agentmodule";
|
|
|
|
$sql = oracle_recode_query ($sql, $set);
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Extract the events by filter (or not) from db
|
|
|
|
$events = db_get_all_rows_sql ($sql);
|
|
|
|
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($total) {
|
|
|
|
return reset($events[0]);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return $events;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function events_get_total_events_grouped($sql_post, $meta = false, $history = false) {
|
|
|
|
return events_get_events_grouped($sql_post, 0, 0, $meta, $history, true);
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
|
2009-04-01 10:04:49 +02:00
|
|
|
/**
|
|
|
|
* Get all the events ids similar to a given event id.
|
|
|
|
*
|
|
|
|
* An event is similar then the event text (evento) and the id_agentmodule are
|
|
|
|
* the same.
|
|
|
|
*
|
|
|
|
* @param int Event id to get similar events.
|
2013-01-16 13:57:11 +01:00
|
|
|
* @param bool Metaconsole mode flag
|
|
|
|
* @param bool History mode flag
|
2009-04-01 10:04:49 +02:00
|
|
|
*
|
|
|
|
* @return array A list of events ids.
|
|
|
|
*/
|
2013-01-16 13:57:11 +01:00
|
|
|
function events_get_similar_ids ($id, $meta = false, $history = false) {
|
|
|
|
$events_table = events_get_events_table($meta, $history);
|
|
|
|
|
2009-04-01 10:04:49 +02:00
|
|
|
$ids = array ();
|
2013-01-16 13:57:11 +01:00
|
|
|
if($meta) {
|
|
|
|
$event = events_meta_get_event($id, array ('evento', 'id_agentmodule'), $history);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$event = events_get_event ($id, array ('evento', 'id_agentmodule'));
|
|
|
|
}
|
2009-04-01 10:04:49 +02:00
|
|
|
if ($event === false)
|
|
|
|
return $ids;
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$events = db_get_all_rows_filter ($events_table,
|
2009-04-01 10:04:49 +02:00
|
|
|
array ('evento' => $event['evento'],
|
|
|
|
'id_agentmodule' => $event['id_agentmodule']),
|
|
|
|
array ('id_evento'));
|
|
|
|
if ($events === false)
|
|
|
|
return $ids;
|
|
|
|
|
|
|
|
foreach ($events as $event)
|
|
|
|
$ids[] = $event['id_evento'];
|
|
|
|
|
|
|
|
return $ids;
|
|
|
|
}
|
|
|
|
|
2009-01-08 16:52:13 +01:00
|
|
|
/**
|
2012-10-09 18:05:32 +02:00
|
|
|
* Delete events in a transresponse
|
2009-01-08 16:52:13 +01:00
|
|
|
*
|
2009-04-01 10:04:49 +02:00
|
|
|
* @param mixed Event ID or array of events
|
|
|
|
* @param bool Whether to delete similar events too.
|
2012-12-18 12:54:22 +01:00
|
|
|
* @param bool Metaconsole mode flag
|
2013-01-16 13:57:11 +01:00
|
|
|
* @param bool History mode flag
|
2009-01-08 16:52:13 +01:00
|
|
|
*
|
|
|
|
* @return bool Whether or not it was successful
|
|
|
|
*/
|
2013-01-16 13:57:11 +01:00
|
|
|
function events_delete_event ($id_event, $similar = true, $meta = false, $history = false) {
|
2008-11-14 16:37:32 +01:00
|
|
|
global $config;
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$table_event = events_get_events_table($meta, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
//Cleans up the selection for all unwanted values also casts any single values as an array
|
|
|
|
$id_event = (array) safe_int ($id_event, 1);
|
2008-11-14 16:37:32 +01:00
|
|
|
|
2009-04-01 10:04:49 +02:00
|
|
|
/* We must delete all events like the selected */
|
|
|
|
if ($similar) {
|
|
|
|
foreach ($id_event as $id) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$id_event = array_merge ($id_event, events_get_similar_ids ($id, $meta, $history));
|
2009-04-01 10:04:49 +02:00
|
|
|
}
|
2011-06-15 11:19:06 +02:00
|
|
|
$id_event = array_unique($id_event);
|
2009-04-01 10:04:49 +02:00
|
|
|
}
|
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
$errors = 0;
|
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
foreach ($id_event as $event) {
|
|
|
|
if ($meta) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_group = events_meta_get_group ($event, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
}
|
|
|
|
else {
|
2012-12-28 18:06:17 +01:00
|
|
|
$event_group = events_get_group ($event);
|
2012-12-18 12:54:22 +01:00
|
|
|
}
|
2008-11-14 16:37:32 +01:00
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if (check_acl ($config["id_user"], $event_group, "EM") == 0) {
|
2008-11-14 16:37:32 +01:00
|
|
|
//Check ACL
|
* 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", "Attempted deleting event #".$event);
|
2012-12-18 12:54:22 +01:00
|
|
|
$errors++;
|
2010-10-27 Miguel de Dios <miguel.dedios@artica.es>
* godmode/admin_access_logs.php: added hooks to enterprise code, and added
new filter with more options.
* include/functions_db.php: erase the deprecated function "audit_db", and
added in function "pandora_audit" two new parameters $user_id, $ip for
pass this values when it are differents to the default values. Finally
replaced the depecrated "audit_db" for "pandora_audit".
* include/functions_events.php, include/functions_filemanager.php,
include/ajax/reporting.ajax.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
include/functions_incidents.php, index.php, extensions/agents_modules.php,
extensions/insert_data.php, extensions/system_info.php,
extensions/dbmanager.php, extensions/update_manager/settings.php,
extensions/pandora_logs.php, extensions/plugin_registration.php,
operation/incidents/incident.php, operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php, operation/extensions.php,
operation/visual_console/render_view.php,
operation/agentes/status_monitor.php, operation/agentes/export_csv.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/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/servers/view_server.php,operation/servers/view_server_detail.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/render_view.php, operation/events/event_statistics.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/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
mobile/operation/agents/view_agents.php, mobile/index.php,
godmode/groups/modu_group_list.php, godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php, godmode/groups/group_list.php,
godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php,
godmode/db/db_event.php, godmode/db/db_purge.php,
godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php,
godmode/servers/manage_export.php, godmode/servers/recon_script.php,
godmode/servers/manage_export_form.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/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php, godmode/setup/file_manager.php,
godmode/setup/os.list.php, godmode/setup/news.php,
godmode/setup/gis_step_2.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/setup/os.php,
godmode/setup/performance.php, godmode/setup/setup_auth.php,
godmode/setup/gis.php, godmode/setup/os.builder.php,
godmode/setup/setup_visuals.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/users/configure_profile.php,
godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php,
godmode/massive/massive_add_alerts.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_delete_agents.php,
godmode/massive/massive_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/reporting_builder.list_items.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.preview.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/map_builder_wizard.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/graphs.php, godmode/reporting/graph_builder.preview.php:
Replaced the depecrated "audit_db" for "pandora_audit".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-27 12:47:07 +02:00
|
|
|
}
|
2012-12-18 12:54:22 +01:00
|
|
|
else {
|
|
|
|
$ret = db_process_sql_delete($table_event, array('id_evento' => $event));
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
if(!$ret) {
|
|
|
|
$errors++;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
db_pandora_audit("Event deleted", "Deleted event #".$event);
|
|
|
|
//ACL didn't fail nor did return
|
|
|
|
continue;
|
|
|
|
}
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
|
|
|
|
2009-05-04 Esteban Sánchez <estebans@artica.es>
* include/functions_agents.php: Added create_agent(),
* include/functions_db.php: Renamed dame_agente_id() to get_agent_id ().
Added process_sql_begin(), process_sql_rollback() and process_sql_commit()
and use MySQL functions directly because the Pandora cache was avoiding
more than one execution.
* include/functions_incidents.php, include/functions_messages.php,
godmode/agentes/massive_delete_agents.php,
godmode/agentes/massive_delete_alerts.php,
godmode/agentes/massive_delete_modules.php,
godmode/agentes/massive_edit_modules.php,
godmode/db/db_purge.php,
include/functions_events.php: Use new transaction functions.
* include/functions_modules.php: Sanitize some values. Added
create_agent_module_from_network_component(), create_agent_module()
and get_network_component().
* godmode/agentes/configurar_agente.php: Use get_agent_id() and transaction
functions.
* reporting/fgraph.php, operation/reporting/reporting_viewer.php: Use
get_agent_id().
* godmode/setup/file_manager.php: Removed unnecesary variable.
* operation/agentes/ver_agente.php: Replaced exit with return on ajax
operation.
* include/config_process.php: Updated build number.
* include/functions_network_profiles.php: Fixed documentation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1672 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-05-04 12:10:19 +02:00
|
|
|
break;
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
if ($errors > 0) {
|
2008-11-14 16:37:32 +01:00
|
|
|
return false;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
else {
|
2008-11-14 16:37:32 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-01 13:15:31 +02:00
|
|
|
/**
|
2012-10-11 19:49:17 +02:00
|
|
|
* Change the status of one or various events
|
2012-10-01 13:15:31 +02:00
|
|
|
*
|
|
|
|
* @param mixed Event ID or array of events
|
2013-01-16 13:57:11 +01:00
|
|
|
* @param int new status of the event
|
|
|
|
* @param bool metaconsole mode flag
|
|
|
|
* @param bool history mode flag
|
2012-10-01 13:15:31 +02:00
|
|
|
*
|
|
|
|
* @return bool Whether or not it was successful
|
2013-04-18 11:25:23 +02:00
|
|
|
*/
|
2013-01-16 13:57:11 +01:00
|
|
|
function events_change_status ($id_event, $new_status, $meta = false, $history = false) {
|
2012-10-01 13:15:31 +02:00
|
|
|
global $config;
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_table = events_get_events_table($meta, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
|
2012-10-01 13:15:31 +02:00
|
|
|
//Cleans up the selection for all unwanted values also casts any single values as an array
|
|
|
|
$id_event = (array) safe_int ($id_event, 1);
|
2012-10-11 19:49:17 +02:00
|
|
|
|
|
|
|
// Update ack info if the new status is validated
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($new_status == EVENT_STATUS_VALIDATED) {
|
2012-10-11 19:49:17 +02:00
|
|
|
$ack_utimestamp = time();
|
|
|
|
$ack_user = $config['id_user'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$acl_utimestamp = 0;
|
|
|
|
$ack_user = '';
|
|
|
|
}
|
|
|
|
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
switch ($new_status) {
|
2012-10-11 19:49:17 +02:00
|
|
|
case EVENT_STATUS_NEW:
|
|
|
|
$status_string = 'New';
|
|
|
|
break;
|
|
|
|
case EVENT_STATUS_VALIDATED:
|
|
|
|
$status_string = 'Validated';
|
|
|
|
break;
|
|
|
|
case EVENT_STATUS_INPROCESS:
|
|
|
|
$status_string = 'In process';
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$status_string = '';
|
|
|
|
break;
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
$alerts = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
foreach ($id_event as $k => $id) {
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($meta) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_group = events_meta_get_group ($id, $history);
|
|
|
|
$event = events_meta_get_event ($id, false, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
$server_id = $event['server_id'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$event_group = events_get_group ($id);
|
|
|
|
$event = events_get_event ($id);
|
|
|
|
}
|
|
|
|
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($event['id_alert_am'] > 0 && !in_array($event['id_alert_am'], $alerts)) {
|
2012-12-18 12:54:22 +01:00
|
|
|
$alerts[] = $event['id_alert_am'];
|
|
|
|
}
|
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
if (check_acl ($config["id_user"], $event_group, "EW") == 0) {
|
2012-10-11 19:49:17 +02:00
|
|
|
db_pandora_audit("ACL Violation", "Attempted updating event #".$id);
|
|
|
|
|
|
|
|
unset($id_event[$k]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if (empty($id_event)) {
|
2012-10-11 19:49:17 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$values = array(
|
|
|
|
'estado' => $new_status,
|
|
|
|
'id_usuario' => $ack_user,
|
|
|
|
'ack_utimestamp' => $ack_utimestamp);
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
$ret = db_process_sql_update($event_table, $values,
|
2012-10-11 19:49:17 +02:00
|
|
|
array('id_evento' => $id_event));
|
|
|
|
|
|
|
|
if (($ret === false) || ($ret === 0)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
events_comment($id_event, '', "Change status to $status_string", $meta, $history);
|
2012-10-11 19:49:17 +02:00
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($meta && !empty($alerts)) {
|
2012-12-18 12:54:22 +01:00
|
|
|
$server = metaconsole_get_connection_by_id ($server_id);
|
|
|
|
metaconsole_connect($server);
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
// Put the alerts in standby or not depends the new status
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
foreach ($alerts as $alert) {
|
|
|
|
switch ($new_status) {
|
2012-12-18 12:54:22 +01:00
|
|
|
case EVENT_NEW:
|
|
|
|
case EVENT_VALIDATE:
|
|
|
|
alerts_agent_module_standby ($alert, 0);
|
|
|
|
break;
|
|
|
|
case EVENT_PROCESS:
|
|
|
|
alerts_agent_module_standby ($alert, 1);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($meta && !empty($alerts)) {
|
2012-12-18 12:54:22 +01:00
|
|
|
metaconsole_restore_db();
|
|
|
|
}
|
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
return true;
|
|
|
|
}
|
2012-10-01 13:15:31 +02:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
/**
|
|
|
|
* Change the owner of an event if the event hasn't owner
|
|
|
|
*
|
|
|
|
* @param mixed Event ID or array of events
|
|
|
|
* @param string id_user of the new owner. If is false, the current owner will be setted
|
|
|
|
* @param bool flag to force the change or not (not force is change only when it hasn't owner)
|
2012-12-18 12:54:22 +01:00
|
|
|
* @param bool metaconsole mode flag
|
2013-01-16 13:57:11 +01:00
|
|
|
* @param bool history mode flag
|
2012-12-18 12:54:22 +01:00
|
|
|
*
|
2012-10-11 19:49:17 +02:00
|
|
|
* @return bool Whether or not it was successful
|
|
|
|
*/
|
2013-01-16 13:57:11 +01:00
|
|
|
function events_change_owner ($id_event, $new_owner = false, $force = false, $meta = false, $history = false) {
|
2012-10-11 19:49:17 +02:00
|
|
|
global $config;
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_table = events_get_events_table($meta, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
//Cleans up the selection for all unwanted values also casts any single values as an array
|
|
|
|
$id_event = (array) safe_int ($id_event, 1);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
foreach ($id_event as $k => $id) {
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($meta) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_group = events_meta_get_group ($id, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$event_group = events_get_group ($id);
|
|
|
|
}
|
2012-12-28 18:06:17 +01:00
|
|
|
if (check_acl ($config["id_user"], $event_group, "EW") == 0) {
|
2012-10-11 19:49:17 +02:00
|
|
|
db_pandora_audit("ACL Violation", "Attempted updating event #".$id);
|
|
|
|
unset($id_event[$k]);
|
2012-10-01 13:15:31 +02:00
|
|
|
}
|
2012-10-11 19:49:17 +02:00
|
|
|
}
|
|
|
|
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if (empty($id_event)) {
|
2012-10-11 19:49:17 +02:00
|
|
|
return false;
|
2012-10-01 13:15:31 +02:00
|
|
|
}
|
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
// If no new_owner is provided, the current user will be the owner
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if (empty($new_owner)) {
|
2012-10-01 13:15:31 +02:00
|
|
|
$new_owner = $config['id_user'];
|
|
|
|
}
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
// Only generate comment when is forced (sometimes is changed the owner when comment)
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($force) {
|
2013-01-16 13:57:11 +01:00
|
|
|
events_comment($id_event, '', "Change owner to $new_owner", $meta, $history);
|
|
|
|
}
|
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
$values = array('owner_user' => $new_owner);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
$where = array('id_evento' => $id_event);
|
|
|
|
|
2013-03-07 10:46:35 +01:00
|
|
|
// If not force, add to where if owner_user = ''
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if (!$force) {
|
2013-03-07 10:46:35 +01:00
|
|
|
$where['owner_user'] = '';
|
2012-10-01 13:15:31 +02:00
|
|
|
}
|
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
$ret = db_process_sql_update($event_table, $values,
|
2012-10-11 19:49:17 +02:00
|
|
|
$where, 'AND', false);
|
2012-10-01 13:15:31 +02:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
if (($ret === false) || ($ret === 0)) {
|
|
|
|
return false;
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-01 13:15:31 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
function events_get_events_table($meta, $history) {
|
|
|
|
if ($meta) {
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
if ($history) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_table = 'tmetaconsole_event_history';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$event_table = 'tmetaconsole_event';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$event_table = 'tevento';
|
|
|
|
}
|
|
|
|
|
|
|
|
return $event_table;
|
|
|
|
}
|
|
|
|
|
2012-10-01 13:15:31 +02:00
|
|
|
/**
|
2012-10-09 18:05:32 +02:00
|
|
|
* Comment events in a transresponse
|
2012-10-01 13:15:31 +02:00
|
|
|
*
|
|
|
|
* @param mixed Event ID or array of events
|
2012-10-11 19:49:17 +02:00
|
|
|
* @param string comment to be registered
|
|
|
|
* @param string action performed with the comment. Bu default just Added comment
|
2012-12-18 12:54:22 +01:00
|
|
|
* @param bool Flag of metaconsole mode
|
2013-01-16 13:57:11 +01:00
|
|
|
* @param bool Flag of history mode
|
2012-10-01 13:15:31 +02:00
|
|
|
*
|
|
|
|
* @return bool Whether or not it was successful
|
|
|
|
*/
|
2013-03-22 15:27:47 +01:00
|
|
|
function events_comment ($id_event, $comment = '', $action = 'Added comment', $meta = false, $history = false, $similars = true) {
|
2012-10-01 13:15:31 +02:00
|
|
|
global $config;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_table = events_get_events_table($meta, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
|
2012-10-01 13:15:31 +02:00
|
|
|
//Cleans up the selection for all unwanted values also casts any single values as an array
|
|
|
|
$id_event = (array) safe_int ($id_event, 1);
|
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
foreach ($id_event as $k => $id) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($meta) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$event_group = events_meta_get_group ($id, $history);
|
2012-12-18 12:54:22 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$event_group = events_get_group ($id);
|
|
|
|
}
|
2012-12-28 18:06:17 +01:00
|
|
|
if (check_acl ($config["id_user"], $event_group, "EW") == 0) {
|
2012-10-11 19:49:17 +02:00
|
|
|
db_pandora_audit("ACL Violation", "Attempted updating event #".$id);
|
|
|
|
|
|
|
|
unset($id_event[$k]);
|
2012-10-01 13:15:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if (empty($id_event)) {
|
2012-10-11 19:49:17 +02:00
|
|
|
return false;
|
|
|
|
}
|
2012-10-01 13:15:31 +02:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
// If the event hasn't owner, assign the user as owner
|
2014-06-03 18:59:55 +02:00
|
|
|
events_change_owner ($id_event);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
// Get the current event comments
|
|
|
|
$first_event = $id_event;
|
|
|
|
if (is_array($id_event)) {
|
|
|
|
$first_event = reset($id_event);
|
|
|
|
}
|
2013-12-10 13:22:55 +01:00
|
|
|
$event_comments = db_get_value('user_comment', $event_table, 'id_evento', $first_event);
|
2013-11-07 17:37:43 +01:00
|
|
|
$event_comments_array = array();
|
2010-09-17 14:34:11 +02:00
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
if ($event_comments == '') {
|
|
|
|
$comments_format = 'new';
|
2012-04-26 16:42:48 +02:00
|
|
|
}
|
|
|
|
else {
|
2013-11-07 17:37:43 +01:00
|
|
|
// If comments are not stored in json, the format is old
|
|
|
|
$event_comments_array = json_decode($event_comments);
|
|
|
|
|
|
|
|
if (is_null($event_comments_array)) {
|
|
|
|
$comments_format = 'old';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$comments_format = 'new';
|
|
|
|
}
|
2010-09-17 14:34:11 +02:00
|
|
|
}
|
2013-11-07 17:37:43 +01:00
|
|
|
|
|
|
|
switch($comments_format) {
|
|
|
|
case 'new':
|
|
|
|
$comment_for_json['comment'] = $comment;
|
|
|
|
$comment_for_json['action'] = $action;
|
|
|
|
$comment_for_json['id_user'] = $config['id_user'];
|
|
|
|
$comment_for_json['utimestamp'] = time();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
$event_comments_array[] = $comment_for_json;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2014-07-09 07:08:55 +02:00
|
|
|
$event_comments = io_json_mb_encode($event_comments_array);
|
2013-11-07 17:37:43 +01:00
|
|
|
|
|
|
|
// Update comment
|
|
|
|
$ret = db_process_sql_update($event_table, array('user_comment' => $event_comments), array('id_evento' => implode(',', $id_event)));
|
|
|
|
break;
|
|
|
|
case 'old':
|
|
|
|
// Give old ugly format to comment. TODO: Change this method for aux table or json
|
|
|
|
$comment = str_replace(array("\r\n", "\r", "\n"), '<br>', $comment);
|
|
|
|
|
|
|
|
if ($comment != '') {
|
|
|
|
$commentbox = '<div style="border:1px dotted #CCC; min-height: 10px;">'.$comment.'</div>';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$commentbox = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
// Don't translate 'by' word because if various users with different languages
|
|
|
|
// make comments in the same console will be a mess
|
|
|
|
$comment = '<b>-- ' . $action . ' by '.$config['id_user'].' '.'['.date ($config["date_format"]).'] --</b><br>'.$commentbox.'<br>';
|
|
|
|
|
|
|
|
// Update comment
|
|
|
|
switch ($config['dbtype']) {
|
|
|
|
// Oldstyle SQL to avoid innecesary PHP foreach
|
|
|
|
case 'mysql':
|
|
|
|
$sql_validation = "UPDATE $event_table
|
|
|
|
SET user_comment = concat('" . $comment . "', user_comment)
|
|
|
|
WHERE id_evento in (" . implode(',', $id_event) . ")";
|
|
|
|
|
|
|
|
$ret = db_process_sql($sql_validation);
|
|
|
|
break;
|
|
|
|
case 'postgresql':
|
|
|
|
case 'oracle':
|
|
|
|
$sql_validation = "UPDATE $event_table
|
|
|
|
SET user_comment='" . $comment . "' || user_comment)
|
|
|
|
WHERE id_evento in (" . implode(',', $id_event) . ")";
|
|
|
|
|
|
|
|
$ret = db_process_sql($sql_validation);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
if (($ret === false) || ($ret === 0)) {
|
|
|
|
return false;
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2011-06-29 17:35:02 +02:00
|
|
|
return true;
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get group id of an event.
|
|
|
|
*
|
2009-01-08 16:52:13 +01:00
|
|
|
* @param int $id_event Event id
|
2008-11-14 16:37:32 +01:00
|
|
|
*
|
2009-01-08 16:52:13 +01:00
|
|
|
* @return int Group id of the given event.
|
2008-11-14 16:37:32 +01:00
|
|
|
*/
|
2011-04-20 11:09:40 +02:00
|
|
|
function events_get_group ($id_event) {
|
* 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
|
|
|
return (int) db_get_value ('id_grupo', 'tevento', 'id_evento', (int) $id_event);
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
2008-12-10 21:15:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get description of an event.
|
|
|
|
*
|
2009-01-08 16:52:13 +01:00
|
|
|
* @param int $id_event Event id.
|
2008-12-10 21:15:38 +01:00
|
|
|
*
|
2009-01-08 16:52:13 +01:00
|
|
|
* @return string Description of the given event.
|
2008-12-10 21:15:38 +01:00
|
|
|
*/
|
2011-04-20 11:09:40 +02:00
|
|
|
function events_get_description ($id_event) {
|
* 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
|
|
|
return (string) db_get_value ('evento', 'tevento', 'id_evento', (int) $id_event);
|
2008-12-10 21:15:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Insert a event in the event log system.
|
|
|
|
*
|
2009-01-08 16:52:13 +01:00
|
|
|
* @param int $event
|
|
|
|
* @param int $id_group
|
|
|
|
* @param int $id_agent
|
|
|
|
* @param int $status
|
|
|
|
* @param string $id_user
|
|
|
|
* @param string $event_type
|
|
|
|
* @param int $priority
|
|
|
|
* @param int $id_agent_module
|
|
|
|
* @param int $id_aam
|
2008-12-10 21:15:38 +01:00
|
|
|
*
|
2009-01-08 16:52:13 +01:00
|
|
|
* @return int event id
|
2008-12-10 21:15:38 +01:00
|
|
|
*/
|
2013-09-09 18:21:45 +02:00
|
|
|
function events_create_event ($event, $id_group, $id_agent, $status = 0, $id_user = "", $event_type = "unknown", $priority = 0, $id_agent_module = 0, $id_aam = 0, $critical_instructions = '', $warning_instructions = '', $unknown_instructions = '', $source="Pandora", $tags="", $custom_data="") {
|
2011-03-07 12:48:44 +01:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
$sql = sprintf ('INSERT INTO tevento (id_agente, id_grupo, evento, timestamp,
|
|
|
|
estado, utimestamp, id_usuario, event_type, criticity,
|
2013-09-09 18:21:45 +02:00
|
|
|
id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions, source, tags, custom_data)
|
|
|
|
VALUES (%d, %d, "%s", NOW(), %d, UNIX_TIMESTAMP(NOW()), "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s")',
|
2011-03-07 12:48:44 +01:00
|
|
|
$id_agent, $id_group, $event, $status, $id_user, $event_type,
|
2013-09-09 18:21:45 +02:00
|
|
|
$priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions, $source, $tags, $custom_data);
|
2011-03-07 12:48:44 +01:00
|
|
|
break;
|
|
|
|
case "postgresql":
|
|
|
|
$sql = sprintf ('INSERT INTO tevento (id_agente, id_grupo, evento, timestamp,
|
|
|
|
estado, utimestamp, id_usuario, event_type, criticity,
|
2013-09-09 18:21:45 +02:00
|
|
|
id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions, source, tags, custom_data)
|
|
|
|
VALUES (%d, %d, "%s", NOW(), %d, ceil(date_part(\'epoch\', CURRENT_TIMESTAMP)), "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s")',
|
2011-03-07 12:48:44 +01:00
|
|
|
$id_agent, $id_group, $event, $status, $id_user, $event_type,
|
2013-09-09 18:21:45 +02:00
|
|
|
$priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions, $source, $tags, $custom_data);
|
2011-03-07 12:48:44 +01:00
|
|
|
break;
|
2011-04-11 19:05:20 +02:00
|
|
|
case "oracle":
|
|
|
|
$sql = sprintf ('INSERT INTO tevento (id_agente, id_grupo, evento, timestamp,
|
|
|
|
estado, utimestamp, id_usuario, event_type, criticity,
|
2013-09-09 18:21:45 +02:00
|
|
|
id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions, source, tags, custom_data)
|
|
|
|
VALUES (%d, %d, "%s", CURRENT_TIMESTAMP, %d, ceil((sysdate - to_date(\'19700101000000\',\'YYYYMMDDHH24MISS\')) * (86400)), "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s")',
|
2011-04-11 19:05:20 +02:00
|
|
|
$id_agent, $id_group, $event, $status, $id_user, $event_type,
|
2013-09-09 18:21:45 +02:00
|
|
|
$priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions, $source, $tags, $custom_data);
|
2011-04-11 19:05:20 +02:00
|
|
|
break;
|
2011-03-07 12:48:44 +01:00
|
|
|
}
|
2013-04-18 11:25:23 +02: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
|
|
|
return (int) db_process_sql ($sql, "insert_id");
|
2008-12-10 21:15:38 +01:00
|
|
|
}
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2013-02-22 14:48:10 +01:00
|
|
|
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
/**
|
|
|
|
* Prints a small event table
|
|
|
|
*
|
|
|
|
* @param string $filter SQL WHERE clause
|
|
|
|
* @param int $limit How many events to show
|
|
|
|
* @param int $width How wide the table should be
|
|
|
|
* @param bool $return Prints out HTML if false
|
2013-03-01 14:22:29 +01:00
|
|
|
* @param int agent id if is the table of one agent. 0 otherwise
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
*
|
|
|
|
* @return string HTML with table element
|
|
|
|
*/
|
2013-03-01 14:22:29 +01:00
|
|
|
function events_print_event_table ($filter = "", $limit = 10, $width = 440, $return = false, $agent_id = 0) {
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
global $config;
|
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if ($agent_id == 0) {
|
2013-03-01 14:22:29 +01:00
|
|
|
$agent_condition = '';
|
|
|
|
}
|
|
|
|
else {
|
2013-05-29 15:11:40 +02:00
|
|
|
$agent_condition = " id_agente = $agent_id AND ";
|
2013-03-01 14:22:29 +01:00
|
|
|
}
|
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if ($filter == '') {
|
2013-03-01 14:22:29 +01:00
|
|
|
$filter = '1 = 1';
|
|
|
|
}
|
|
|
|
|
2011-04-11 19:05:20 +02:00
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
2013-05-29 15:11:40 +02:00
|
|
|
$sql = sprintf ("SELECT *
|
|
|
|
FROM tevento
|
|
|
|
WHERE %s %s
|
|
|
|
ORDER BY timestamp DESC LIMIT %d", $agent_condition, $filter, $limit);
|
2011-04-11 19:05:20 +02:00
|
|
|
break;
|
|
|
|
case "oracle":
|
2013-05-29 15:11:40 +02:00
|
|
|
$sql = sprintf ("SELECT *
|
|
|
|
FROM tevento
|
|
|
|
WHERE %s %s AND rownum <= %d
|
|
|
|
ORDER BY timestamp DESC", $agent_condition, $filter, $limit);
|
2011-04-11 19:05:20 +02:00
|
|
|
break;
|
|
|
|
}
|
2013-04-18 11:25:23 +02: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
|
|
|
$result = db_get_all_rows_sql ($sql);
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
if ($result === false) {
|
2013-05-29 15:11:40 +02:00
|
|
|
echo '<div class="nf">' . __('No events') . '</div>';
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
else {
|
2013-02-21 15:26:00 +01:00
|
|
|
$table->id = 'latest_events_table';
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
$table->cellpadding = 4;
|
|
|
|
$table->cellspacing = 4;
|
|
|
|
$table->width = $width;
|
|
|
|
$table->class = "databox";
|
|
|
|
$table->title = __('Latest events');
|
2013-04-10 09:57:54 +02:00
|
|
|
$table->titleclass = 'tabletitle';
|
|
|
|
$table->titlestyle = 'text-transform:uppercase;';
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
$table->headclass = array ();
|
|
|
|
$table->head = array ();
|
|
|
|
$table->rowclass = array ();
|
2013-04-10 09:57:54 +02:00
|
|
|
$table->cellclass = array ();
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
$table->data = array ();
|
|
|
|
$table->align = array ();
|
2013-04-10 09:57:54 +02:00
|
|
|
$table->style[0] = $table->style[1] = $table->style[2] = 'width:25px; background: #E8E8E8;';
|
2013-05-29 15:11:40 +02:00
|
|
|
if ($agent_id == 0) {
|
2014-06-02 18:57:20 +02:00
|
|
|
$table->style[3] = 'word-break: break-all;';
|
2013-05-29 15:11:40 +02:00
|
|
|
}
|
|
|
|
$table->style[4] = 'width:120px; word-break: break-all;';
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2012-12-18 08:58:15 +01:00
|
|
|
$table->head[0] = "<span title='" . __('Validated') . "'>" . __('V.') . "</span>";
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$table->align[0] = 'center';
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$table->head[1] = "<span title='" . __('Severity') . "'>" . __('S.') . "</span>";
|
|
|
|
$table->align[1] = 'center';
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$table->head[2] = __('Type');
|
|
|
|
$table->headclass[2] = "datos3 f9";
|
|
|
|
$table->align[2] = "center";
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$table->head[3] = __('Event name');
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2013-05-29 15:11:40 +02:00
|
|
|
if ($agent_id == 0) {
|
2013-03-01 14:22:29 +01:00
|
|
|
$table->head[4] = __('Agent name');
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-04-30 21:22:07 +02:00
|
|
|
$table->head[5] = __('Timestamp');
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
$table->headclass[5] = "datos3 f9";
|
2013-02-21 16:59:13 +01:00
|
|
|
$table->align[5] = "left";
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
|
|
|
foreach ($result as $event) {
|
2012-12-28 18:06:17 +01:00
|
|
|
if (! check_acl ($config["id_user"], $event["id_grupo"], "ER")) {
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
continue;
|
|
|
|
}
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
$data = array ();
|
|
|
|
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
// Colored box
|
2010-09-29 12:35:47 +02:00
|
|
|
switch($event["estado"]) {
|
|
|
|
case 0:
|
|
|
|
$img = "images/star.png";
|
|
|
|
$title = __('New event');
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
$img = "images/tick.png";
|
|
|
|
$title = __('Event validated');
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$img = "images/hourglass.png";
|
|
|
|
$title = __('Event in process');
|
|
|
|
break;
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2011-04-27 15:43:31 +02:00
|
|
|
$data[0] = html_print_image ($img, true,
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
array ("class" => "image_status",
|
|
|
|
"title" => $title));
|
|
|
|
|
|
|
|
switch ($event["criticity"]) {
|
|
|
|
default:
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_MAINTENANCE:
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$img = "images/status_sets/default/severity_maintenance.png";
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_INFORMATIONAL:
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$img = "images/status_sets/default/severity_informational.png";
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_NORMAL:
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$img = "images/status_sets/default/severity_normal.png";
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_WARNING:
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$img = "images/status_sets/default/severity_warning.png";
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_CRITICAL:
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
$img = "images/status_sets/default/severity_critical.png";
|
|
|
|
break;
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
}
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
|
2011-04-27 15:43:31 +02:00
|
|
|
$data[1] = html_print_image ($img, true,
|
2009-10-07 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field
"name" in the table "tagente" to binary varchar.
* include/functions_events.php, operation/events/events.php: add new
columns, the severity colummn and the validate colummn.
* images/tag_red.png, images/tick.png,
images/status_sets/default/severity_informational.png,
images/status_sets/default/severity_maintenance.png,
images/status_sets/default/severity_critical.png,
images/status_sets/default/severity_warning.png,
images/status_sets/default/severity_normal.png: add the new files to use in
the events list new colummns.
* include/help/en/help_eventview.php: change the content in this help for
show help info of new colummns.
Comments: I hate the massive and mixed commits...but I have not choice, and
in this commit there are two parts, the changes in the sql table and the
changes in the event list colummn.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2011 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-07 20:43:08 +02:00
|
|
|
array ("class" => "image_status",
|
|
|
|
"width" => 12,
|
|
|
|
"height" => 12,
|
|
|
|
"title" => get_priority_name ($event["criticity"])));
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
|
|
|
/* Event type */
|
2011-04-20 11:09:40 +02:00
|
|
|
$data[2] = events_print_type_img ($event["event_type"], true);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-04-05 14:24:36 +02:00
|
|
|
/* Event text */
|
|
|
|
$data[3] = ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '9');
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-04-05 14:24:36 +02:00
|
|
|
if($agent_id == 0) {
|
|
|
|
if ($event["id_agente"] > 0) {
|
|
|
|
// Agent name
|
|
|
|
// Get class name, for the link color...
|
|
|
|
$myclass = get_priority_class ($event["criticity"]);
|
|
|
|
|
|
|
|
$data[4] = "<a class='$myclass' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$event["id_agente"]."'>".agents_get_name ($event["id_agente"]). "</A>";
|
|
|
|
|
|
|
|
// ui_print_agent_name ($event["id_agente"], true, 25, '', true);
|
|
|
|
// for System or SNMP generated alerts
|
|
|
|
}
|
|
|
|
elseif ($event["event_type"] == "system") {
|
|
|
|
$data[4] = __('System');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[4] = __('Alert')."SNMP";
|
|
|
|
}
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
// Timestamp
|
2013-05-23 17:42:32 +02:00
|
|
|
$data[5] = ui_print_timestamp ($event["timestamp"], true, array('style' => 'font-size: 8px'));
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
|
2013-04-10 09:57:54 +02:00
|
|
|
$class = get_priority_class ($event["criticity"]);
|
|
|
|
$cell_classes[3] = $cell_classes[4] = $cell_classes[5] = $class;
|
|
|
|
array_push ($table->cellclass, $cell_classes);
|
|
|
|
//array_push ($table->rowclass, get_priority_class ($event["criticity"]));
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
array_push ($table->data, $data);
|
|
|
|
}
|
|
|
|
|
2013-02-21 15:26:00 +01:00
|
|
|
$events_table = html_print_table ($table, true);
|
2013-04-10 18:59:42 +02:00
|
|
|
$out = '<table width="98%"><tr><td style="width: 90%; padding-right: 10px; vertical-align: top; padding-top: 0px;">';
|
2013-02-21 15:26:00 +01:00
|
|
|
$out .= $events_table;
|
2013-03-01 14:22:29 +01:00
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if ($agent_id != 0) {
|
2013-04-10 13:03:45 +02:00
|
|
|
$out .= '</td><td style="width: 200px; vertical-align: top;">';
|
2013-04-10 09:57:54 +02:00
|
|
|
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
|
2013-05-23 17:42:32 +02:00
|
|
|
$out .= '<fieldset class="databox tactical_set">
|
2013-04-10 09:57:54 +02:00
|
|
|
<legend>' .
|
2013-04-15 18:04:39 +02:00
|
|
|
__('Events -by module-') .
|
2013-04-10 09:57:54 +02:00
|
|
|
'</legend>' .
|
2013-04-10 13:03:45 +02:00
|
|
|
graph_event_module (180, 100, $event['id_agente']) . '</fieldset>';
|
2013-04-10 09:57:54 +02:00
|
|
|
$out .= '</td></tr></table>';
|
2013-03-01 14:22:29 +01:00
|
|
|
}
|
|
|
|
else {
|
2013-04-10 13:03:45 +02:00
|
|
|
$out .= '</td><td style="width: 200px; vertical-align: top;">';
|
2013-04-10 09:57:54 +02:00
|
|
|
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
|
2013-05-23 17:42:32 +02:00
|
|
|
$out .= '<fieldset class="databox tactical_set">
|
2013-04-10 09:57:54 +02:00
|
|
|
<legend>' .
|
|
|
|
__('Event graph') .
|
|
|
|
'</legend>' .
|
2013-04-10 13:03:45 +02:00
|
|
|
grafico_eventos_total("", 180, 60) . '</fieldset>';
|
2013-05-23 17:42:32 +02:00
|
|
|
$out .= '<fieldset class="databox tactical_set">
|
2013-04-10 09:57:54 +02:00
|
|
|
<legend>' .
|
|
|
|
__('Event graph by agent') .
|
|
|
|
'</legend>' .
|
2013-04-10 13:03:45 +02:00
|
|
|
grafico_eventos_grupo(180, 60) . '</fieldset>';
|
2013-04-10 09:57:54 +02:00
|
|
|
$out .= '</td></tr></table>';
|
2013-03-01 14:22:29 +01:00
|
|
|
}
|
|
|
|
|
2013-02-21 15:26:00 +01:00
|
|
|
$out .= '</td></tr></table>';
|
|
|
|
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
unset ($table);
|
2013-02-21 15:26:00 +01:00
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if ($return) {
|
2013-02-21 15:26:00 +01:00
|
|
|
return $out;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo $out;
|
|
|
|
}
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
}
|
|
|
|
}
|
2009-02-20 22:48:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prints the event type image
|
|
|
|
*
|
|
|
|
* @param string $type Event type from SQL
|
|
|
|
* @param bool $return Whether to return or print
|
2011-09-15 15:19:11 +02:00
|
|
|
* @param bool $only_url Flag to return only url of image, by default false.
|
2009-02-20 22:48:09 +01:00
|
|
|
*
|
|
|
|
* @return string HTML with img
|
|
|
|
*/
|
2011-09-15 15:19:11 +02:00
|
|
|
function events_print_type_img ($type, $return = false, $only_url = false) {
|
|
|
|
global $config;
|
|
|
|
|
2009-02-27 13:48:05 +01:00
|
|
|
$output = '';
|
|
|
|
|
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
|
|
|
$urlImage = ui_get_full_url(false);
|
2011-09-15 15:19:11 +02:00
|
|
|
|
2009-02-20 22:48:09 +01:00
|
|
|
switch ($type) {
|
2011-09-15 15:19:11 +02:00
|
|
|
case "alert_recovered":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "bell.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "alert_manual_validation":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "ok.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "going_down_critical":
|
|
|
|
case "going_up_critical": //This is to be backwards compatible
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "module_critical.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "going_up_normal":
|
|
|
|
case "going_down_normal": //This is to be backwards compatible
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "module_ok.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
2013-04-15 13:44:36 +02:00
|
|
|
case "going_up_warning":
|
2011-09-15 15:19:11 +02:00
|
|
|
case "going_down_warning":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "module_warning.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
2012-10-01 13:15:31 +02:00
|
|
|
case "going_unknown":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "module_unknown.png";
|
2012-10-01 13:15:31 +02:00
|
|
|
break;
|
2011-09-15 15:19:11 +02:00
|
|
|
case "alert_fired":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "bell_error.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "system":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "cog.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "recon_host_detected":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "recon.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "new_agent":
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "agent.png";
|
|
|
|
break;
|
|
|
|
case "configuration_change":
|
|
|
|
$icon = "config.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
|
|
|
case "unknown":
|
|
|
|
default:
|
2013-04-15 13:44:36 +02:00
|
|
|
$icon = "lightning_go.png";
|
2011-09-15 15:19:11 +02:00
|
|
|
break;
|
2010-09-17 14:34:11 +02:00
|
|
|
}
|
|
|
|
|
2013-04-15 13:44:36 +02:00
|
|
|
if ($only_url) {
|
|
|
|
$output = $urlImage . "/" . "images/" . $icon;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$output .= html_print_image ("images/" . $icon, true,
|
|
|
|
array ("title" => events_print_type_description($type, true)));
|
|
|
|
}
|
|
|
|
|
2010-09-17 14:34:11 +02:00
|
|
|
if ($return)
|
|
|
|
return $output;
|
|
|
|
echo $output;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prints the event type description
|
|
|
|
*
|
|
|
|
* @param string $type Event type from SQL
|
|
|
|
* @param bool $return Whether to return or print
|
|
|
|
*
|
|
|
|
* @return string HTML with img
|
|
|
|
*/
|
2011-04-20 11:09:40 +02:00
|
|
|
function events_print_type_description ($type, $return = false) {
|
2010-09-17 14:34:11 +02:00
|
|
|
$output = '';
|
|
|
|
|
|
|
|
switch ($type) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
case "going_unknown":
|
|
|
|
$output .= __('Going to unknown');
|
|
|
|
break;
|
|
|
|
case "alert_recovered":
|
|
|
|
$output .= __('Alert recovered');
|
|
|
|
break;
|
|
|
|
case "alert_manual_validation":
|
|
|
|
$output .= __('Alert manually validated');
|
|
|
|
break;
|
|
|
|
case "going_up_warning":
|
|
|
|
$output .= __('Going from critical to warning');
|
|
|
|
break;
|
|
|
|
case "going_down_critical":
|
|
|
|
case "going_up_critical": //This is to be backwards compatible
|
|
|
|
$output .= __('Going down to critical state');
|
|
|
|
break;
|
|
|
|
case "going_up_normal":
|
|
|
|
case "going_down_normal": //This is to be backwards compatible
|
|
|
|
$output .= __('Going up to normal state');
|
|
|
|
break;
|
|
|
|
case "going_down_warning":
|
|
|
|
$output .= __('Going down from normal to warning');
|
|
|
|
break;
|
|
|
|
case "alert_fired":
|
|
|
|
$output .= __('Alert fired');
|
|
|
|
break;
|
|
|
|
case "system";
|
|
|
|
$output .= __('SYSTEM');
|
|
|
|
break;
|
|
|
|
case "recon_host_detected";
|
|
|
|
$output .= __('Recon server detected a new host');
|
|
|
|
break;
|
|
|
|
case "new_agent";
|
|
|
|
$output .= __('New agent created');
|
|
|
|
break;
|
|
|
|
case "configuration_change";
|
|
|
|
$output .= __('Configuration change');
|
|
|
|
break;
|
|
|
|
case "alert_ceased";
|
|
|
|
$output .= __('Alert ceased');
|
|
|
|
break;
|
|
|
|
case "error";
|
|
|
|
$output .= __('Error');
|
|
|
|
break;
|
|
|
|
case "unknown":
|
|
|
|
default:
|
|
|
|
$output .= __('Unknown type:').': '.$type;
|
|
|
|
break;
|
2009-02-27 13:48:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($return)
|
|
|
|
return $output;
|
|
|
|
echo $output;
|
2009-02-20 22:48:09 +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
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the events happened in a group during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param mixed $id_group Group id to get events for.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
function events_get_group_events ($id_group, $period, $date,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
2013-01-09 17:19:20 +01:00
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
2013-02-05 15:46:16 +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
|
|
|
global $config;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
$id_group = groups_safe_acl ($config["id_user"], $id_group, "ER");
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +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
|
|
|
if (empty ($id_group)) {
|
|
|
|
//An empty array means the user doesn't have access
|
|
|
|
return false;
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +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
|
|
|
$datelimit = $date - $period;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
$sql_where = ' AND 1 = 1 ';
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 4;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 3;
|
|
|
|
}
|
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
2013-01-09 17:19:20 +01:00
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
2014-06-04 16:05:20 +02:00
|
|
|
$sql_where .= sprintf(' AND id_grupo IN (%s) AND utimestamp > %d
|
|
|
|
AND utimestamp <= %d ', implode (",", $id_group), $datelimit, $date);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2014-06-04 16:05:20 +02:00
|
|
|
return events_get_events_grouped($sql_where, 0, 1000);
|
* 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
|
|
|
}
|
|
|
|
|
2013-02-05 15:46:16 +01:00
|
|
|
/**
|
|
|
|
* Get all the events happened in a group during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param mixed $id_group Group id to get events for.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
|
|
|
function events_get_group_events_steps ($begin, &$result, $id_group, $period, $date,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
|
|
|
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
$id_group = groups_safe_acl ($config["id_user"], $id_group, "ER");
|
|
|
|
|
|
|
|
if (empty ($id_group)) {
|
|
|
|
//An empty array means the user doesn't have access
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
|
|
|
|
$sql_where = ' AND 1 = 1 ';
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities = array();
|
2013-02-05 15:46:16 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 4;
|
2013-02-05 15:46:16 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 3;
|
|
|
|
}
|
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
2013-02-05 15:46:16 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$sql = sprintf ('SELECT *,
|
2013-04-18 11:25:23 +02:00
|
|
|
(SELECT t2.nombre
|
|
|
|
FROM tagente AS t2
|
|
|
|
WHERE t2.id_agente = t3.id_agente) AS agent_name,
|
|
|
|
(SELECT t2.fullname
|
|
|
|
FROM tusuario AS t2
|
|
|
|
WHERE t2.id_user = t3.id_usuario) AS user_name
|
2013-02-05 15:46:16 +01:00
|
|
|
FROM tevento AS t3
|
|
|
|
WHERE utimestamp > %d AND utimestamp <= %d
|
|
|
|
AND id_grupo IN (%s) ' . $sql_where . '
|
|
|
|
ORDER BY utimestamp ASC',
|
|
|
|
$datelimit, $date, implode (",", $id_group));
|
|
|
|
|
|
|
|
return db_get_all_row_by_steps_sql($begin, $result, $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
|
|
|
/**
|
|
|
|
* Get all the events happened in an Agent during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param int $id_agent Agent id to get events.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
function events_get_agent ($id_agent, $period, $date = 0,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
2013-01-09 17:19:20 +01:00
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +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
|
|
|
if (!is_numeric ($date)) {
|
|
|
|
$date = strtotime ($date);
|
|
|
|
}
|
|
|
|
if (empty ($date)) {
|
|
|
|
$date = get_system_time ();
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +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
|
|
|
$datelimit = $date - $period;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2014-06-04 16:05:20 +02:00
|
|
|
$sql_where = '';
|
|
|
|
|
2013-02-28 12:57:57 +01:00
|
|
|
$criticities = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-02-28 12:57:57 +01:00
|
|
|
$criticities[] = 4;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-02-28 12:57:57 +01:00
|
|
|
$criticities[] = 3;
|
|
|
|
}
|
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
2013-02-28 12:57:57 +01:00
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
2013-01-09 17:19:20 +01:00
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2014-06-04 16:05:20 +02:00
|
|
|
$sql_where .= sprintf(' AND id_agente = %d AND utimestamp > %d
|
2014-06-03 18:59:55 +02:00
|
|
|
AND utimestamp <= %d ', $id_agent, $datelimit, $date);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2014-06-04 16:05:20 +02:00
|
|
|
return events_get_events_grouped($sql_where, 0, 1000);
|
* 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
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the events happened in an Agent during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param int $id_agent_module Module id to get events.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
2011-04-20 11:09:40 +02:00
|
|
|
function events_get_module ($id_agent_module, $period, $date = 0) {
|
* 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
|
|
|
if (!is_numeric ($date)) {
|
|
|
|
$date = strtotime ($date);
|
|
|
|
}
|
|
|
|
if (empty ($date)) {
|
|
|
|
$date = get_system_time ();
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +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
|
|
|
$datelimit = $date - $period;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2014-06-04 16:05:20 +02:00
|
|
|
$sql_where .= sprintf(' AND id_agentmodule = %d AND utimestamp > %d
|
|
|
|
AND utimestamp <= %d ', $id_agent_module, $datelimit, $date);
|
|
|
|
|
|
|
|
return events_get_events_grouped($sql_where, 0, 1000);
|
|
|
|
|
* 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
|
|
|
$sql = sprintf ('SELECT evento, event_type, criticity, count(*) as count_rep, max(timestamp) AS time2
|
|
|
|
FROM tevento
|
|
|
|
WHERE id_agentmodule = %d AND utimestamp > %d AND utimestamp <= %d
|
|
|
|
GROUP BY id_agentmodule, evento ORDER BY time2 DESC', $id_agent_module, $datelimit, $date);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +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
|
|
|
return db_get_all_rows_sql ($sql);
|
|
|
|
}
|
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
/**
|
|
|
|
* Decode a numeric type into type description.
|
|
|
|
*
|
|
|
|
* @param int $type_id Numeric type.
|
|
|
|
*
|
|
|
|
* @return string Type description.
|
|
|
|
*/
|
|
|
|
function events_get_event_types ($type_id){
|
|
|
|
|
|
|
|
$diferent_types = get_event_types ();
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
$type_desc = '';
|
|
|
|
switch($type_id) {
|
2013-04-18 11:25:23 +02:00
|
|
|
case 'unknown':
|
|
|
|
$type_desc = __('Unknown');
|
|
|
|
break;
|
|
|
|
case 'critical':
|
|
|
|
$type_desc = __('Monitor Critical');
|
|
|
|
break;
|
|
|
|
case 'warning':
|
|
|
|
$type_desc = __('Monitor Warning');
|
|
|
|
break;
|
|
|
|
case 'normal':
|
|
|
|
$type_desc = __('Monitor Normal');
|
|
|
|
break;
|
|
|
|
case 'alert_fired':
|
|
|
|
$type_desc = __('Alert fired');
|
|
|
|
break;
|
|
|
|
case 'alert_recovered':
|
|
|
|
$type_desc = __('Alert recovered');
|
|
|
|
break;
|
|
|
|
case 'alert_ceased':
|
|
|
|
$type_desc = __('Alert ceased');
|
|
|
|
break;
|
|
|
|
case 'alert_manual_validation':
|
|
|
|
$type_desc = __('Alert manual validation');
|
|
|
|
break;
|
|
|
|
case 'recon_host_detected':
|
|
|
|
$type_desc = __('Recon host detected');
|
|
|
|
break;
|
|
|
|
case 'system':
|
|
|
|
$type_desc = __('System');
|
|
|
|
break;
|
|
|
|
case 'error':
|
|
|
|
$type_desc = __('Error');
|
|
|
|
break;
|
|
|
|
case 'configuration_change':
|
|
|
|
$type_desc = __('Configuration change');
|
|
|
|
break;
|
|
|
|
case 'not_normal':
|
|
|
|
$type_desc = __('Not normal');
|
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
default:
|
2013-04-18 11:25:23 +02:00
|
|
|
if (isset($config['text_char_long'])) {
|
|
|
|
foreach ($diferent_types as $key => $type) {
|
|
|
|
if ($key == $type_id){
|
|
|
|
$type_desc = ui_print_truncate_text($type, $config['text_char_long'], false, true, false);
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
}
|
2013-04-18 11:25:23 +02:00
|
|
|
}
|
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
return $type_desc;
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Decode a numeric severity into severity description.
|
|
|
|
*
|
|
|
|
* @param int $severity_id Numeric severity.
|
|
|
|
*
|
|
|
|
* @return string Severity description.
|
|
|
|
*/
|
|
|
|
function events_get_severity_types ($severity_id){
|
|
|
|
|
|
|
|
$diferent_types = get_priorities ();
|
2013-02-28 12:57:57 +01:00
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
$severity_desc = '';
|
|
|
|
switch ($severity_id) {
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_MAINTENANCE:
|
2013-02-28 12:57:57 +01:00
|
|
|
$severity_desc = __('Maintenance');
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_INFORMATIONAL:
|
2013-02-28 12:57:57 +01:00
|
|
|
$severity_desc = __('Informational');
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_NORMAL:
|
2013-02-28 12:57:57 +01:00
|
|
|
$severity_desc = __('Normal');
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_WARNING:
|
2013-02-28 12:57:57 +01:00
|
|
|
$severity_desc = __('Warning');
|
|
|
|
break;
|
2013-04-18 11:25:23 +02:00
|
|
|
case EVENT_CRIT_CRITICAL:
|
2013-02-28 12:57:57 +01:00
|
|
|
$severity_desc = __('Critical');
|
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
default:
|
2013-04-18 11:25:23 +02:00
|
|
|
if (isset($config['text_char_long'])) {
|
|
|
|
foreach ($diferent_types as $key => $type) {
|
|
|
|
if ($key == $severity_id){
|
|
|
|
$severity_desc = ui_print_truncate_text($type, $config['text_char_long'], false, true, false);
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
}
|
2013-04-18 11:25:23 +02:00
|
|
|
}
|
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
return $severity_desc;
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return all descriptions of event status.
|
|
|
|
*
|
|
|
|
* @return array Status description array.
|
|
|
|
*/
|
2013-04-18 11:25:23 +02:00
|
|
|
function events_get_all_status () {
|
2012-02-08 14:04:18 +01:00
|
|
|
$fields = array ();
|
|
|
|
$fields[-1] = __('All event');
|
|
|
|
$fields[0] = __('Only new');
|
|
|
|
$fields[1] = __('Only validated');
|
|
|
|
$fields[2] = __('Only in process');
|
2013-03-22 15:27:47 +01:00
|
|
|
$fields[3] = __('Only not validated');
|
2012-02-08 14:04:18 +01:00
|
|
|
|
|
|
|
return $fields;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Decode a numeric status into status description.
|
|
|
|
*
|
|
|
|
* @param int $status_id Numeric status.
|
|
|
|
*
|
|
|
|
* @return string Status description.
|
|
|
|
*/
|
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
|
|
|
function events_get_status ($status_id) {
|
|
|
|
switch ($status_id) {
|
|
|
|
case -1:
|
|
|
|
$status_desc = __('All event');
|
|
|
|
break;
|
|
|
|
case 0:
|
|
|
|
$status_desc = __('Only new');
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
$status_desc = __('Only validated');
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$status_desc = __('Only in process');
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
$status_desc = __('Only not validated');
|
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return $status_desc;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if a user has permissions to see an event filter.
|
|
|
|
*
|
|
|
|
* @param int $id_filter Id of the event filter.
|
|
|
|
*
|
|
|
|
* @return bool True if the user has permissions or false otherwise.
|
|
|
|
*/
|
|
|
|
function events_check_event_filter_group ($id_filter) {
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
$id_group = db_get_value('id_group', 'tevent_filter', 'id_filter', $id_filter);
|
|
|
|
$own_info = get_user_info ($config['id_user']);
|
|
|
|
// Get group list that user has access
|
2012-12-28 18:06:17 +01:00
|
|
|
$groups_user = users_get_groups ($config['id_user'], "EW", $own_info['is_admin'], true);
|
2013-06-10 18:15:36 +02:00
|
|
|
|
|
|
|
// Permissions in any group allow to edit "All group" filters
|
|
|
|
if($id_group == 0 && !empty($groups_user)) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
$groups_id = array();
|
|
|
|
$has_permission = false;
|
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
foreach ($groups_user as $key => $groups) {
|
2012-02-08 14:04:18 +01:00
|
|
|
if ($groups['id_grupo'] == $id_group)
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
/**
|
|
|
|
* Return an array with all the possible macros in event responses
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
function events_get_macros() {
|
2013-04-18 11:25:23 +02:00
|
|
|
return array('_agent_address_' => __('Agent address'),
|
|
|
|
'_agent_id_' => __('Agent id'),
|
|
|
|
'_event_id_' => __('Event id'));
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
/**
|
|
|
|
* Get a event filter.
|
|
|
|
*
|
|
|
|
* @param int Filter id to be fetched.
|
|
|
|
* @param array Extra filter.
|
|
|
|
* @param array Fields to be fetched.
|
|
|
|
*
|
|
|
|
* @return array A event filter matching id and filter or false.
|
|
|
|
*/
|
|
|
|
function events_get_event_filter ($id_filter, $filter = false, $fields = false) {
|
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if (empty($id_filter)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! is_array ($filter)) {
|
|
|
|
$filter = array ();
|
|
|
|
$filter['id_filter'] = (int) $id_filter;
|
|
|
|
}
|
|
|
|
|
|
|
|
return db_get_row_filter ('tevent_filter', $filter, $fields);
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a event filters in select format.
|
|
|
|
*
|
2014-01-17 12:53:30 +01:00
|
|
|
* @param boolean If event filters are used for manage/view operations (non admin users can see group ALL for manage) # Fix
|
2012-02-08 14:04:18 +01:00
|
|
|
* @return array A event filter matching id and filter or false.
|
|
|
|
*/
|
2014-01-17 12:53:30 +01:00
|
|
|
function events_get_event_filter_select($manage = true){
|
2012-02-08 14:04:18 +01:00
|
|
|
global $config;
|
|
|
|
|
2014-01-17 12:53:30 +01:00
|
|
|
$user_groups = users_get_groups ($config['id_user'], "EW", $manage, true);
|
2012-12-28 18:06:17 +01:00
|
|
|
if(empty($user_groups)) {
|
|
|
|
return array();
|
|
|
|
}
|
2012-02-08 14:04:18 +01:00
|
|
|
$sql = "SELECT id_filter, id_name FROM tevent_filter WHERE id_group IN (".implode(',', array_keys ($user_groups)).")";
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
$event_filters = db_get_all_rows_sql($sql);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if ($event_filters === false) {
|
2012-02-08 14:04:18 +01:00
|
|
|
return array();
|
|
|
|
}
|
2013-04-18 11:25:23 +02:00
|
|
|
else {
|
2012-02-08 14:04:18 +01:00
|
|
|
$result = array();
|
|
|
|
foreach ($event_filters as $event_filter){
|
|
|
|
$result[$event_filter['id_filter']] = $event_filter['id_name'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
// Events pages functions to load modal window with advanced view of an event.
|
|
|
|
// Called from include/ajax/events.php
|
|
|
|
|
|
|
|
function events_page_responses ($event) {
|
|
|
|
global $config;
|
|
|
|
/////////
|
|
|
|
// Responses
|
|
|
|
/////////
|
|
|
|
|
|
|
|
$table_responses->id = 'responses_table';
|
|
|
|
$table_responses->width = '100%';
|
|
|
|
$table_responses->data = array ();
|
|
|
|
$table_responses->head = array ();
|
|
|
|
$table_responses->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
|
|
|
$table_responses->style[1] = 'text-align: left;';
|
2013-04-23 16:57:29 +02:00
|
|
|
$table_responses->class = "alternate rounded_cells";
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2013-01-09 10:25:07 +01:00
|
|
|
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags'])) {
|
2012-12-28 18:06:17 +01:00
|
|
|
// Owner
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Change owner');
|
2013-11-21 15:55:23 +01:00
|
|
|
// Owner change can be done to users that belong to the event group with ER permission
|
|
|
|
$profiles_view_events = db_get_all_rows_filter('tperfil', array('event_view' => '1'), 'id_perfil');
|
|
|
|
foreach($profiles_view_events as $k => $v) {
|
|
|
|
$profiles_view_events[$k] = reset($v);
|
|
|
|
}
|
2014-05-05 15:58:08 +02:00
|
|
|
// Juanma (05/05/2014) Fix : Propagate ACL hell!
|
|
|
|
$_user_groups = array_keys(users_get_groups($config['id_user'], 'ER', users_can_manage_group_all()));
|
|
|
|
$users = groups_get_users($_user_groups, array('id_perfil' => $profiles_view_events), true, true);
|
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
foreach($users as $u) {
|
|
|
|
$owners[$u['id_user']] = $u['fullname'];
|
|
|
|
}
|
|
|
|
|
|
|
|
if($event['owner_user'] == '') {
|
|
|
|
$owner_name = __('None');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$owner_name = db_get_value('fullname', 'tusuario', 'id_user', $event['owner_user']);
|
|
|
|
$owners[$event['owner_user']] = $owner_name;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data[1] = html_print_select($owners, 'id_owner', $event['owner_user'], '', __('None'), -1, true);
|
|
|
|
$data[1] .= html_print_button(__('Update'),'owner_button',false,'event_change_owner();','class="sub next"',true);
|
|
|
|
|
|
|
|
$table_responses->data[] = $data;
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Status
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Change status');
|
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
$status_blocked = false;
|
|
|
|
|
2013-01-09 10:25:07 +01:00
|
|
|
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags'])) {
|
2012-12-28 18:06:17 +01:00
|
|
|
// If the user has manager acls, the status can be changed to all possibilities always
|
|
|
|
$status = array(0 => __('New'), 2 => __('In process'), 1 => __('Validated'));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
switch($event['estado']) {
|
|
|
|
case 0:
|
|
|
|
// If the user hasnt manager acls and the event is new. The status can be changed
|
|
|
|
$status = array(2 => __('In process'), 1 => __('Validated'));
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
// If the user hasnt manager acls and the event is validated. The status cannot be changed
|
|
|
|
$status = array(1 => __('Validated'));
|
|
|
|
$status_blocked = true;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
// If the user hasnt manager acls and the event is in process. The status only can be changed to validated
|
|
|
|
$status = array(1 => __('Validated'));
|
|
|
|
break;
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
// The change status option will be enabled only when is possible change the status
|
|
|
|
$data[1] = html_print_select($status, 'estado', $event['estado'], '', '', 0, true, false, false, '', $status_blocked);
|
|
|
|
|
|
|
|
if(!$status_blocked) {
|
|
|
|
$data[1] .= html_print_button(__('Update'),'status_button',false,'event_change_status(\''.$event['similar_ids'] .'\');','class="sub next"',true);
|
|
|
|
}
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_responses->data[] = $data;
|
|
|
|
|
|
|
|
// Comments
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Comment');
|
|
|
|
$data[1] = html_print_button(__('Add comment'),'comment_button',false,'$(\'#link_comments\').trigger(\'click\');','class="sub next"',true);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_responses->data[] = $data;
|
|
|
|
|
2013-01-09 10:25:07 +01:00
|
|
|
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags'])) {
|
2012-12-28 18:06:17 +01:00
|
|
|
// Delete
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Delete event');
|
|
|
|
$data[1] = '<form method="post">';
|
|
|
|
$data[1] .= html_print_button(__('Delete event'),'delete_button',false,'if(!confirm(\''.__('Are you sure?').'\')) { return false; } this.form.submit();','class="sub cancel"',true);
|
|
|
|
$data[1] .= html_print_input_hidden('delete', 1, true);
|
|
|
|
$data[1] .= html_print_input_hidden('validate_ids', $event['id_evento'], true);
|
|
|
|
$data[1] .= '</form>';
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-12-28 18:06:17 +01:00
|
|
|
$table_responses->data[] = $data;
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
// Custom responses
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Custom responses');
|
2013-10-04 14:27:42 +02:00
|
|
|
|
|
|
|
$id_groups = array_keys(users_get_groups(false, "EW"));
|
|
|
|
$event_responses = db_get_all_rows_filter('tevent_response',
|
|
|
|
array('id_group' => $id_groups));
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
if(empty($event_responses)) {
|
2013-04-15 18:04:39 +02:00
|
|
|
$data[1] = '<i>'.__('N/A').'</i>';
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$responses = array();
|
|
|
|
foreach($event_responses as $v) {
|
|
|
|
$responses[$v['id']] = $v['name'];
|
|
|
|
}
|
2013-04-15 18:04:39 +02:00
|
|
|
$data[1] = html_print_select($responses,'select_custom_response','','','','',true, false, false);
|
2012-12-20 16:33:23 +01:00
|
|
|
|
|
|
|
if(isset($event['server_id'])) {
|
|
|
|
$server_id = $event['server_id'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$server_id = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data[1] .= html_print_button(__('Execute'),'custom_response_button',false,'execute_response('.$event['id_evento'].','.$server_id.')',"class='sub next'",true);
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_responses->data[] = $data;
|
|
|
|
|
|
|
|
$responses_js = "<script>
|
|
|
|
$('#select_custom_response').change(function() {
|
|
|
|
var id_response = $('#select_custom_response').val();
|
|
|
|
var params = get_response_params(id_response);
|
|
|
|
var description = get_response_description(id_response);
|
|
|
|
$('.params_rows').remove();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$('#responses_table').append('<tr class=\"params_rows\"><td style=\"text-align:left; padding-left:20px;\">".__('Description')."</td><td style=\"text-align:left;\">'+description+'</td></tr>');
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
if(params.length == 1 && params[0] == '') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#responses_table').append('<tr class=\"params_rows\"><td style=\"text-align:left; padding-left:20px;\" colspan=\"2\">".__('Parameters')."</td></tr>');
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
for(i=0;i<params.length;i++) {
|
|
|
|
add_row_param('responses_table',params[i]);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$('#select_custom_response').trigger('change');
|
|
|
|
</script>";
|
|
|
|
|
|
|
|
$responses = '<div id="extended_event_responses_page" class="extended_event_pages">'.html_print_table($table_responses, true).$responses_js.'</div>';
|
2013-01-31 Miguel de Dios <miguel.dedios@artica.es>
* include/styles/jquery-ui-1.10.0.custom.css,
include/styles/images/ui-*,
include/javascript/jquery.jquery-ui-1.10.0.custom.js,
include/javascript/jquery-1.9.0.js: added the last version of
jquery and jqueryUI.
* godmode/reporting/visual_console_builder.editor.js,
include/ajax/events.php, include/functions_events.php,
include/functions_reporting.php,
include/javascript/pandora_events.js,
include/javascript/jquery.scrollTo.js,
include/javascript/jquery.tablesorter.pager.js,
include/javascript/jquery.tablesorter.js, include/functions_ui.php,
extensions/update_manager/lib/functions.php,
extensions/update_manager/main.php, extensions/agents_alerts.php,
operation/events/events.php, general/login_page.php,
general/logoff.php, general/header.php,
general/login_help_dialog.php: fixes about the new jquery and
jqueryUI version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-31 17:49:08 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
return $responses;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Replace macros in the target of a response and return it
|
2012-12-20 16:33:23 +01:00
|
|
|
// If server_id > 0, is a metaconsole query
|
2013-01-16 13:57:11 +01:00
|
|
|
function events_get_response_target($event_id, $response_id, $server_id, $history = false) {
|
2012-12-20 16:33:23 +01:00
|
|
|
global $config;
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$event_response = db_get_row('tevent_response','id',$response_id);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-04-23 13:22:06 +02:00
|
|
|
if ($server_id > 0) {
|
2013-01-16 13:57:11 +01:00
|
|
|
$meta = true;
|
2012-12-20 16:33:23 +01:00
|
|
|
}
|
|
|
|
else {
|
2013-01-16 13:57:11 +01:00
|
|
|
$meta = false;
|
2012-12-20 16:33:23 +01:00
|
|
|
}
|
2013-01-16 13:57:11 +01:00
|
|
|
|
|
|
|
$event_table = events_get_events_table($meta, $history);
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
$event = db_get_row($event_table,'id_evento', $event_id);
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$macros = array_keys(events_get_macros());
|
|
|
|
|
|
|
|
$target = io_safe_output($event_response['target']);
|
2012-12-20 16:33:23 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
foreach($macros as $macro) {
|
|
|
|
$subst = '';
|
|
|
|
switch($macro) {
|
|
|
|
case '_agent_address_':
|
2013-01-16 13:57:11 +01:00
|
|
|
if($meta) {
|
2012-12-20 16:33:23 +01:00
|
|
|
$server = metaconsole_get_connection_by_id ($server_id);
|
|
|
|
metaconsole_connect($server);
|
|
|
|
}
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$subst = agents_get_address($event['id_agente']);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-01-16 13:57:11 +01:00
|
|
|
if($meta) {
|
2012-12-20 16:33:23 +01:00
|
|
|
metaconsole_restore_db_force();
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
break;
|
|
|
|
case '_agent_id_':
|
|
|
|
$subst = $event['id_agente'];
|
|
|
|
break;
|
|
|
|
case '_event_id_':
|
|
|
|
$subst = $event['id_evento'];
|
|
|
|
break;
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$target = str_replace($macro,$subst,$target);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $target;
|
|
|
|
}
|
|
|
|
|
|
|
|
function events_page_custom_fields ($event) {
|
|
|
|
global $config;
|
2013-04-23 13:22:06 +02:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
// Custom fields
|
2013-04-23 13:22:06 +02:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
$table->width = '100%';
|
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
|
|
|
$table->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
|
|
|
$table->style[1] = 'text-align: left;';
|
2013-04-23 16:57:29 +02:00
|
|
|
$table->class = "alternate rounded_cells";
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2013-02-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/recon_script.php, godmode/servers/plugin.php,
godmode/snmpconsole/snmp_filters.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_delete_action_alerts.php: improved the code
style.
* include/ajax/events.php, include/functions_events.php,
operation/agentes/custom_fields.php: fixed the show admin custom
fields for user without permisitions.
Fixes: #3605278
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7683 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-20 13:07:00 +01:00
|
|
|
$all_customs_fields = (bool)check_acl($config["id_user"],
|
2013-04-15 18:04:39 +02:00
|
|
|
$event["id_grupo"], "AW");
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2013-02-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/recon_script.php, godmode/servers/plugin.php,
godmode/snmpconsole/snmp_filters.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_delete_action_alerts.php: improved the code
style.
* include/ajax/events.php, include/functions_events.php,
operation/agentes/custom_fields.php: fixed the show admin custom
fields for user without permisitions.
Fixes: #3605278
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7683 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-20 13:07:00 +01:00
|
|
|
if ($all_customs_fields) {
|
|
|
|
$fields = db_get_all_rows_filter('tagent_custom_fields');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$fields = db_get_all_rows_filter('tagent_custom_fields',
|
|
|
|
array('display_on_front' => 1));
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($event['id_agente'] == 0) {
|
2012-10-09 18:05:32 +02:00
|
|
|
$fields_data = array();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$fields_data = db_get_all_rows_filter('tagent_custom_data', array('id_agent' => $event['id_agente']));
|
|
|
|
if(is_array($fields_data)) {
|
|
|
|
$fields_data_aux = array();
|
|
|
|
foreach($fields_data as $fd) {
|
|
|
|
$fields_data_aux[$fd['id_field']] = $fd['description'];
|
|
|
|
}
|
|
|
|
$fields_data = $fields_data_aux;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/recon_script.php, godmode/servers/plugin.php,
godmode/snmpconsole/snmp_filters.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_delete_action_alerts.php: improved the code
style.
* include/ajax/events.php, include/functions_events.php,
operation/agentes/custom_fields.php: fixed the show admin custom
fields for user without permisitions.
Fixes: #3605278
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7683 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-20 13:07:00 +01:00
|
|
|
foreach ($fields as $field) {
|
2012-10-09 18:05:32 +02:00
|
|
|
// Owner
|
|
|
|
$data = array();
|
|
|
|
$data[0] = $field['name'];
|
|
|
|
|
|
|
|
$data[1] = empty($fields_data[$field['id_field']]) ? '<i>'.__('N/A').'</i>' : $fields_data[$field['id_field']];
|
|
|
|
|
|
|
|
$field['id_field'];
|
|
|
|
|
|
|
|
$table->data[] = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
$custom_fields = '<div id="extended_event_custom_fields_page" class="extended_event_pages">'.html_print_table($table, true).'</div>';
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
return $custom_fields;
|
|
|
|
}
|
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
function events_page_details ($event, $server = "") {
|
2012-10-09 18:05:32 +02:00
|
|
|
global $img_sev;
|
2012-12-18 12:54:22 +01:00
|
|
|
global $config;
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-12-21 12:11:22 +01:00
|
|
|
// If server is provided, get the hash parameters
|
|
|
|
if (!empty($server)) {
|
|
|
|
$hashdata = metaconsole_get_server_hashdata($server);
|
|
|
|
$hashstring = "&loginhash=auto&loginhash_data=" . $hashdata . "&loginhash_user=" . $config["id_user"];
|
|
|
|
$serverstring = $server['server_url'] . "/";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$hashstring = "";
|
|
|
|
$serverstring = "";
|
|
|
|
}
|
2013-04-23 13:22:06 +02:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
// Details
|
2013-04-23 13:22:06 +02:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
$table_details->width = '100%';
|
|
|
|
$table_details->data = array ();
|
|
|
|
$table_details->head = array ();
|
|
|
|
$table_details->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
|
|
|
$table_details->style[1] = 'text-align: left;';
|
2013-04-23 16:57:29 +02:00
|
|
|
$table_details->class = "alternate rounded_cells";
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2013-04-23 13:22:06 +02:00
|
|
|
switch ($event['event_type']) {
|
2012-10-09 18:05:32 +02:00
|
|
|
case 'going_unknown':
|
|
|
|
case 'going_up_warning':
|
|
|
|
case 'going_down_warning':
|
|
|
|
case 'going_up_critical':
|
|
|
|
case 'going_down_critical':
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($event["id_agente"] != 0) {
|
2013-05-30 17:48:22 +02:00
|
|
|
if (!empty($server)) {
|
|
|
|
$agent = agents_meta_get_agent(array('id_agent' => $event["id_agente"],
|
|
|
|
'id_server' => $server['id'],
|
|
|
|
'server_name' => $server['server_name']));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$agent = db_get_row('tagente','id_agente',$event["id_agente"]);
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$agent = array();
|
|
|
|
}
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Agent details');
|
|
|
|
$data[1] = empty($agent) ? '<i>' . __('N/A') . '</i>' : '';
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
if (!empty($agent)) {
|
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Name').'</div>';
|
2013-05-30 17:48:22 +02:00
|
|
|
if (can_user_access_node ()) {
|
|
|
|
$data[1] = ui_print_agent_name ($event["id_agente"], true, 'agent_medium', '', false, $serverstring, $hashstring, $agent['nombre']);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = ui_print_truncate_text($agent['nombre'], 'agent_medium', true, true, true);
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_details->data[] = $data;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('IP Address').'</div>';
|
2012-10-11 19:49:17 +02:00
|
|
|
$data[1] = empty($agent['direccion']) ? '<i>'.__('N/A').'</i>' : $agent['direccion'];
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('OS').'</div>';
|
|
|
|
$data[1] = ui_print_os_icon ($agent["id_os"], true, true).' ('.$agent["os_version"].')';
|
|
|
|
$table_details->data[] = $data;
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Last contact').'</div>';
|
2012-10-11 19:49:17 +02:00
|
|
|
$data[1] = $agent["ultimo_contacto"] == "1970-01-01 00:00:00" ? '<i>'.__('N/A').'</i>' : $agent["ultimo_contacto"];
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_details->data[] = $data;
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Last remote contact').'</div>';
|
2012-10-11 19:49:17 +02:00
|
|
|
$data[1] = $agent["ultimo_contacto_remoto"] == "1970-01-01 00:00:00" ? '<i>'.__('N/A').'</i>' : $agent["ultimo_contacto_remoto"];
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Custom fields').'</div>';
|
|
|
|
$data[1] = html_print_button(__('View custom fields'),'custom_button',false,'$(\'#link_custom_fields\').trigger(\'click\');','class="sub next"',true);
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($event["id_agentmodule"] != 0) {
|
2013-05-30 17:48:22 +02:00
|
|
|
if (!empty($server)) {
|
|
|
|
$module = meta_modules_get_agentmodule ($event["id_agentmodule"], $server['id']);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$module = db_get_row_filter('tagente_modulo',array('id_agente_modulo' => $event["id_agentmodule"], 'delete_pending' => 0));
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$module = array();
|
|
|
|
}
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Module details');
|
|
|
|
$data[1] = empty($module) ? '<i>' . __('N/A') . '</i>' : '';
|
|
|
|
$table_details->data[] = $data;
|
2013-04-23 13:22:06 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
if (!empty($module)) {
|
|
|
|
// Module name
|
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Name').'</div>';
|
2014-03-11 18:07:11 +01:00
|
|
|
$data[1] = $module['nombre'];
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
// Module group
|
|
|
|
$data = array();
|
2013-04-23 13:22:06 +02:00
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">' .
|
|
|
|
__('Module group') . '</div>';
|
2012-10-09 18:05:32 +02:00
|
|
|
$id_module_group = $module['id_module_group'];
|
2013-04-23 13:22:06 +02:00
|
|
|
if ($id_module_group == 0) {
|
2012-10-09 18:05:32 +02:00
|
|
|
$data[1] = __('No assigned');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$module_group = db_get_value('name', 'tmodule_group', 'id_mg', $id_module_group);
|
2013-04-23 13:22:06 +02:00
|
|
|
$data[1] = '<a href="'.$serverstring . 'index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&modulegroup=' . $id_module_group . $hashstring.'">';
|
2012-10-09 18:05:32 +02:00
|
|
|
$data[1] .= $module_group;
|
|
|
|
$data[1] .= '</a>';
|
|
|
|
}
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Graph').'</div>';
|
2013-04-18 11:25:23 +02:00
|
|
|
$module_module_type = -1;
|
|
|
|
if (isset($module["module_type"])) {
|
|
|
|
$module_module_type = $module["module_type"];
|
|
|
|
}
|
|
|
|
$graph_type = return_graphtype ($module_module_type);
|
|
|
|
|
2013-04-23 13:22:06 +02:00
|
|
|
$win_handle=dechex(crc32($module["id_agente_modulo"] .
|
|
|
|
$module["nombre"]));
|
2013-04-18 11:25:23 +02:00
|
|
|
|
|
|
|
$module_module_name = '';
|
|
|
|
if (isset($module["module_name"])) {
|
|
|
|
$module_module_name = $module["module_name"];
|
|
|
|
}
|
2014-06-30 09:54:11 +02:00
|
|
|
$link ="winopeng('" . $serverstring . "operation/agentes/stat_win.php?type=" . $graph_type."&period=86400&id=" . $module["id_agente_modulo"] . "&label=" . rawurlencode(urlencode(base64_encode($module_module_name))) . $hashstring . "&refresh=600','day_".$win_handle."')";
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
$data[1] = '<a href="javascript:'.$link.'">';
|
2012-10-09 18:05:32 +02:00
|
|
|
$data[1] .= html_print_image('images/chart_curve.png',true);
|
|
|
|
$data[1] .= '</a>';
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
}
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Alert details');
|
|
|
|
$data[1] = $event["id_alert_am"] == 0 ? '<i>' . __('N/A') . '</i>' : '';
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
if ($event["id_alert_am"] != 0) {
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Source').'</div>';
|
2012-12-21 12:11:22 +01:00
|
|
|
$data[1] = '<a href="'.$serverstring.'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$event["id_agente"].'&tab=alert'.$hashstring.'">';
|
2012-10-09 18:05:32 +02:00
|
|
|
$standby = db_get_value('standby', 'talert_template_modules', 'id', $event["id_alert_am"]);
|
|
|
|
if(!$standby) {
|
|
|
|
$data[1] .= html_print_image ("images/bell.png", true,
|
|
|
|
array ("title" => __('Go to data overview')));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] .= html_print_image ("images/bell_pause.png", true,
|
|
|
|
array ("title" => __('Go to data overview')));
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql = 'SELECT name
|
|
|
|
FROM talert_templates
|
|
|
|
WHERE id IN (SELECT id_alert_template
|
|
|
|
FROM talert_template_modules
|
|
|
|
WHERE id = ' . $event["id_alert_am"] . ');';
|
|
|
|
|
|
|
|
$templateName = db_get_sql($sql);
|
|
|
|
|
|
|
|
$data[1] .= $templateName;
|
|
|
|
|
2013-04-18 11:25:23 +02:00
|
|
|
$data[1] .= '</a>';
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Priority').'</div>';
|
|
|
|
|
|
|
|
$priority_code = db_get_value('priority', 'talert_template_modules', 'id', $event["id_alert_am"]);
|
|
|
|
$alert_priority = get_priority_name ($priority_code);
|
|
|
|
$data[1] = html_print_image ($img_sev, true,
|
|
|
|
array ("class" => "image_status",
|
|
|
|
"width" => 12,
|
|
|
|
"height" => 12,
|
|
|
|
"title" => $alert_priority));
|
|
|
|
$data[1] .= ' '.$alert_priority;
|
|
|
|
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch($event['event_type']) {
|
|
|
|
case 'going_unknown':
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Instructions');
|
|
|
|
if ($event["unknown_instructions"] != '') {
|
2013-03-07 17:35:37 +01:00
|
|
|
$data[1] = str_replace("\n","<br>", io_safe_output($event["unknown_instructions"]));
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
break;
|
|
|
|
case 'going_up_warning':
|
|
|
|
case 'going_down_warning':
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Instructions');
|
|
|
|
if ($event["warning_instructions"] != '') {
|
2013-03-07 17:35:37 +01:00
|
|
|
$data[1] = str_replace("\n","<br>", io_safe_output($event["warning_instructions"]));
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
break;
|
|
|
|
case 'going_up_critical':
|
|
|
|
case 'going_down_critical':
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Instructions');
|
|
|
|
if ($event["critical_instructions"] != '') {
|
2013-03-07 17:35:37 +01:00
|
|
|
$data[1] = str_replace("\n","<br>", io_safe_output($event["critical_instructions"]));
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
break;
|
|
|
|
}
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Extra id');
|
|
|
|
if ($event["id_extra"] != '') {
|
|
|
|
$data[1] = $event["id_extra"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Source');
|
|
|
|
if ($event["source"] != '') {
|
|
|
|
$data[1] = $event["source"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_details->data[] = $data;
|
|
|
|
|
|
|
|
$details = '<div id="extended_event_details_page" class="extended_event_pages">'.html_print_table($table_details, true).'</div>';
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
return $details;
|
|
|
|
}
|
|
|
|
|
2013-09-09 18:21:45 +02:00
|
|
|
function events_page_custom_data ($event) {
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
// Custom data
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
if ($event['custom_data'] == '') {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$table->width = '100%';
|
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
|
|
|
$table->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
|
|
|
$table->style[1] = 'text-align: left;';
|
|
|
|
$table->class = "alternate rounded_cells";
|
|
|
|
|
|
|
|
$json_custom_data = base64_decode ($event['custom_data']);
|
|
|
|
$custom_data = json_decode ($json_custom_data);
|
|
|
|
if ($custom_data === NULL) {
|
|
|
|
return '<div id="extended_event_custom_data_page" class="extended_event_pages">'.__('Invalid custom data: %s', $json_custom_data).'</div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
foreach ($custom_data as $field => $value) {
|
|
|
|
$table->data[$i][0] = io_safe_output ($field);
|
|
|
|
$table->data[$i][1] = io_safe_output ($value);
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$custom_data = '<div id="extended_event_custom_data_page" class="extended_event_pages">'.html_print_table($table, true).'</div>';
|
|
|
|
|
|
|
|
return $custom_data;
|
|
|
|
}
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
function events_page_general ($event) {
|
|
|
|
global $img_sev;
|
|
|
|
global $config;
|
2012-10-11 19:49:17 +02:00
|
|
|
|
|
|
|
//$group_rep = $event['similar_ids'] == -1 ? 1 : count(explode(',',$event['similar_ids']));
|
2012-10-09 18:05:32 +02:00
|
|
|
global $group_rep;
|
2013-04-18 11:25:23 +02:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
// General
|
2013-04-18 11:25:23 +02:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
$table_general->width = '100%';
|
|
|
|
$table_general->data = array ();
|
|
|
|
$table_general->head = array ();
|
|
|
|
$table_general->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
|
|
|
$table_general->style[1] = 'text-align: left;';
|
2013-04-23 16:57:29 +02:00
|
|
|
$table_general->class = "alternate rounded_cells";
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Event ID');
|
|
|
|
$data[1] = "#".$event["id_evento"];
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Event name');
|
|
|
|
$data[1] = io_safe_output(io_safe_output($event["evento"]));
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Timestamp');
|
2012-10-11 19:49:17 +02:00
|
|
|
if ($group_rep == 1 && $event["event_rep"] > 1) {
|
|
|
|
$data[1] = __('First event').': '.date ($config["date_format"], $event['timestamp_first']).'<br>'.__('Last event').': '.date ($config["date_format"], $event['timestamp_last']);
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = date ($config["date_format"], strtotime($event["timestamp"]));
|
|
|
|
}
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Owner');
|
2013-04-18 11:25:23 +02:00
|
|
|
if (empty($event["owner_user"])) {
|
2012-10-09 18:05:32 +02:00
|
|
|
$data[1] = '<i>'.__('N/A').'</i>';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$user_owner = db_get_value('fullname', 'tusuario', 'id_user', $event["owner_user"]);
|
2013-03-07 10:46:35 +01:00
|
|
|
if(empty($user_owner)) {
|
|
|
|
$user_owner = $event['owner_user'];
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
$data[1] = $user_owner;
|
|
|
|
}
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Type');
|
|
|
|
$data[1] = events_print_type_img ($event["event_type"], true).' '.events_print_type_description($event["event_type"], true);
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Repeated');
|
|
|
|
if ($group_rep != 0) {
|
2012-10-11 19:49:17 +02:00
|
|
|
if($event["event_rep"] <= 1) {
|
|
|
|
$data[1] = '<i>'.__('No').'</i>';
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = sprintf("%d Times",$event["event_rep"]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2012-10-11 19:49:17 +02:00
|
|
|
$data[1] = '<i>'.__('No').'</i>';
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Severity');
|
|
|
|
$event_criticity = get_priority_name ($event["criticity"]);
|
2013-02-28 17:36:34 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$data[1] = html_print_image ($img_sev, true,
|
|
|
|
array ("class" => "image_status",
|
|
|
|
"width" => 12,
|
|
|
|
"height" => 12,
|
|
|
|
"title" => $event_criticity));
|
|
|
|
$data[1] .= ' '.$event_criticity;
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
// Get Status
|
|
|
|
switch($event['estado']) {
|
|
|
|
case 0:
|
|
|
|
$img_st = "images/star.png";
|
|
|
|
$title_st = __('New event');
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
$img_st = "images/tick.png";
|
|
|
|
$title_st = __('Event validated');
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$img_st = "images/hourglass.png";
|
|
|
|
$title_st = __('Event in process');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Status');
|
|
|
|
$data[1] = html_print_image($img_st,true).' '.$title_st;
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
// If event is validated, show who and when acknowleded it
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Acknowledged by');
|
2013-04-18 11:25:23 +02:00
|
|
|
|
|
|
|
if ($event['estado'] == 1) {
|
2012-10-09 18:05:32 +02:00
|
|
|
$user_ack = db_get_value('fullname', 'tusuario', 'id_user', $event['id_usuario']);
|
2013-03-07 10:46:35 +01:00
|
|
|
if(empty($user_ack)) {
|
|
|
|
$user_ack = $event['id_usuario'];
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
$date_ack = date ($config["date_format"], $event['ack_utimestamp']);
|
2013-03-21 19:47:28 +01:00
|
|
|
$data[1] = $user_ack.' ('.$date_ack.')';
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>'.__('N/A').'</i>';
|
|
|
|
}
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Group');
|
|
|
|
$data[1] = ui_print_group_icon ($event["id_grupo"], true);
|
|
|
|
$data[1] .= groups_get_name ($event["id_grupo"]);
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('Tags');
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
if ($event["tags"] != '') {
|
2013-01-09 10:25:07 +01:00
|
|
|
$tags = tags_get_tags_formatted($event["tags"]);
|
2013-04-18 11:25:23 +02:00
|
|
|
|
2012-10-30 12:48:28 +01:00
|
|
|
$data[1] = $tags;
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
2013-09-04 11:14:52 +02:00
|
|
|
$data = array();
|
|
|
|
$data[0] = __('ID extra');
|
|
|
|
if ($event["id_extra"] != '') {
|
|
|
|
$data[1] = $event["id_extra"];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[1] = '<i>' . __('N/A') . '</i>';
|
|
|
|
}
|
|
|
|
$table_general->data[] = $data;
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
$general = '<div id="extended_event_general_page" class="extended_event_pages">'.html_print_table($table_general,true).'</div>';
|
|
|
|
|
|
|
|
return $general;
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
function events_page_comments ($event) {
|
2013-04-18 11:25:23 +02:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2012-10-09 18:05:32 +02:00
|
|
|
// Comments
|
2013-04-18 11:25:23 +02:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2013-04-15 18:04:39 +02:00
|
|
|
global $config;
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
$table_comments->width = '100%';
|
|
|
|
$table_comments->data = array ();
|
|
|
|
$table_comments->head = array ();
|
|
|
|
$table_comments->style[0] = 'width:35%; vertical-align: top; text-align: left;';
|
|
|
|
$table_comments->style[1] = 'text-align: left;';
|
2013-04-23 16:57:29 +02:00
|
|
|
$table_comments->class = "alternate rounded_cells";
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
$event_comments = io_safe_output($event["user_comment"]);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
// If comments are not stored in json, the format is old
|
|
|
|
$event_comments_array = json_decode($event_comments, true);
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
2013-12-10 13:22:55 +01:00
|
|
|
// Show the comments more recent first
|
|
|
|
$event_comments_array = array_reverse($event_comments_array);
|
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
if (is_null($event_comments_array)) {
|
|
|
|
$comments_format = 'old';
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
2013-11-07 17:37:43 +01:00
|
|
|
else {
|
|
|
|
$comments_format = 'new';
|
|
|
|
}
|
|
|
|
|
2012-10-09 18:05:32 +02:00
|
|
|
|
2013-11-07 17:37:43 +01:00
|
|
|
switch($comments_format) {
|
|
|
|
case 'new':
|
|
|
|
if (empty($event_comments_array)) {
|
|
|
|
$table_comments->style[0] = 'text-align:center;';
|
|
|
|
$table_comments->colspan[0][0] = 2;
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('There are no comments');
|
|
|
|
$table_comments->data[] = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach($event_comments_array as $c) {
|
|
|
|
$data[0] = '<b>' . $c['action'] . ' by ' . $c['id_user'] . '</b>';
|
|
|
|
$data[0] .= '<br><br><i>' . date ($config["date_format"], $c['utimestamp']) . '</i>';
|
|
|
|
$data[1] = $c['comment'];
|
|
|
|
$table_comments->data[] = $data;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'old':
|
|
|
|
$comments_array = explode('<br>',$event_comments);
|
|
|
|
|
|
|
|
// Split comments and put in table
|
|
|
|
$col = 0;
|
|
|
|
$data = array();
|
|
|
|
|
|
|
|
foreach ($comments_array as $c) {
|
|
|
|
switch ($col) {
|
|
|
|
case 0:
|
|
|
|
$row_text = preg_replace('/\s*--\s*/',"",$c);
|
|
|
|
$row_text = preg_replace('/\<\/b\>/',"</i>",$row_text);
|
|
|
|
$row_text = preg_replace('/\[/',"</b><br><br><i>[",$row_text);
|
|
|
|
$row_text = preg_replace('/[\[|\]]/',"",$row_text);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
$row_text = preg_replace("/[\r\n|\r|\n]/","<br>",io_safe_output(strip_tags($c)));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data[$col] = $row_text;
|
|
|
|
|
|
|
|
$col++;
|
|
|
|
|
|
|
|
if($col == 2) {
|
|
|
|
$col = 0;
|
|
|
|
$table_comments->data[] = $data;
|
|
|
|
$data = array();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (count($comments_array) == 1 && $comments_array[0] == '') {
|
|
|
|
$table_comments->style[0] = 'text-align:center;';
|
|
|
|
$table_comments->colspan[0][0] = 2;
|
|
|
|
$data = array();
|
|
|
|
$data[0] = __('There are no comments');
|
|
|
|
$table_comments->data[] = $data;
|
|
|
|
}
|
|
|
|
break;
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
|
|
|
|
2013-03-04 15:41:26 +01:00
|
|
|
if (tags_check_acl ($config['id_user'], $event['id_grupo'], "EW", $event['clean_tags']) || tags_check_acl ($config['id_user'], $event['id_grupo'], "EM", $event['clean_tags'])) {
|
2012-12-28 18:06:17 +01:00
|
|
|
$comments_form = '<br><div id="comments_form" style="width:98%;">'.html_print_textarea("comment", 3, 10, '', 'style="min-height: 15px; width: 100%;"', true);
|
|
|
|
$comments_form .= '<br><div style="text-align:right;">'.html_print_button(__('Add comment'),'comment_button',false,'event_comment();','class="sub next"',true).'</div><br></div>';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$comments_form = '';
|
|
|
|
}
|
2012-10-09 18:05:32 +02:00
|
|
|
|
|
|
|
$comments = '<div id="extended_event_comments_page" class="extended_event_pages">'.$comments_form.html_print_table($table_comments, true).'</div>';
|
|
|
|
|
|
|
|
return $comments;
|
2013-01-09 10:25:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function events_clean_tags ($tags) {
|
|
|
|
if(empty($tags)) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
$event_tags = tags_get_tags_formatted ($tags, false);
|
|
|
|
return explode(',',str_replace(' ','',$event_tags));
|
2012-10-09 18:05:32 +02:00
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the events happened in a group during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param mixed $id_group Group id to get events for.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
|
|
|
function events_get_count_events_by_agent ($id_group, $period, $date,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
2013-01-09 17:19:20 +01:00
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
$id_group = groups_safe_acl ($config["id_user"], $id_group, "AR");
|
|
|
|
|
|
|
|
if (empty ($id_group)) {
|
|
|
|
//An empty array means the user doesn't have access
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
|
|
|
|
$sql_where = ' AND 1 = 1 ';
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 4;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 3;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
2013-10-14 16:22:52 +02:00
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
|
|
|
}
|
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
2013-01-09 17:19:20 +01:00
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
$sql = sprintf ('SELECT id_agente,
|
|
|
|
(SELECT t2.nombre
|
|
|
|
FROM tagente AS t2
|
|
|
|
WHERE t2.id_agente = t3.id_agente) AS agent_name,
|
|
|
|
COUNT(*) AS count
|
|
|
|
FROM tevento AS t3
|
|
|
|
WHERE utimestamp > %d AND utimestamp <= %d
|
|
|
|
AND id_grupo IN (%s) ' . $sql_where . '
|
|
|
|
GROUP BY id_agente',
|
|
|
|
$datelimit, $date, implode (",", $id_group));
|
|
|
|
|
|
|
|
$rows = db_get_all_rows_sql ($sql);
|
|
|
|
|
|
|
|
if ($rows == false)
|
|
|
|
$rows = array();
|
|
|
|
|
|
|
|
$return = array();
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
$agent_name = $row['agent_name'];
|
|
|
|
if (empty($row['agent_name'])) {
|
|
|
|
$agent_name = __('Pandora System');
|
|
|
|
}
|
|
|
|
$return[$agent_name] = $row['count'];
|
|
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the events happened in a group during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param mixed $id_group Group id to get events for.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
|
|
|
function events_get_count_events_validated_by_user ($filter, $period, $date,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
2013-01-09 17:19:20 +01:00
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
$sql_filter = ' AND 1=1 ';
|
|
|
|
if (isset($filter['id_group'])) {
|
|
|
|
$id_group = groups_safe_acl ($config["id_user"], $filter['id_group'], "AR");
|
|
|
|
|
|
|
|
if (empty ($id_group)) {
|
|
|
|
//An empty array means the user doesn't have access
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql_filter .=
|
|
|
|
sprintf(' AND id_grupo IN (%s) ', implode (",", $id_group));
|
|
|
|
}
|
|
|
|
if (!empty($filter['id_agent'])) {
|
|
|
|
$sql_filter .=
|
|
|
|
sprintf(' AND id_agente = %d ', $filter['id_agent']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
|
|
|
|
$sql_where = ' AND 1 = 1 ';
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 4;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 3;
|
|
|
|
}
|
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
2013-10-14 16:22:52 +02:00
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
2013-01-09 17:19:20 +01:00
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
$sql = sprintf ('SELECT id_usuario,
|
|
|
|
(SELECT t2.fullname
|
|
|
|
FROM tusuario AS t2
|
|
|
|
WHERE t2.id_user = t3.id_usuario) AS user_name,
|
|
|
|
COUNT(*) AS count
|
|
|
|
FROM tevento AS t3
|
|
|
|
WHERE utimestamp > %d AND utimestamp <= %d
|
|
|
|
%s ' . $sql_where . '
|
|
|
|
GROUP BY id_usuario',
|
|
|
|
$datelimit, $date, $sql_filter);
|
|
|
|
|
|
|
|
$rows = db_get_all_rows_sql ($sql);
|
|
|
|
|
|
|
|
if ($rows == false)
|
|
|
|
$rows = array();
|
|
|
|
|
|
|
|
$return = array();
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
$user_name = $row['user_name'];
|
|
|
|
if (empty($row['user_name'])) {
|
|
|
|
$user_name = __('Unknown');
|
|
|
|
}
|
|
|
|
$return[$user_name] = $row['count'];
|
|
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the events happened in a group during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param mixed $id_group Group id to get events for.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
|
|
|
function events_get_count_events_by_criticity ($filter, $period, $date,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
2013-01-09 17:19:20 +01:00
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
$sql_filter = ' AND 1=1 ';
|
|
|
|
if (isset($filter['id_group'])) {
|
|
|
|
$id_group = groups_safe_acl ($config["id_user"], $filter['id_group'], "AR");
|
|
|
|
|
|
|
|
if (empty ($id_group)) {
|
|
|
|
//An empty array means the user doesn't have access
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql_filter .=
|
|
|
|
sprintf(' AND id_grupo IN (%s) ', implode (",", $id_group));
|
|
|
|
}
|
|
|
|
if (!empty($filter['id_agent'])) {
|
|
|
|
$sql_filter .=
|
|
|
|
sprintf(' AND id_agente = %d ', $filter['id_agent']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
|
|
|
|
$sql_where = ' AND 1 = 1 ';
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 4;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 3;
|
|
|
|
}
|
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
2013-10-14 16:22:52 +02:00
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
2013-01-09 17:19:20 +01:00
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
$sql = sprintf ('SELECT criticity,
|
|
|
|
COUNT(*) AS count
|
|
|
|
FROM tevento
|
|
|
|
WHERE utimestamp > %d AND utimestamp <= %d
|
|
|
|
%s ' . $sql_where . '
|
|
|
|
GROUP BY criticity',
|
|
|
|
$datelimit, $date, $sql_filter);
|
|
|
|
|
|
|
|
$rows = db_get_all_rows_sql ($sql);
|
|
|
|
|
|
|
|
if ($rows == false)
|
|
|
|
$rows = array();
|
|
|
|
|
|
|
|
$return = array();
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
$return[get_priority_name($row['criticity'])] = $row['count'];
|
|
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the events happened in a group during a period of time.
|
|
|
|
*
|
|
|
|
* The returned events will be in the time interval ($date - $period, $date]
|
|
|
|
*
|
|
|
|
* @param mixed $id_group Group id to get events for.
|
|
|
|
* @param int $period Period of time in seconds to get events.
|
|
|
|
* @param int $date Beginning date to get events.
|
|
|
|
*
|
|
|
|
* @return array An array with all the events happened.
|
|
|
|
*/
|
|
|
|
function events_get_count_events_validated ($filter, $period, $date,
|
|
|
|
$filter_event_validated = false, $filter_event_critical = false,
|
2013-01-09 17:19:20 +01:00
|
|
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
$sql_filter = ' AND 1=1 ';
|
|
|
|
if (isset($filter['id_group'])) {
|
|
|
|
$id_group = groups_safe_acl ($config["id_user"], $filter['id_group'], "AR");
|
|
|
|
|
|
|
|
if (empty ($id_group)) {
|
|
|
|
//An empty array means the user doesn't have access
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql_filter .=
|
|
|
|
sprintf(' AND id_grupo IN (%s) ', implode (",", $id_group));
|
|
|
|
}
|
|
|
|
if (!empty($filter['id_agent'])) {
|
|
|
|
$sql_filter .=
|
|
|
|
sprintf(' AND id_agente = %d ', $filter['id_agent']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
|
|
|
|
$sql_where = ' AND 1 = 1 ';
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities = array();
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_critical) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 4;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
|
|
|
if ($filter_event_warning) {
|
2013-10-14 16:22:52 +02:00
|
|
|
$criticities[] = 3;
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
}
|
2013-10-14 16:22:52 +02:00
|
|
|
if (!empty($criticities)) {
|
|
|
|
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
|
|
|
|
}
|
|
|
|
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
if ($filter_event_validated) {
|
|
|
|
$sql_where .= ' AND estado = 1 ';
|
|
|
|
}
|
2013-01-09 17:19:20 +01:00
|
|
|
if ($filter_event_no_validated) {
|
|
|
|
$sql_where .= ' AND estado = 0 ';
|
|
|
|
}
|
2013-01-03 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php,
extensions/resource_exportation.php,
operation/events/event_statistics.php,
operation/events/events_list.php,
operation/reporting/reporting_viewer.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_alerts.php, include/functions_reports.php,
include/functions_events.php, include/graphs/fgraph.php,
include/functions_graph.php, include/styles/pandora.css,
include/functions_reporting.php, include/functions_agents.php: a lot
of changes and fixes from the branch for the reports.
MERGED FROM PANDORA_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7351 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-03 19:52:21 +01:00
|
|
|
|
|
|
|
$sql = sprintf ('SELECT estado,
|
|
|
|
COUNT(*) AS count
|
|
|
|
FROM tevento
|
|
|
|
WHERE utimestamp > %d AND utimestamp <= %d
|
|
|
|
%s ' . $sql_where . '
|
|
|
|
GROUP BY estado',
|
|
|
|
$datelimit, $date, $sql_filter);
|
|
|
|
|
|
|
|
$rows = db_get_all_rows_sql ($sql);
|
|
|
|
|
|
|
|
if ($rows == false)
|
|
|
|
$rows = array();
|
|
|
|
|
|
|
|
$return = array();
|
|
|
|
$return[__('Validated')] = 0;
|
|
|
|
$return[__('Not validated')] = 0;
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
if ($row['estado'] == 1) {
|
|
|
|
$return[__('Validated')] += $row['count'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$return[__('Not validated')] += $row['count'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
}
|
2013-02-27 17:03:22 +01:00
|
|
|
?>
|