2006-07-19 20:29:12 +02:00
< ? php
2008-08-22 20:07:32 +02:00
2008-07-25 20:37:32 +02:00
// Pandora FMS - the Flexible Monitoring System
// ============================================
2009-02-16 18:09:41 +01:00
// Copyright (c) 2009 Artica Soluciones Tecnologicas, http://www.artica.es
2009-02-17 21:39:42 +01:00
// Please see http://pandorafms.org for full contribution list
2006-07-19 20:29:12 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
2008-04-01 15:53:11 +02:00
// as published by the Free Software Foundation for version 2.
2006-07-19 20:29:12 +02:00
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2006-03-27 05:37:27 +02:00
2006-07-19 20:29:12 +02:00
// Load global vars
2008-11-14 16:37:32 +01:00
require_once ( " include/config.php " );
require_once ( " include/functions_events.php " ); //Event processing functions
2006-07-19 20:29:12 +02:00
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
check_login ();
2008-11-14 16:37:32 +01:00
if ( ! give_acl ( $config [ " id_user " ], 0 , " IR " )) {
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
audit_db ( $config [ " id_user " ], $REMOTE_ADDR , " ACL Violation " ,
" Trying to access event viewer " );
require ( " general/noaccess.php " );
2009-02-26 16:34:14 +01:00
return ;
2007-02-05 18:45:14 +01:00
}
2009-03-02 Esteban Sanchez <estebans@artica.es>
* include/functions_menu.php: Added to repository. Functions for menu.
* operation/menu.php, godmode/menu.php: Added class to menu due to
changes in print_menu().
* general/main_menu.php: temp_print_menu() moved to functions_menu.php
* include/functions_themes.php: Added to repository. Implement
functions relative to themes (only CSS themes list at this moment).
* include/styles/pandora.css, include/styles/pandora_black.css,
include/styles/pandora_minimal.css, include/styles/pandora_red.css:
Added author, name and description comments to adopt to new
get_themes() interface.
* include/styles/pandora_width.css: Improved and make lighter by
simply rewrite some classes.
* include/functions.php: Added is_ajax().
* godmode/agentes/module_manager_editor.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php, godmode/groups/group_list.php,
godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php,
operation/agentes/estado_agente.php, operation/agentes/ver_agente.php,
operation/events/events.php, operation/messages/message.php: Use
is_ajax()
* godmode/setup/setup.php: Use enterprise_include() instead of manual
checking. Use get_css_themes() to show the theme list.
* include/styles/common.css: Added to repository. Minimal styles to
make pandora works and common with all the CSS themes.
* include/functions_ui.php: Added common.css file.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
if ( is_ajax ()) {
2009-02-27 13:48:05 +01:00
$get_event_tooltip = ( bool ) get_parameter ( 'get_event_tooltip' );
if ( $get_event_tooltip ) {
$id = ( int ) get_parameter ( 'id' );
$event = get_event ( $id );
if ( $event === false )
return ;
echo '<h3>' . __ ( 'Event' ) . '</h3>' ;
echo '<strong>' . __ ( 'Type' ) . ': </strong><br />' ;
print_event_type_img ( $event [ " event_type " ]);
echo ' ' ;
if ( $event [ " event_type " ] == " system " ) {
echo __ ( 'System' );
} elseif ( $event [ " id_agente " ] > 0 ) {
// Agent name
echo get_agent_name ( $event [ " id_agente " ]);
} else {
echo __ ( 'Alert' ) . __ ( 'SNMP' );
}
echo '<br />' ;
echo '<strong>' . __ ( 'Timestamp' ) . ': </strong><br />' ;
print_timestamp ( $event [ 'utimestamp' ]);
echo '<br />' ;
echo '<strong>' . __ ( 'Description' ) . ': </strong><br />' ;
echo $event [ 'evento' ];
return ;
}
return ;
}
2009-02-26 10:08:48 +01:00
$delete = ( bool ) get_parameter ( " delete " );
$validate = ( bool ) get_parameter ( " validate " );
2008-11-14 16:37:32 +01:00
//Process deletion (pass array or single value)
2009-02-26 10:08:48 +01:00
if ( $delete ) {
2008-11-14 16:37:32 +01:00
$eventid = ( array ) get_parameter ( " eventid " , - 1 );
$return = delete_event ( $eventid ); //This function handles both single values as well arrays and cleans up before deleting
print_error_message ( $return , __ ( 'Events successfully deleted' ), __ ( 'There was an error deleting events' ));
2007-02-05 18:45:14 +01:00
}
2008-11-14 16:37:32 +01:00
//Process validation (pass array or single value)
2009-02-26 10:08:48 +01:00
if ( $validate ) {
2008-11-14 16:37:32 +01:00
$eventid = ( array ) get_parameter ( " eventid " , - 1 );
$return = process_event_validate ( $eventid );
print_error_message ( $return , __ ( 'Events successfully validated' ), __ ( 'There was an error validating events' ));
2007-02-05 18:45:14 +01:00
}
2006-12-03 03:07:36 +01:00
2008-11-14 16:37:32 +01:00
2007-02-05 18:45:14 +01:00
// ***********************************************************************
// Main code form / page
// ***********************************************************************
2006-12-03 03:07:36 +01:00
2009-02-26 10:08:48 +01:00
$offset = ( int ) get_parameter ( " offset " , 0 );
2008-10-20 19:25:37 +02:00
$ev_group = ( int ) get_parameter ( " ev_group " , 1 ); //1 = all
2009-02-20 22:48:09 +01:00
$search = preg_replace ( " /&([A-Za-z] { 0,4} \ w { 2,3};|#[0-9] { 2,3};)/ " , " % " , rawurldecode ( get_parameter ( " search " ))); //Replace all types of &# HTML with % so that it doesn't fail on quotes
2008-06-19 02:24:05 +02:00
$event_type = get_parameter ( " event_type " , '' ); // 0 all
2008-09-03 17:47:09 +02:00
$severity = ( int ) get_parameter ( " severity " , - 1 ); // -1 all
$status = ( int ) get_parameter ( " status " , 0 ); // -1 all, 0 only red, 1 only green
2008-10-20 19:25:37 +02:00
$id_agent = ( int ) get_parameter ( " id_agent " , - 1 ); //-1 all, 0 system
2008-09-03 17:47:09 +02:00
$id_event = ( int ) get_parameter ( " id_event " , - 1 );
2008-09-25 15:15:15 +02:00
$pagination = ( int ) get_parameter ( " pagination " , $config [ " block_size " ]);
2008-11-14 16:37:32 +01:00
$groups = get_user_groups ( $config [ " id_user " ], " IR " );
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
$event_view_hr = ( int ) get_parameter ( " event_view_hr " , $config [ " event_view_hr " ]);
2009-02-20 22:48:09 +01:00
$id_user_ack = get_parameter ( " id_user_ack " , 0 );
2009-02-17 21:39:42 +01:00
$group_rep = ( int ) get_parameter ( " group_rep " , 1 );
2008-10-20 19:25:37 +02:00
2008-11-14 16:37:32 +01:00
//Group selection
2008-10-20 19:25:37 +02:00
if ( $ev_group > 1 && in_array ( $ev_group , array_keys ( $groups ))) {
//If a group is selected and it's in the groups allowed
$sql_post = " AND id_grupo = $ev_group " ;
2009-03-02 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php: Rewrote get_agentmodule_sla with
faster calculations (count in SQL).
* include/functions_ui.php: Added print_moduletype_icon that prints the
whole (correct) icon including rollover text
* include/functions_db.php: Updated some documenation and removed
deprecated functions that are now in the auth parts. Renamed
return_status_agent_module to get_agentmodule_status
* operation/agentes/sla_view.php: Made it use the 2.0 SQL and HTML
functions
* godmode/agentes/configurar_agente.php: Fixed tab links
* operation/events/events.php, include/functions_visual_map.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/ver_agente.php,
operation/reporting/custom_reporting.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php: Fixed renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1497 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 20:16:46 +01:00
} elseif ( is_user_admin ( $config [ " id_user " ])) {
2008-10-20 19:25:37 +02:00
//Do nothing if you're admin, you get full access
$sql_post = " " ;
$groups [ 0 ] = __ ( 'System Events' );
} else {
//Otherwise select all groups the user has rights to.
$sql_post = " AND id_grupo IN ( " . implode ( " , " , array_keys ( $groups )) . " ) " ;
}
2007-02-05 18:45:14 +01:00
2008-10-20 19:25:37 +02:00
if ( $status == 1 ) {
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
$sql_post .= " AND estado = 1 " ;
2008-10-20 19:25:37 +02:00
} elseif ( $status == 0 ) {
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
$sql_post .= " AND estado = 0 " ;
2008-10-20 19:25:37 +02:00
}
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
if ( $search != " " )
2009-02-20 22:48:09 +01:00
$sql_post .= " AND evento LIKE '% " . $search . " %' " ;
2008-06-19 02:24:05 +02:00
if ( $event_type != " " )
2009-02-20 22:48:09 +01:00
$sql_post .= " AND event_type = ' " . $event_type . " ' " ;
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
if ( $severity != - 1 )
2008-09-03 17:47:09 +02:00
$sql_post .= " AND criticity >= " . $severity ;
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
if ( $id_agent != - 1 )
2008-09-03 17:47:09 +02:00
$sql_post .= " AND id_agente = " . $id_agent ;
if ( $id_event != - 1 )
$sql_post .= " AND id_evento = " . $id_event ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
if ( $id_user_ack != 0 )
2009-02-20 22:48:09 +01:00
$sql_post .= " AND id_usuario == ' " . $id_user_ack . " ' " ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
2009-02-20 22:48:09 +01:00
if ( $event_view_hr > 0 ) {
$unixtime = get_system_time () - ( $event_view_hr * 3600 ); //Put hours in seconds
$sql_post .= " AND utimestamp > " . $unixtime ;
}
2008-09-03 17:47:09 +02:00
2009-02-20 22:48:09 +01:00
$url = " index.php?sec=eventos&sec2=operation/events/events&search= " . rawurlencode ( $search ) . " &event_type= " . $event_type . " &severity= " . $severity . " &status= " . $status . " &ev_group= " . $ev_group . " &refr= " . $config [ " refr " ] . " &id_agent= " . $id_agent . " &id_event= " . $id_event . " &pagination= " . $pagination . " &group_rep= " . $group_rep . " &event_view_hr= " . $event_view_hr . " &id_user_ack= " . $id_user_ack ;
2007-09-27 17:12:49 +02:00
2009-02-20 22:48:09 +01:00
echo " <h2> " . __ ( 'Events' ) . " > " . __ ( 'Main event view' ) . " " ;
2007-09-27 17:12:49 +02:00
2008-10-20 19:25:37 +02:00
if ( $config [ " pure " ] == 1 ) {
2009-02-20 22:48:09 +01:00
echo '<a target="_top" href="' . $url . '&pure=0">' ;
print_image ( " images/monitor.png " , false , array ( " title " => __ ( 'Normal screen' )));
echo '</a>' ;
2008-10-20 19:25:37 +02:00
} else {
2008-07-25 20:37:32 +02:00
// Fullscreen
2009-02-20 22:48:09 +01:00
echo '<a target="_top" href="' . $url . '&pure=1">' ;
print_image ( " images/monitor.png " , false , array ( " title " => __ ( 'Full screen' )));
echo '</a>' ;
2008-07-25 20:37:32 +02:00
}
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
echo " </h2> " ;
2007-02-05 18:45:14 +01:00
2009-02-20 22:48:09 +01:00
//Link to toggle filter
echo '<a href="#" id="tgl_event_control"><b>' . __ ( 'Event control filter' ) . '</b> ' . print_image ( " images/wand.png " , true , array ( " title " => __ ( 'Toggle filter' ))) . '</a>' ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
2009-02-20 22:48:09 +01:00
//Start div
echo '<div id="event_control" style="display:none">' ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Table for filter controls
2009-02-20 22:48:09 +01:00
echo '<form method="post" action="index.php?sec=eventos&sec2=operation/events/events&refr=' . $config [ " refr " ] . '&pure=' . $config [ " pure " ] . '">' ;
echo '<table style="float:left;" width="550" cellpadding="4" cellspacing="4" class="databox"><tr>' ;
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Group combo
2008-11-14 16:37:32 +01:00
echo " <td> " . __ ( 'Group' ) . " </td><td> " ;
2008-10-20 19:25:37 +02:00
print_select ( $groups , 'ev_group' , $ev_group , 'javascript:this.form.submit();' , '' , 0 , false , false , false , 'w130' );
echo " </td> " ;
2007-06-07 16:45:33 +02:00
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Event type
2008-11-14 16:37:32 +01:00
echo " <td> " . __ ( 'Event type' ) . " </td><td> " ;
2008-10-20 19:25:37 +02:00
print_select ( get_event_types (), 'event_type' , $event_type , '' , __ ( 'All' ), '' );
2008-08-29 18:05:08 +02:00
echo " </td></tr><tr> " ;
2007-02-05 18:45:14 +01:00
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Severity
2008-11-14 16:37:32 +01:00
echo " <td> " . __ ( 'Severity' ) . " </td><td> " ;
2008-10-20 19:25:37 +02:00
print_select ( get_priorities (), " severity " , $severity , '' , __ ( 'All' ), '-1' );
2008-11-14 16:37:32 +01:00
echo '</td>' ;
2007-06-21 20:58:35 +02:00
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Status
2008-11-14 16:37:32 +01:00
echo " <td> " . __ ( 'Event status' ) . " </td><td> " ;
2008-10-20 19:25:37 +02:00
$fields = array ();
$fields [ - 1 ] = __ ( 'All event' );
$fields [ 1 ] = __ ( 'Only validated' );
$fields [ 0 ] = __ ( 'Only pending' );
2008-08-29 18:05:08 +02:00
print_select ( $fields , 'status' , $status , 'javascript:this.form.submit();' , '' , '' );
2008-11-14 16:37:32 +01:00
//NEW LINE
2008-08-29 18:05:08 +02:00
echo " </td></tr><tr> " ;
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Free search
2008-08-29 18:05:08 +02:00
echo " <td> " . __ ( 'Free search' ) . " </td><td> " ;
print_input_text ( 'search' , $search , '' , 15 );
2008-11-14 16:37:32 +01:00
echo '</td>' ;
2008-09-03 17:47:09 +02:00
//Agent search
2008-11-14 16:37:32 +01:00
echo " <td> " . __ ( 'Agent search' ) . " </td><td> " ;
2009-02-20 22:48:09 +01:00
$sql = " SELECT DISTINCT(id_agente) AS id_agent FROM tevento WHERE 1=1 " . $sql_post ;
2008-09-03 17:47:09 +02:00
$result = get_db_all_rows_sql ( $sql );
2009-02-20 22:48:09 +01:00
2008-09-03 17:47:09 +02:00
if ( $result === false )
$result = array ();
2009-02-20 22:48:09 +01:00
2008-10-20 19:25:37 +02:00
$agents = array ();
$agents [ - 1 ] = __ ( 'All' );
2009-03-02 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php: Rewrote get_agentmodule_sla with
faster calculations (count in SQL).
* include/functions_ui.php: Added print_moduletype_icon that prints the
whole (correct) icon including rollover text
* include/functions_db.php: Updated some documenation and removed
deprecated functions that are now in the auth parts. Renamed
return_status_agent_module to get_agentmodule_status
* operation/agentes/sla_view.php: Made it use the 2.0 SQL and HTML
functions
* godmode/agentes/configurar_agente.php: Fixed tab links
* operation/events/events.php, include/functions_visual_map.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/ver_agente.php,
operation/reporting/custom_reporting.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php: Fixed renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1497 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 20:16:46 +01:00
if ( is_user_admin ( $config [ " id_user " ])) {
2008-10-20 19:25:37 +02:00
$agents [ 0 ] = __ ( 'System' );
}
2008-09-03 17:47:09 +02:00
foreach ( $result as $id_row ) {
2008-10-20 19:25:37 +02:00
$name_for_combo = " " ;
2009-02-20 22:48:09 +01:00
if ( $id_row [ " id_agent " ] > 0 )
$name_for_combo = mb_substr ( get_agent_name ( $id_row [ " id_agent " ], " lower " ), 0 , 20 );
2008-09-25 15:15:15 +02:00
if ( $name_for_combo != " " )
2009-02-20 22:48:09 +01:00
$agents [ $id_row [ " id_agent " ]] = $name_for_combo ;
2008-09-03 17:47:09 +02:00
}
print_select ( $agents , 'id_agent' , $id_agent , 'javascript:this.form.submit();' , '' , '' );
echo " </td></tr> " ;
2008-09-25 15:15:15 +02:00
// User selectable block size
echo '<tr><td>' ;
echo __ ( 'Block size for pagination' );
echo '</td>' ;
2008-11-14 16:37:32 +01:00
$lpagination [ 25 ] = 25 ;
$lpagination [ 50 ] = 50 ;
$lpagination [ 100 ] = 100 ;
$lpagination [ 200 ] = 200 ;
$lpagination [ 500 ] = 500 ;
2008-09-25 15:15:15 +02:00
echo " <td> " ;
2008-11-14 16:37:32 +01:00
print_select ( $lpagination , " pagination " , $pagination , 'javascript:this.form.submit();' , __ ( 'Default' ), $config [ " block_size " ]);
2008-09-25 15:15:15 +02:00
echo " </td> " ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
echo " <td> " . __ ( 'Max. hours old' ) . " </td> " ;
echo " <td> " ;
print_input_text ( 'event_view_hr' , $event_view_hr , '' , 5 );
echo " </td> " ;
2009-02-20 22:48:09 +01:00
echo " </tr><tr> " ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
echo " <td> " . __ ( 'User ack.' ) . " </td> " ;
echo " <td> " ;
2009-02-20 22:48:09 +01:00
$users = get_users_info ();
print_select ( $users , " id_user_ack " , $id_user_ack , 'javascript:this.form.submit();' , __ ( 'Any' ), 0 );
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
echo " </td> " ;
2009-02-13 16:05:23 +01:00
echo " <td> " ;
echo __ ( " Repeated " );
echo " </td><td> " ;
2009-02-17 21:39:42 +01:00
$repeated_sel [ 0 ] = __ ( " All events " );
$repeated_sel [ 1 ] = __ ( " Group events " );
2009-02-20 22:48:09 +01:00
print_select ( $repeated_sel , " group_rep " , $group_rep , 'javascript:this.form.submit();' );
2009-02-13 16:05:23 +01:00
echo " </td></tr> " ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
2009-02-20 22:48:09 +01:00
echo '<tr><td colspan="4" style="text-align:right">' ;
2008-09-03 17:47:09 +02:00
//The buttons
2008-10-20 19:25:37 +02:00
print_submit_button ( __ ( 'Update' ), '' , false , 'class="sub upd"' );
2008-07-25 20:37:32 +02:00
// CSV
2009-02-20 22:48:09 +01:00
echo ' <a href="operation/events/export_csv.php?ev_group=' . $ev_group . '&event_type=' . $event_type . '&search=' . rawurlencode ( $search ) . '&severity=' . $severity . '&status=' . $status . '&id_agent=' . $id_agent . '">' ;
print_image ( " images/disk.png " , false , array ( " title " => __ ( 'Export to CSV file' )));
echo '</a>' ;
2008-07-25 20:37:32 +02:00
// Marquee
2009-02-20 22:48:09 +01:00
echo ' <a target="_top" href="operation/events/events_marquee.php">' ;
print_image ( " images/heart.png " , false , array ( " title " => __ ( 'Marquee display' )));
echo '</a>' ;
2008-07-25 20:37:32 +02:00
// RSS
2009-02-20 22:48:09 +01:00
echo ' <a target="_top" href="operation/events/events_rss.php?ev_group=' . $ev_group . '&event_type=' . $event_type . '&search=' . rawurlencode ( $search ) . '&severity=' . $severity . '&status=' . $status . '&id_agent=' . $id_agent . '">' ;
print_image ( " images/transmit.png " , false , array ( " title " => __ ( 'RSS Events' )));
echo '</a>' ;
2008-06-19 02:24:05 +02:00
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
echo " </td></tr></table></form> " ; //This is the filter div
2009-02-20 22:48:09 +01:00
echo '<div style="width:220px; float:left;">' ;
print_image ( " reporting/fgraph.php?tipo=group_events&width=220&height=180&url= " . rawurlencode ( $sql_post ), false , array ( " border " => 0 ));
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
echo '</div><div style="clear:both"> </div></div>' ;
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
2009-02-20 22:48:09 +01:00
if ( $group_rep == 0 ) {
2009-02-13 16:05:23 +01:00
$sql = " SELECT * FROM tevento WHERE 1=1 " . $sql_post . " ORDER BY utimestamp DESC LIMIT " . $offset . " , " . $pagination ;
2009-02-20 22:48:09 +01:00
} else {
$sql = " SELECT *, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep FROM tevento WHERE 1=1 " . $sql_post . " GROUP BY evento, id_agentmodule ORDER BY timestamp_rep DESC LIMIT " . $offset . " , " . $pagination ;
}
2008-08-29 18:05:08 +02:00
$result = get_db_all_rows_sql ( $sql );
2009-02-20 22:48:09 +01:00
if ( $group_rep == 0 ) {
$sql = " SELECT COUNT(id_evento) FROM tevento WHERE 1=1 " . $sql_post ;
} else {
$sql = " SELECT COUNT(DISTINCT(evento)) FROM tevento WHERE 1=1 " . $sql_post ;
}
$total_events = ( int ) get_db_sql ( $sql );
2007-02-05 18:45:14 +01:00
2008-11-14 16:37:32 +01:00
if ( empty ( $result )) {
$result = array ();
}
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
// Show pagination header
2008-11-14 16:37:32 +01:00
$offset = get_parameter ( " offset " , 0 );
pagination ( $total_events , $url . " &pure= " . $config [ " pure " ], $offset , $pagination );
// If pure, table width takes more space
if ( $config [ " pure " ] != 0 ) {
$table -> width = 765 ;
} else {
$table -> width = 750 ;
}
$table -> id = " eventtable " ;
$table -> cellpadding = 4 ;
$table -> cellspacing = 4 ;
$table -> class = " databox " ;
$table -> head = array ();
$table -> data = array ();
$table -> head [ 0 ] = '' ;
2008-11-14 17:15:58 +01:00
$table -> align [ 0 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 1 ] = __ ( 'Type' );
$table -> headclass [ 1 ] = 'f9' ;
2008-11-14 17:15:58 +01:00
$table -> align [ 1 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 2 ] = __ ( 'Event name' );
$table -> head [ 3 ] = __ ( 'Agent name' );
2008-11-14 17:15:58 +01:00
$table -> align [ 3 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 4 ] = __ ( 'Source' );
2008-11-14 17:15:58 +01:00
$table -> align [ 4 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 5 ] = __ ( 'Group' );
2008-11-14 17:15:58 +01:00
$table -> align [ 5 ] = 'center' ;
2008-11-14 16:37:32 +01:00
2009-02-20 22:48:09 +01:00
if ( $group_rep == 0 ) {
2009-02-17 21:39:42 +01:00
$table -> head [ 6 ] = __ ( 'User ID' );
2009-02-20 22:48:09 +01:00
} else {
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
$table -> head [ 6 ] = __ ( 'Count' );
2009-02-20 22:48:09 +01:00
}
2008-11-14 17:15:58 +01:00
$table -> align [ 6 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 7 ] = __ ( 'Timestamp' );
2008-11-14 17:15:58 +01:00
$table -> align [ 7 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 8 ] = __ ( 'Action' );
2008-11-14 17:15:58 +01:00
$table -> align [ 8 ] = 'center' ;
2008-11-14 16:37:32 +01:00
$table -> head [ 9 ] = print_checkbox ( " allbox " , " 1 " , false , true );
2008-11-14 17:15:58 +01:00
$table -> align [ 9 ] = 'center' ;
2008-11-14 16:37:32 +01:00
//Arrange data. We already did ACL's in the query
2009-02-27 13:48:05 +01:00
foreach ( $result as $event ) {
2008-11-14 16:37:32 +01:00
$data = array ();
//First pass along the class of this row
2009-02-27 13:48:05 +01:00
$table -> rowclass [] = get_priority_class ( $event [ " criticity " ]);
2007-02-19 08:44:07 +01:00
2008-11-14 16:37:32 +01:00
// Colored box
2009-02-27 13:48:05 +01:00
if ( $event [ " estado " ] == 0 ) {
$data [ 0 ] = print_image ( " images/pixel_red.png " , true , array ( " width " => 20 , " height " => 20 , " title " => get_priority_name ( $event [ " criticity " ])));
2008-11-14 16:37:32 +01:00
} else {
2009-02-27 13:48:05 +01:00
$data [ 0 ] = print_image ( " images/pixel_green.png " , true , array ( " width " => 20 , " height " => 20 , " title " => get_priority_name ( $event [ " criticity " ])));
2008-11-14 16:37:32 +01:00
}
2009-02-27 13:48:05 +01:00
$data [ 1 ] = print_event_type_img ( $event [ " event_type " ], true );
2008-11-14 16:37:32 +01:00
// Event description
2009-02-27 13:48:05 +01:00
$data [ 2 ] = '<span title="' . $event [ " evento " ] . '" class="f9">' ;
$data [ 2 ] .= '<a href="' . $url . '&group_rep=0&id_agent=' . $event [ " id_agente " ] . '&pure=' . $config [ " pure " ] . '&search=' . rawurlencode ( $event [ " evento " ]) . '">' ;
if ( strlen ( $event [ " evento " ]) > 50 ) {
$data [ 2 ] .= mb_substr ( $event [ " evento " ], 0 , 50 ) . " ... " ;
2008-11-14 16:37:32 +01:00
} else {
2009-02-27 13:48:05 +01:00
$data [ 2 ] .= $event [ " evento " ];
2008-11-14 16:37:32 +01:00
}
2009-02-17 21:39:42 +01:00
$data [ 2 ] .= '</a></span>' ;
2009-02-13 16:05:23 +01:00
2009-02-27 13:48:05 +01:00
if ( $event [ " event_type " ] == " system " ) {
2008-11-14 16:37:32 +01:00
$data [ 3 ] = __ ( 'System' );
2009-02-27 13:48:05 +01:00
} elseif ( $event [ " id_agente " ] > 0 ) {
2008-11-14 16:37:32 +01:00
// Agent name
2009-02-27 13:48:05 +01:00
$data [ 3 ] = print_agent_name ( $event [ " id_agente " ], true );
2008-11-14 16:37:32 +01:00
} else {
$data [ 3 ] = __ ( 'Alert' ) . __ ( 'SNMP' );
}
$data [ 4 ] = '' ;
2009-02-27 13:48:05 +01:00
if ( $event [ " id_agentmodule " ] != 0 ) {
$data [ 4 ] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $event [ " id_agente " ] . '&tab=data">' ;
2009-02-20 22:48:09 +01:00
$data [ 4 ] .= print_image ( " images/bricks.png " , true , array ( " border " => 0 , " title " => __ ( 'Go to data overview' )));
$data [ 4 ] .= '</a> ' ;
2008-11-14 16:37:32 +01:00
}
2009-02-27 13:48:05 +01:00
if ( $event [ " id_alert_am " ] != 0 ) {
$data [ 4 ] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $event [ " id_agente " ] . '&tab=alert">' ;
2009-02-20 22:48:09 +01:00
$data [ 4 ] .= print_image ( " images/bell.png " , true , array ( " border " => 0 , " title " => __ ( 'Go to alert overview' )));
$data [ 4 ] .= '</a>' ;
2008-11-14 16:37:32 +01:00
}
2009-02-27 13:48:05 +01:00
$data [ 5 ] = print_group_icon ( $event [ " id_grupo " ], true );
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
2009-02-20 22:48:09 +01:00
if ( $group_rep == 1 ) {
2009-02-27 13:48:05 +01:00
$data [ 6 ] = $event [ " event_rep " ];
2009-02-20 22:48:09 +01:00
} else {
2009-02-27 13:48:05 +01:00
if ( ! empty ( $event [ " estado " ])) {
if ( $event [ " id_usuario " ] != '0' && $event [ " id_usuario " ] != '' ){
$data [ 6 ] = '<a href="index.php?sec=usuario&sec2=operation/user/user_edit&ver=' . $event [ " id_usuario " ] . '" title="' . dame_nombre_real ( $event [ " id_usuario " ]) . '">' . mb_substr ( $event [ " id_usuario " ], 0 , 8 ) . '</a>' ;
2009-02-17 21:39:42 +01:00
} else {
2009-02-20 22:48:09 +01:00
$data [ 6 ] = __ ( 'System' );
2009-02-17 21:39:42 +01:00
}
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
} else {
2009-02-17 21:39:42 +01:00
$data [ 6 ] = '' ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
}
2006-03-27 05:37:27 +02:00
}
2009-02-17 21:39:42 +01:00
2009-02-13 16:05:23 +01:00
//Time
2007-02-05 18:45:14 +01:00
2009-02-20 22:48:09 +01:00
if ( $group_rep == 1 ) {
2009-02-27 13:48:05 +01:00
$data [ 7 ] = print_timestamp ( $event [ 'timestamp_rep' ], true );
2009-02-13 16:05:23 +01:00
} else {
2009-02-27 13:48:05 +01:00
$data [ 7 ] = print_timestamp ( $event [ " timestamp " ], true );
2009-02-13 16:05:23 +01:00
}
2008-11-14 16:37:32 +01:00
//Actions
$data [ 8 ] = '' ;
// Validate event
2009-02-27 13:48:05 +01:00
if (( $event [ " estado " ] == 0 ) and ( give_acl ( $config [ " id_user " ], $event [ " id_grupo " ], " IW " ) == 1 )) {
$data [ 8 ] .= '<a href="' . $url . '&validate=1&eventid=' . $event [ " id_evento " ] . '&pure=' . $config [ " pure " ] . '">' ;
2009-02-20 22:48:09 +01:00
$data [ 8 ] .= print_image ( " images/ok.png " , true , array ( " border " => 0 , " title " => __ ( 'Validate event' )));
$data [ 8 ] .= '</a>' ;
2008-11-14 16:37:32 +01:00
}
// Delete event
2009-02-27 13:48:05 +01:00
if ( give_acl ( $config [ " id_user " ], $event [ " id_grupo " ], " IM " ) == 1 ) {
$data [ 8 ] .= '<a href="' . $url . '&delete=1&eventid=' . $event [ " id_evento " ] . '&pure=' . $config [ " pure " ] . '">' ;
2009-02-20 22:48:09 +01:00
$data [ 8 ] .= print_image ( " images/cross.png " , true , array ( " border " => 0 , " title " => __ ( 'Delete event' )));
$data [ 8 ] .= '</a>' ;
2008-11-14 16:37:32 +01:00
}
// Create incident from this event
2009-02-27 13:48:05 +01:00
if ( give_acl ( $config [ " id_user " ], $event [ " id_grupo " ], " IW " ) == 1 ) {
$data [ 8 ] .= '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&insert_form&from_event=' . $event [ " id_evento " ] . '">' ;
2009-02-20 22:48:09 +01:00
$data [ 8 ] .= print_image ( " images/page_lightning.png " , true , array ( " border " => 0 , " title " => __ ( 'Create incident from event' )));
$data [ 8 ] .= '</a>' ;
2008-11-14 16:37:32 +01:00
}
//Checkbox
2009-02-27 13:48:05 +01:00
$data [ 9 ] = print_checkbox_extended ( " eventid[] " , $event [ " id_evento " ], false , false , false , 'class="chk"' , true );
2008-11-14 16:37:32 +01:00
array_push ( $table -> data , $data );
}
2009-02-20 22:48:09 +01:00
if ( ! empty ( $table -> data )) {
echo '<form method="post" action="' . $url . '&pure=' . $config [ " pure " ] . '">' ;
2009-02-17 21:39:42 +01:00
2009-02-20 22:48:09 +01:00
print_table ( $table );
echo '<div style="width:750px; text-align:right">' ;
2008-11-14 16:37:32 +01:00
if ( give_acl ( $config [ " id_user " ], 0 , " IW " ) == 1 ) {
print_submit_button ( __ ( 'Validate' ), 'validate' , false , 'class="sub ok"' );
}
2008-10-20 19:25:37 +02:00
if ( give_acl ( $config [ " id_user " ], 0 , " IM " ) == 1 ) {
2008-11-14 16:37:32 +01:00
print_submit_button ( __ ( 'Delete' ), 'delete' , false , 'class="sub delete"' );
2007-02-19 08:44:07 +01:00
}
2009-02-17 21:39:42 +01:00
echo '</div></form>' ;
2009-02-20 22:48:09 +01:00
if ( $config [ " pure " ] == 0 ) {
//Print legend
echo '<div style="padding-left:30px; width:150px; float:left; line-height:17px;">' ;
echo '<h3>' . __ ( 'Status' ) . '</h3>' ;
print_image ( " images/pixel_green.png " , false , array ( " width " => 10 , " height " => 10 , " title " => __ ( 'Validated event' )));
echo ' - ' . __ ( 'Validated event' );
echo '<br />' ;
print_image ( " images/pixel_red.png " , false , array ( " width " => 10 , " height " => 10 , " title " => __ ( 'Event not validated' )));
echo ' - ' . __ ( 'Event not validated' );
echo '</div><div style="padding-left:30px; width:150px; float:left; line-height:17px;">' ;
echo '<h3>' . __ ( 'Actions' ) . '</h3>' ;
print_image ( " images/ok.png " , false , array ( " title " => __ ( 'Validate event' )));
echo ' - ' . __ ( 'Validate event' );
echo '<br />' ;
print_image ( " images/cross.png " , false , array ( " title " => __ ( 'Delete event' )));
echo ' - ' . __ ( 'Delete event' );
echo '<br />' ;
print_image ( " images/page_lightning.png " , false , array ( " title " => __ ( 'Create incident from event' )));
echo ' - ' . __ ( 'Create incident from event' );
echo '</div><div style="clear:both;"> </div>' ;
}
} else {
echo '<div class="nf">' . __ ( 'No events' ) . '</div>' ;
}
2009-02-17 21:39:42 +01:00
2008-11-14 16:37:32 +01:00
unset ( $table );
2007-09-27 17:12:49 +02:00
?>
2009-02-20 22:48:09 +01:00
< script language = " javascript " type = " text/javascript " >
/* <![CDATA[ */
$ ( document ) . ready ( function () {
$ ( " INPUT[name='allbox'] " ) . click ( function () {
$ ( " INPUT[name='eventid[]'] " ) . each ( function () {
$ ( this ) . attr ( 'checked' , ! $ ( this ) . attr ( 'checked' ));
});
return ! ( this ) . attr ( 'checked' );
});
$ ( " #tgl_event_control " ) . click ( function () {
$ ( " #event_control " ) . toggle ();
return false ;
});
});
/* ]]> */
2009-02-26 10:08:48 +01:00
</ script >