2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
|
|
|
// Pandora FMS - the Flexible Monitoring System
|
|
|
|
// ============================================
|
|
|
|
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
2008-04-03 17:43:34 +02:00
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
|
|
|
|
2006-07-09 16:20:10 +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-03 17:43:34 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-09 16:20:10 +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
|
|
|
|
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 ();
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
require_once ("include/functions_agents.php");
|
|
|
|
|
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
|
|
|
$filter = get_parameter ("filter", "all");
|
2009-01-05 19:41:14 +01:00
|
|
|
$offset = (int) get_parameter_get ("offset", 0);
|
|
|
|
$id_group = (int) get_parameter ("ag_group", 1); //1 is the All group (selects all groups)
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$sec2 = get_parameter_get ('sec2');
|
|
|
|
$sec2 = safe_url_extraclean ($sec2);
|
|
|
|
|
|
|
|
$sec = get_parameter_get ('sec');
|
|
|
|
$sec = safe_url_extraclean ($sec);
|
|
|
|
|
|
|
|
$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&refr='.$config["refr"].'&filter='.$filter.'&ag_group='.$id_group;
|
2007-10-03 14:41:29 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
// Force alert execution
|
|
|
|
$flag_alert = (bool) get_parameter ('force_execution');
|
2009-03-27 13:03:41 +01:00
|
|
|
$alert_validate = (bool) get_parameter ('alert_validate');
|
|
|
|
|
|
|
|
if ($flag_alert == 1 && give_acl ($config['id_user'], $id_group, "AW")) {
|
2009-01-15 11:21:38 +01:00
|
|
|
require_once ("include/functions_alerts.php");
|
|
|
|
$id_alert = (int) get_parameter ('id_alert');
|
|
|
|
set_alerts_agent_module_force_execution ($id_alert);
|
|
|
|
}
|
2007-05-28 21:15:44 +02:00
|
|
|
|
2009-03-27 13:03:41 +01:00
|
|
|
if ($alert_validate) {
|
|
|
|
$ids = (array) get_parameter_post ("validate", array ());
|
|
|
|
$compound_ids = (array) get_parameter_post ("validate_compound", array ());
|
|
|
|
|
|
|
|
if (! empty ($ids) || ! empty ($compound_ids)) {
|
|
|
|
require_once ("include/functions_alerts.php");
|
|
|
|
$result1 = validate_alert_agent_module ($ids);
|
|
|
|
$result2 = validate_alert_compound ($compound_ids);
|
|
|
|
$result == $result1 || $result2;
|
|
|
|
|
|
|
|
print_result_message ($result,
|
|
|
|
__('Alert(s) validated'),
|
|
|
|
__('Error processing alert(s)'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
// Show alerts for specific agent
|
|
|
|
if (isset ($_GET["id_agente"])) {
|
|
|
|
$id_agent = (int) get_parameter_get ("id_agente", 0);
|
|
|
|
$url = $url.'&id_agente='.$id_agent;
|
|
|
|
|
|
|
|
$id_group = get_group_agents ($id_agent);
|
|
|
|
|
|
|
|
if (give_acl ($config["id_user"], $id_group, "AR") == 0) {
|
|
|
|
audit_db ($config["id_user"], $config["remote_addr"], "ACL Violation","Trying to access alert view");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
exit;
|
2007-05-28 21:15:44 +02:00
|
|
|
}
|
2007-10-03 14:41:29 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$alerts_simple = get_agent_alerts_simple ($id_agent, $filter);
|
2009-02-11 17:55:04 +01:00
|
|
|
$alerts_combined = get_agent_alerts_compound ($id_agent, $filter);
|
2009-01-15 11:21:38 +01:00
|
|
|
$print_agent = false;
|
2009-01-05 19:41:14 +01:00
|
|
|
} else {
|
2009-02-11 17:55:04 +01:00
|
|
|
if (! give_acl ($config["id_user"], $id_group, "AR")) {
|
2009-01-05 19:41:14 +01:00
|
|
|
audit_db ($config["id_user"], $config["remote_addr"], "ACL Violation","Trying to access alert view");
|
|
|
|
require ("general/noaccess.php");
|
2009-02-11 17:55:04 +01:00
|
|
|
return;
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2007-05-28 21:15:44 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$alerts_simple = array ();
|
|
|
|
$alerts_combined = array ();
|
2007-05-28 21:15:44 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$agents = array_keys (get_group_agents ($id_group));
|
2008-09-16 20:16:09 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
foreach ($agents as $id_agent) {
|
|
|
|
$simple = get_agent_alerts_simple ($id_agent, $filter);
|
2009-02-11 17:55:04 +01:00
|
|
|
$combined = get_agent_alerts_compound ($id_agent, $filter);
|
2009-01-05 19:41:14 +01:00
|
|
|
|
|
|
|
$alerts_simple = array_merge ($alerts_simple, $simple);
|
|
|
|
$alerts_combined = array_merge ($alerts_combined, $combined);
|
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
|
|
|
}
|
2008-09-16 20:16:09 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$print_agent = true;
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$tab = get_parameter_get ("tab");
|
|
|
|
if ($tab != '') {
|
|
|
|
$url = $url.'&tab='.$tab;
|
|
|
|
}
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-16 13:37:47 +01:00
|
|
|
echo "<h2>".__('Pandora Agents')." > ".__('Alerts').'</h2>';
|
2009-01-15 11:21:38 +01:00
|
|
|
|
|
|
|
echo '<form method="post" action="'.$url.'">';
|
2007-06-12 13:57:03 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
if ($print_agent) {
|
|
|
|
$table->width = '90%';
|
|
|
|
$table->data = array ();
|
|
|
|
$table->style = array ();
|
2009-01-05 19:41:14 +01:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->data[0][0] = __('Group');
|
|
|
|
$table->data[0][1] = print_select (get_user_groups (), "ag_group", $id_group,
|
|
|
|
'javascript:this.form.submit();', '', '', true);
|
|
|
|
|
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
|
|
|
$alert_status_filter = array();
|
|
|
|
$alert_status_filter['all'] = __('All');
|
|
|
|
$alert_status_filter['fired'] = __('Fired');
|
|
|
|
$alert_status_filter['notfired'] = __('Not fired');
|
|
|
|
$alert_status_filter['disabled'] = __('Disabled');
|
2009-01-15 11:21:38 +01: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
|
|
|
$table->data[0][2] = __('Status');
|
|
|
|
$table->data[0][3] = print_select ($alert_status_filter, "filter", $filter, 'javascript:this.form.submit();', '', '', true);
|
2009-01-15 11:21:38 +01:00
|
|
|
print_table ($table);
|
2009-01-05 19:41:14 +01: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 '</form>';
|
2009-01-05 19:41:14 +01:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->width = '90%';
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->class = "databox";
|
2009-03-27 13:03:41 +01:00
|
|
|
$table->size = array ();
|
|
|
|
$table->size[0] = '20px';
|
|
|
|
$table->size[1] = '25%';
|
|
|
|
$table->size[2] = '50%';
|
|
|
|
$table->size[3] = '25%';
|
|
|
|
$table->size[4] = '20px';
|
|
|
|
$table->size[5] = '20px';
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->head = array ();
|
2009-01-08 12:53:14 +01:00
|
|
|
$table->head[0] = '';
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = ''; //Placeholder for name
|
|
|
|
$table->head[2] = __('Template');
|
|
|
|
$table->head[3] = __('Last fired');
|
|
|
|
$table->head[4] = __('Status');
|
2009-03-24 Esteban Sanchez <estebans@artica.es>
* general/pandora_help.php: Added support for enterprise help files.
* include/javascript/pandora.js: Renamed pandora_help() to
open_help().
* include/functions_ui.php: Renamed event function on
print_help_icon(). Removed deprecated pandora_help().
* godmode/agentes/module_manager.php: Added enterprise hooks.
* godmode/agentes/module_manager_editor.php: Added categories
construction here. Added enterprise hooks.
* godmode/agentes/module_manager_editor_common.php: Replaced
deprecated pandora_help() with print_help_icon(). Moved categories
construction to module_manager_editor.
* include/config_process.php: Updated build version.
* include/styles/pandora.css: Fixed textarea height.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/massive_config.php,
godmode/agentes/massive_edit_modules.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/map_builder.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php,
godmode/setup/setup.php, operation/agentes/alerts_status.php,
operation/agentes/tactical.php,
godmode/agentes/agent_manager.php: Replaced deprecated pandora_help()
with print_help_icon().
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-24 16:38:54 +01:00
|
|
|
$table->head[5] = __('Validate').print_help_icon ('alert_validation', true);
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->title = __('Single alerts');
|
2009-01-15 11:21:38 +01:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
if ($print_agent == 0) {
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = __('Module');
|
2009-01-05 19:41:14 +01:00
|
|
|
} else {
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = __('Agent');
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->align = array ();
|
|
|
|
$table->align[4] = 'center';
|
|
|
|
$table->align[5] = 'center';
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->data = array ();
|
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$total = 0;
|
|
|
|
$printed = 0;
|
2009-01-05 19:41:14 +01:00
|
|
|
foreach ($alerts_simple as $alert) {
|
2009-01-15 11:21:38 +01:00
|
|
|
$total++;
|
|
|
|
if (empty ($alert) || $printed >= $config["block_size"] || $total <= $offset) {
|
2009-01-05 19:41:14 +01:00
|
|
|
continue;
|
2008-09-16 20:16:09 +02:00
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
$printed++;
|
2009-02-11 17:55:04 +01:00
|
|
|
array_push ($table->data, format_alert_row ($alert, false, $print_agent, $url));
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
|
|
|
|
2009-03-27 13:03:41 +01:00
|
|
|
echo '<form method="post" action="'.$url.'">';
|
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
if (!empty ($table->data)) {
|
2009-01-15 11:21:38 +01:00
|
|
|
pagination ($total, $url, $offset);
|
2009-01-05 19:41:14 +01:00
|
|
|
print_table ($table);
|
|
|
|
} else {
|
|
|
|
echo '<div class="nf">'.__('No simple alerts found').'</div>';
|
|
|
|
}
|
|
|
|
|
2009-02-11 17:55:04 +01:00
|
|
|
$table->title = __('Compound alerts');
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = __('Agent');
|
2009-02-11 17:55:04 +01:00
|
|
|
$table->head[2] = __('Name');
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->data = array ();
|
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$combined_total = 0;
|
|
|
|
$combined_printed = 0;
|
2009-01-05 19:41:14 +01:00
|
|
|
foreach ($alerts_combined as $alert) {
|
2009-01-15 11:21:38 +01:00
|
|
|
$combined_total++;
|
|
|
|
if (empty ($alert) || $combined_printed >= $config["block_size"] || $combined_total <= $offset) {
|
2009-01-05 19:41:14 +01:00
|
|
|
continue;
|
2008-02-21 16:16:54 +01:00
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
$combined_printed++;
|
2009-02-11 17:55:04 +01:00
|
|
|
array_push ($table->data, format_alert_row ($alert, true, $print_agent));
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty ($table->data)) {
|
2009-01-15 11:21:38 +01:00
|
|
|
pagination ($total, $url, $offset);
|
2009-01-05 19:41:14 +01:00
|
|
|
print_table ($table);
|
|
|
|
}
|
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
if ($printed > 0 || $combined_total > 0) {
|
|
|
|
echo '<div class="action-buttons" style="width: '.$table->width.';">';
|
2009-01-05 19:41:14 +01:00
|
|
|
print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub upd"', false);
|
|
|
|
echo '</div>';
|
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
echo '</form>';
|
2007-05-21 15:24:17 +02:00
|
|
|
?>
|
2009-01-15 11:21:38 +01:00
|
|
|
<link rel="stylesheet" href="include/styles/cluetip.css" type="text/css" />
|
|
|
|
<script type="text/javascript" src="include/javascript/jquery.cluetip.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready (function () {
|
|
|
|
$("a.template_details").cluetip ({
|
|
|
|
arrows: true,
|
|
|
|
attribute: 'href',
|
2009-02-11 17:55:04 +01:00
|
|
|
cluetipClass: 'default'
|
2009-01-15 11:21:38 +01:00
|
|
|
}).click (function () {
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|