From bfe9e0db181117a2b9485c0b257af73e1ed2bbe3 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 3 Apr 2008 15:43:34 +0000 Subject: [PATCH] 2008-04-03 Sancho Lerena * pandoradb_data.sql: IA to prediction in description. * pandoradb.sql: Added priority to alert and custom recovery fields. * include/styles/tip.css, include/styles/pandora.css: New styles for tooltip info (combined and alerts) and some changes in frames for agent management / view. * include/functions_db.php: Added check_server_status() function to check from console server status. If in 15 minutes there is no updated keepalive from any server, they will be marked as down. And function return down. This function is now called on each page. Added funtions to display alert status in a tooltip. * include/languages/language_en.php: More strings. * include/functions.php: Added several funtions to simplify alert report. * operation/agentes/estado_alertas.php: Updated. Shows also combined alerts and give a lot of information in different tooltips. * operation/agentes/estado_ultimopaquete.php: Clean blank spaces in URL. * operation/agentes/estado_monitores.php: now is possible to force a module refresh from main view. * operation/agentes/ver_agente.php: Tab has been upgraded. * images/mod_data.png, images/mod_data_inc.png images/mod_proc.png images/mod_keepalive.png images/mod_string.png: Added new type icons and updated old ones. * general/header.php: Global check for servers and autorefresh control. * godmode/agentes/alert_manager.php: New alert management for combined alerts, visualization, etc. * godmode/agentes/configurar_agente.php: Included new alert management. * godmode/agentes/alert_manager_editor.php: New alert management editor. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@791 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 45 ++ pandora_console/general/header.php | 41 +- .../godmode/agentes/alert_manager.php | 152 ++--- .../godmode/agentes/alert_manager_editor.php | 530 +++++++++++------- .../godmode/agentes/configurar_agente.php | 204 +++++-- pandora_console/images/mod_data.png | Bin 626 -> 869 bytes pandora_console/images/mod_data_inc.png | Bin 625 -> 842 bytes pandora_console/images/mod_keepalive.png | Bin 595 -> 740 bytes pandora_console/images/mod_proc.png | Bin 653 -> 979 bytes pandora_console/images/mod_string.png | Bin 655 -> 794 bytes pandora_console/include/functions.php | 299 ++++++++++ pandora_console/include/functions_db.php | 122 ++++ .../include/languages/language_en.php | 27 +- pandora_console/include/styles/pandora.css | 22 +- pandora_console/include/styles/tip.css | 25 +- .../operation/agentes/estado_alertas.php | 206 ++++--- .../operation/agentes/estado_monitores.php | 16 +- .../agentes/estado_ultimopaquete.php | 18 +- .../operation/agentes/ver_agente.php | 66 ++- .../operation/servers/view_server.php | 16 +- pandora_console/pandoradb.sql | 26 +- pandora_console/pandoradb_data.sql | 2 +- 22 files changed, 1303 insertions(+), 514 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 008488318a..5ec2768e83 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,48 @@ +2008-04-03 Sancho Lerena + + * pandoradb_data.sql: IA to prediction in description. + + * pandoradb.sql: Added priority to alert and custom recovery fields. + + * include/styles/tip.css, include/styles/pandora.css: New styles + for tooltip info (combined and alerts) and some changes in frames for + agent management / view. + + * include/functions_db.php: Added check_server_status() function to check + from console server status. If in 15 minutes there is no updated keepalive + from any server, they will be marked as down. And function return down. + This function is now called on each page. Added funtions to display alert + status in a tooltip. + + * include/languages/language_en.php: More strings. + + * include/functions.php: Added several funtions to simplify alert report. + + * operation/agentes/estado_alertas.php: Updated. Shows also combined + alerts and give a lot of information in different tooltips. + + * operation/agentes/estado_ultimopaquete.php: Clean blank spaces in URL. + + * operation/agentes/estado_monitores.php: now is possible to force a + module refresh from main view. + + * operation/agentes/ver_agente.php: Tab has been upgraded. + + * images/mod_data.png, + images/mod_data_inc.png + images/mod_proc.png + images/mod_keepalive.png + images/mod_string.png: Added new type icons and updated old ones. + + * general/header.php: Global check for servers and autorefresh control. + + * godmode/agentes/alert_manager.php: New alert management for combined + alerts, visualization, etc. + + * godmode/agentes/configurar_agente.php: Included new alert management. + + * godmode/agentes/alert_manager_editor.php: New alert management editor. + 2008-04-01 Sancho Lerena * pandoradb_data.sql: Alert type 0 is not 1. 1-3 are reserved. Removed diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index eeb7832a38..f36267a829 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -25,11 +25,12 @@ echo ' '; echo "
"; - -echo " +echo "
"; if (isset ($_SESSION["id_usuario"])){ - echo "
"; + + // Fist column + echo ""; $id_usuario = entrada_limpia ($_SESSION["id_usuario"]); if (dame_admin($_SESSION["id_usuario"])==1) echo " "; @@ -37,12 +38,36 @@ if (isset ($_SESSION["id_usuario"])){ echo " "; echo "".$lang_label["has_connected"]. ' ['. $id_usuario. ']'; - echo "
"; - echo " ". $lang_label["logout"].""; - echo "
"; + + // Second column + echo ""; echo " ". $lang_label["information"].""; - echo "
"; - echo " ". $lang_label["help"].""; + + // Third column + echo "
"; + // Autorefresh + if ((isset($_GET["refr"])) OR (isset($_POST["refr"]))) { + echo " ". lang_string("Autorefresh").""; + } else { + echo " ". lang_string("Autorefresh").""; + } + + + echo "
"; + echo " ". $lang_label["logout"].""; + + echo ""; + $server_status = check_server_status (); + if ($server_status == 0) + echo " ". lang_string("Server status: DOWN").""; + else + echo " ". lang_string("System ready").""; + + echo ""; + // Event - refresh + echo " ". lang_string("events").""; + + } echo "
"; echo "
"; diff --git a/pandora_console/godmode/agentes/alert_manager.php b/pandora_console/godmode/agentes/alert_manager.php index 23867615c2..5c5213fed7 100644 --- a/pandora_console/godmode/agentes/alert_manager.php +++ b/pandora_console/godmode/agentes/alert_manager.php @@ -1,20 +1,13 @@ -// Additions to Pandora FMS 1.2 graph code and new XML reporting template management -// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es -// +// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es +// Please see http://pandora.sourceforge.net for full contribution list + // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; version 2 +// as published by the Free Software Foundation for version 2. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -22,7 +15,6 @@ // 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. - // ==================================================================================== // VIEW ALERTS // ==================================================================================== @@ -38,9 +30,7 @@ if (give_acl($config["id_user"], 0, "AW")!=1) { exit; }; - -echo "

".$lang_label["agent_conf"]." > ".$lang_label["modules"]."

"; - +echo "

".$lang_label["agent_conf"]." > ".$lang_label["alerts"]."

"; // ========================== // Create module/type combo // ========================== @@ -58,14 +48,15 @@ echo '"; echo ""; - -echo "

".$lang_label["agent_conf"]." > ".$lang_label["alerts"]."

"; +// ========================== +// Simple alerts view +// ========================== $sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"'; $result=mysql_query($sql1); if ($row=mysql_num_rows($result)){ - echo "

".$lang_label["assigned_alerts"]."

"; + echo "

".lang_string ("Simple alerts")."

"; $color=1; $string=''; @@ -94,48 +85,7 @@ $result=mysql_query($sql1); $nombre_alerta = $row4["nombre"]; $string = $string."".$nombre_modulo; - if ($row3["disable"] == 1){ - $string .= "".$lang_label["disabled"].""; - } else { - if ($id_tipo > 0) { - $string .= ""; - } else - $string .= ""; - } - $string = $string."".$nombre_alerta; - - $string = $string."".human_time_description($row3["time_threshold"]); - - $mytempdata = fmod($row3["dis_min"], 1); - if ($mytempdata == 0) - $mymin = intval($row3["dis_min"]); - else - $mymin = $row3["dis_min"]; - $mymin = format_for_graph($mymin ); - - $mytempdata = fmod($row3["dis_max"], 1); - if ($mytempdata == 0) - $mymax = intval($row3["dis_max"]); - else - $mymax = $row3["dis_max"]; - $mymax = format_for_graph($mymax ); - - // We have alert text ? - if ($row3["alert_text"] != "") - $string = $string."".$lang_label["text"].""; - else { - $string = $string."".$mymin.""; - $string = $string."".$mymax.""; - } - $time_from_table =$row3["time_from"]; - $time_to_table =$row3["time_to"]; - $string = $string.""; - if ($time_to_table == $time_from_table) - $string .= $lang_label["N/A"]; - else - $string .= substr($time_from_table,0,5)." - ".substr($time_to_table,0,5); - - $string = $string."".salida_limpia($row3["descripcion"]); + $string .= show_alert_row_edit ($row3, $tdcolor, $row["id_tipo_modulo"],0); $string = $string.""; $id_grupo = dame_id_grupo($id_agente); if (give_acl($id_user, $id_grupo, "LW")==1){ @@ -145,7 +95,7 @@ $result=mysql_query($sql1); ".$lang_label["delete"]."   "; $string = $string." + id_agente=".$id_agente."&update_alert=".$row3["id_aam"]."'> ".$lang_label["update"].""; } $string = $string.""; @@ -161,6 +111,7 @@ $result=mysql_query($sql1); ".$lang_label["max."]." ".$lang_label["time"]." ".$lang_label["description"]." + ".lang_string ("info")." ".$lang_label["action"].""; echo $string; echo ""; @@ -171,22 +122,33 @@ $result=mysql_query($sql1); echo "
".$lang_label["no_modules"]."
"; } -// Combined alerts +// ========================== +// Combined alerts view +// ========================== echo "

".lang_string("combined alerts")."

"; $sql1='SELECT * FROM talerta_agente_modulo WHERE id_agent = '.$id_agente; $result=mysql_query($sql1); if ($row=mysql_num_rows($result)){ - $color=1; - $string=''; + $color = 1; + $string = ''; while ($row=mysql_fetch_array($result)){ // All modules of this agent + // Show data for this combined alert + $string = ""; + $string .= lang_string("Combined")." #".$row["id_aam"]; + $string .= show_alert_row_edit ($row, "datos3", 0, 1); + $string .= ''; // action + if (give_acl($id_user, $id_grupo, "LW")==1){ + $string .= " ".$lang_label["delete"]."   "; + $string .= " + ".$lang_label["update"].""; + } $id_aam = $row["id_aam"]; - - $sql2 = "SELECT * FROM tcompound_alert, talerta_agente_modulo WHERE tcompound_alert.id = $id_aam AND talerta_agente_modulo.id_aam = tcompound_alert.id_aam"; $result2=mysql_query($sql2); - while ($row2=mysql_fetch_array($result2)){ // All modules of this agent + while ($row2=mysql_fetch_array($result2)){ + // Show data for each component of this combined alert if ($color == 1){ $tdcolor="datos"; $color =0; @@ -195,61 +157,18 @@ $result=mysql_query($sql1); $color =1; } $module = get_db_row ("tagente_modulo", "id_agente_modulo", $row2["id_agente_modulo"]); - $description = $row2["descripcion"]; $alert_mode = $row2["operation"]; $id_agente_name = get_db_value ("nombre", "tagente", "id_agente", $module["id_agente"]); - $string = $string."".$module["nombre"]."/".$id_agente_name; + $string = $string."".$id_agente_name." - ".substr($module["nombre"],0,15).""; - if ($row2["disable"] == 1){ - $string .= "".$lang_label["disabled"].""; - } else { - $string .= ""; - } - $string = $string."".$row2["operation"]; - - $string = $string."".human_time_description($module["time_threshold"]); - - $mytempdata = fmod($module["dis_min"], 1); - if ($mytempdata == 0) - $mymin = intval($module["dis_min"]); - else - $mymin = $module["dis_min"]; - $mymin = format_for_graph($mymin ); + $string .= show_alert_row_edit ($row2, $tdcolor, $module["id_tipo_modulo"],1); - $mytempdata = fmod($module["dis_max"], 1); - if ($mytempdata == 0) - $mymax = intval($module["dis_max"]); - else - $mymax = $module["dis_max"]; - $mymax = format_for_graph($mymax ); - - // We have alert text ? - if ($module["alert_text"] != "") - $string = $string."".$lang_label["text"].""; - else { - $string = $string."".$mymin.""; - $string = $string."".$mymax.""; - } - $time_from_table =$$module["time_from"]; - $time_to_table =$module["time_to"]; - $string = $string.""; - if ($time_to_table == $time_from_table) - $string .= $lang_label["N/A"]; - else - $string .= substr($time_from_table,0,5)." - ".substr($time_to_table,0,5); - - $string = $string."".salida_limpia ($module["descripcion"]); $string = $string.""; $id_grupo = dame_id_grupo($id_agente); if (give_acl($id_user, $id_grupo, "LW")==1){ - $string = $string." - ".$lang_label["delete"]."   "; - $string = $string." + $string = $string." ".$lang_label["delete"]."   "; + $string = $string." ".$lang_label["update"].""; } $string = $string.""; @@ -259,12 +178,13 @@ $result=mysql_query($sql1); echo " - + + "; echo $string; echo "
".$lang_label["name"]." ".$lang_label["type"]."".$lang_label["alert"]."".lang_string ("Oper")." ".$lang_label["threshold"]." ".$lang_label["min."]." ".$lang_label["max."]." ".$lang_label["time"]." ".$lang_label["description"]."".lang_string ("info")." ".$lang_label["action"]."
"; diff --git a/pandora_console/godmode/agentes/alert_manager_editor.php b/pandora_console/godmode/agentes/alert_manager_editor.php index 054a5eb4bb..023b9202b7 100644 --- a/pandora_console/godmode/agentes/alert_manager_editor.php +++ b/pandora_console/godmode/agentes/alert_manager_editor.php @@ -1,11 +1,32 @@ -

+".$lang_label["alert_asociation_form"].""; -'; + +if ($form_alerttype == "combined") + echo ""; +else + echo ""; + if (! isset($update_alert)) $update_alert = -1; @@ -15,187 +36,16 @@ if ($update_alert != 1) { echo ''; echo ''; } -?> - - +echo ''; - - -
- -"; - - echo ""; - echo $lang_label["alert_status"]; - echo ""; - echo '"; - -// Trigger values for alert +// AgentModule association +echo '
'.lang_string("assigned_module"); +echo ''; if ($form_alerttype != "combined"){ - echo '
'.$lang_label["min_value"]; - echo " ";echo $lang_label["min_valid_value_help"].""; - echo ''; - - echo ""; - echo $lang_label["max_value"]; - echo " "; - echo $lang_label["max_valid_value_help"]; - echo ""; - echo ""; - echo ""; - - // - - echo '
'.$lang_label["alert_text"]." Regular Expression Supported "; - echo ''; -} - -echo '
'.$lang_label["description"]; -echo ''; - -?> - -
- - -Macros:
-_agent_
-_timestamp_
-_data_
-
- - -
- - -Macros:
-_agent_
-_timestamp_
-_data_
-
- -
- - -Macros:
-_agent_
-_timestamp_
-_data_
-
- -
".$lang_label["time_from"]; - echo ""; - - echo "".$lang_label["time_to"]; - echo ""; - - ?> - -
-   - - - '; - - echo ''; - echo $lang_label["other"]; - echo ''; - echo ''; - - // Max / Min alerts - echo "
".$lang_label["min_alerts"]; - echo ''; - echo ''; - - - echo ''; - echo $lang_label["max_alerts"]; - echo ''; - echo ''; -} - - -if ($form_alerttype != "combined"){ - echo '
'.lang_string("assigned_module"); - echo ''; if ($update_alert != 1) { - echo ' '; $sql2 = "SELECT id_agente_modulo, id_tipo_modulo, nombre FROM tagente_modulo WHERE id_agente = $id_agente ORDER BY nombre"; $result2=mysql_query($sql2); while ($row2=mysql_fetch_array($result2)){ @@ -211,9 +61,225 @@ if ($form_alerttype != "combined"){ echo ""; } else { $agentmodule_name = give_db_value ("nombre", "tagente_modulo", "id_agente_modulo", $alerta_id_agentemodulo); +echo "DEBUG $alerta_id_agentemodulo"; echo $agentmodule_name; } +} else { + echo lang_string ("N/A"); } +echo ''; +echo lang_string ("Priority"); +echo '
'; +echo $lang_label["alert_type"]; +echo '"; + +// Alert disable / enable +echo ""; +echo $lang_label["alert_status"]; +echo ""; +echo '"; + +// Descripcion +echo '
'.$lang_label["description"]; +echo ''; + +// Trigger values for alert +if ($form_alerttype != "combined"){ + echo '
'.$lang_label["min_value"]; + echo " ";echo $lang_label["min_valid_value_help"].""; + echo ''; + + echo ""; + echo $lang_label["max_value"]; + echo " "; + echo $lang_label["max_valid_value_help"]; + echo ""; + echo ""; + echo ""; + + // + + echo '
'.$lang_label["alert_text"]." NOTE: This field is for matching text on data. Regular Expression Supported "; + echo ''; +} + +// Time Threshold (TT) +echo '
'.$lang_label["time_threshold"]; +echo " ".$lang_label["alert_time_threshold_help"].""; +echo ''; +echo ''; + +// Other TT +echo ''; +echo $lang_label["other"]; +echo ''; +echo ''; + +// Max / Min alerts +echo "
".$lang_label["min_alerts"]; +echo ''; +echo ''; + +echo ''; +echo $lang_label["max_alerts"]; +echo ''; +echo ''; + +// Field1 +echo '
'.lang_string ("field1"); +echo ''; +echo "Macros:
_agent_
"; +echo '_timestamp_
_data_
'; + +// Field2 +echo '
'.$lang_label["field2"]; +echo ''; +echo ''; +echo ""; +echo 'Macros:
_agent_
_timestamp_
_data_
'; + +//Field3 +echo '
'.lang_string ("field3"); +echo ''; +echo 'Macros:
_agent_
'; +echo '_timestamp_
_data_
'; + +// Time for alerting +echo "
".$lang_label["time_from"]; +echo ""; + +echo "".$lang_label["time_to"]; +echo ""; + +// Days of week +echo "
".lang_string ("Days of week"); +echo ""; +echo lang_string("Mon"); +echo form_render_check ("alert_d1", $alert_d1); +echo "  "; +echo lang_string("Tue"); +echo form_render_check ("alert_d2", $alert_d2); +echo "  "; +echo lang_string("Wed"); +echo form_render_check ("alert_d3", $alert_d3); +echo "  "; +echo lang_string("Thu"); +echo form_render_check ("alert_d4", $alert_d4); +echo "  "; +echo lang_string("Fri"); +echo form_render_check ("alert_d5", $alert_d5); +echo "  "; +echo lang_string("Sat"); +echo form_render_check ("alert_d6", $alert_d6); +echo "  "; +echo lang_string("Sun"); +echo form_render_check ("alert_d7", $alert_d7); + + + +// Field2 Recovery +echo '
'.lang_string ("Field #2 (Rec)"); +echo ''; +echo ''; + +// Alert recovery disable / enable +echo ""; +echo lang_string ("Alert recovery"); +echo ""; +echo '"; + + +//Field3 - Recovery +echo '
'.lang_string ("Field #3 (Rec)"); +echo ''; +echo ''; // End block only if $creacion_agente != 1; @@ -228,19 +294,101 @@ echo '
'; echo ''; echo '
'; -if ($form_alerttype == "combined"){ + +if (($form_alerttype == "combined") AND ($update_alert != -1)){ echo "

".lang_string ("Combined alert components")."

"; + echo ''; + echo ''; + + if ($form_alerttype == "combined") + echo ""; + else + echo ""; + + echo ''; + echo ''; + + echo "
"; + echo lang_string ("Source Agent/Alert"); + echo ""; + echo ""; + echo ""; + echo lang_string ("Operation"); + echo ""; + echo ""; + echo ""; + echo ''; + echo ""; + echo "
"; + echo ''; - echo ''; echo ' + + + + + + + + "; + + $id_aam = $alerta_id_aam; + $sql2 = "SELECT * FROM tcompound_alert, talerta_agente_modulo WHERE tcompound_alert.id = $id_aam AND talerta_agente_modulo.id_aam = tcompound_alert.id_aam"; + $result2=mysql_query($sql2); + $string = ""; + $color = 1; + + while ($row2=mysql_fetch_array($result2)){ + // Show data for each component of this combined alert + if ($color == 1){ + $tdcolor="datos"; + $color =0; + } else { + $tdcolor="datos2"; + $color =1; + } + $module = get_db_row ("tagente_modulo", "id_agente_modulo", $row2["id_agente_modulo"]); + $description = $row2["descripcion"]; + $alert_mode = $row2["operation"]; + $id_agente_name = get_db_value ("nombre", "tagente", "id_agente", $module["id_agente"]); + + echo ""; + echo ""; + } echo "
'.lang_string ("operation"); + echo '
'.lang_string ("agent"); echo ''.lang_string ("module"); - echo ''.lang_string ("max_value"); - echo ''.lang_string ("min_value"); - echo ''.lang_string ("tt"); - echo ''.lang_string ("min_alerts"); - echo ''.lang_string ("max_alerts"); - echo ''.lang_string ("delete"); - echo "
"; + echo "".$lang_label["type"]."".lang_string ("Oper")."".$lang_label["threshold"]."".$lang_label["min."]."".$lang_label["max."]."".$lang_label["time"]."".$lang_label["description"]."".lang_string ("info")."".$lang_label["action"]."
".$id_agente_name; + echo "".$module["nombre"]; + echo show_alert_row_edit ($row2, $tdcolor, $module["id_tipo_modulo"],1); + echo ""; + $id_grupo = dame_id_grupo($id_agente); + if (give_acl($id_user, $id_grupo, "LW")==1){ + echo " ".$lang_label["delete"]."   "; + echo " + ".$lang_label["update"].""; + } + echo "
"; } diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 7afb1c9b0e..efcc391df1 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -35,7 +35,7 @@ else { // Get passed variables $tab = get_parameter_get("tab","main"); $form_moduletype = get_parameter_post ("form_moduletype"); -$form_alerttype = get_parameter_post ("form_alerttype"); +$form_alerttype = get_parameter ("form_alerttype"); // Init vars $descripcion = ""; @@ -82,6 +82,18 @@ $create_agent = 0; $alert_text = ""; $time_from= ""; $time_to = ""; +$alerta_campo2_rec = ""; +$alerta_campo3_rec = ""; +$alert_id_agent = ""; +$alert_d1 = "1"; +$alert_d2 = "1"; +$alert_d3 = "1"; +$alert_d4 = "1"; +$alert_d5 = "1"; +$alert_d6 = "1"; +$alert_d7 = "1"; +$alert_recovery = "0"; +$alert_priority = "0"; // ================================ // Create AGENT @@ -232,31 +244,60 @@ if (isset($_GET["delete_alert"])){ // if modified some parameter } +// Delete Alert component (from a combined) +// ========================================== +if (isset($_GET["delete_alert_comp"])){ // if modified some parameter + $id_borrar_modulo = $_GET["delete_alert_comp"]; + // get info about agent + $sql1='DELETE FROM tcompound_alert WHERE id_aam = '.$id_borrar_modulo; + $result=mysql_query($sql1); + if (! $result) + echo "

".$lang_label["delete_alert_no"]."

"; + else + echo "

".$lang_label["delete_alert_ok"]."

"; +} + // Create alert // ============= if (isset($_POST["insert_alert"])){ // if created alert - //$id_agente = $_POST["id_agente"]; - $id_agente_modulo = entrada_limpia($_POST["agente_modulo"]); - $descripcion= entrada_limpia($_POST["descripcion"]); - $campo_1 = entrada_limpia($_POST["campo_1"]); - $campo_2 = entrada_limpia($_POST["campo_2"]); - $campo_3 = entrada_limpia($_POST["campo_3"]); - $maximo = entrada_limpia($_POST["maximo"]); - $minimo = entrada_limpia($_POST["minimo"]); - $tipo_alerta = entrada_limpia($_POST["tipo_alerta"]); - $alert_text = entrada_limpia($_POST["alert_text"]); - $time_threshold = entrada_limpia($_POST["time_threshold"]); - $max_alerts = entrada_limpia($_POST["max_alerts"]); - $min_alerts = entrada_limpia($_POST["min_alerts"]); - $time_from = entrada_limpia($_POST["time_from"]); - $time_to= entrada_limpia($_POST["time_to"]); - $other = entrada_limpia($_POST["other"]); - $disable_alert = entrada_limpia($_POST["disable_alert"]); + + $id_agente_modulo = get_parameter ("agente_modulo",0); + $maximo = get_parameter ("maximo",0); + $minimo = get_parameter ("minimo",0); + $descripcion= get_parameter ('descripcion', ''); + $campo_1 = get_parameter ('campo_1', ''); + $campo_2 = get_parameter ('campo_2', ''); + $campo_3 = get_parameter ('campo_3', ''); + $tipo_alerta = get_parameter ("tipo_alerta",3); + $alert_text = get_parameter ("alert_text",''); + $time_threshold = get_parameter ("time_threshold",900); + $max_alerts = get_parameter ("max_alerts",1); + $min_alerts = get_parameter ("min_alerts",0); + $time_from = get_parameter ("time_from"); + $time_to= get_parameter ("time_to"); + $other = get_parameter ("other",0); + $disable_alert = get_parameter ("disable_alert"); + $alert_d1 = get_parameter("alert_d1",0); + $alert_d2 = get_parameter("alert_d2",0); + $alert_d3 = get_parameter("alert_d3",0); + $alert_d4 = get_parameter("alert_d4",0); + $alert_d5 = get_parameter("alert_d5",0); + $alert_d6 = get_parameter("alert_d6",0); + $alert_d7 = get_parameter("alert_d7",0); + $alert_recovery = get_parameter("alert_recovery", 1); + $alert_priority = get_parameter("alert_priority", 0); + $campo2_rec = get_parameter ("campo_2_rec",""); + $campo3_rec = get_parameter ("campo_3_rec",""); + + if ((isset($combined)) AND ($combined == 1)) + $alert_id_agent = $id_agente; + else + $alert_id_agent = 0; if ($time_threshold == -1) { $time_threshold = $other; } $sql_insert="INSERT INTO talerta_agente_modulo - (id_agente_modulo,id_alerta,al_campo1,al_campo2,al_campo3,descripcion,dis_max,dis_min,time_threshold,max_alerts, min_alerts, alert_text, disable, time_from, time_to) VALUES + (id_agente_modulo,id_alerta,al_campo1,al_campo2,al_campo3,descripcion,dis_max,dis_min,time_threshold,max_alerts, min_alerts, alert_text, disable, time_from, time_to, id_agent, monday, tuesday, wednesday, thursday, friday, saturday, sunday, recovery_notify, priority, al_f2_recovery, al_f3_recovery) VALUES ('$id_agente_modulo', '$tipo_alerta', '$campo_1', @@ -271,7 +312,19 @@ if (isset($_POST["insert_alert"])){ // if created alert '$alert_text', '$disable_alert', '$time_from', - '$time_to' )"; + '$time_to', + $alert_id_agent, + $alert_d1, + $alert_d2, + $alert_d3, + $alert_d4, + $alert_d5, + $alert_d6, + $alert_d7, + $alert_recovery, + $alert_priority, + '$campo2_rec', + '$campo2_rec' )"; $result=mysql_query($sql_insert); if (! $result) { echo "

".$lang_label["create_alert_no"]."

"; @@ -281,28 +334,66 @@ if (isset($_POST["insert_alert"])){ // if created alert } } + +// Combined ALERT - Add component +// ================================ +if (isset($_POST["add_alert_combined"])){ // Update an existing alert + $alerta_id_aam = get_parameter ("update_alert",-1); + $component_item = get_parameter ("component_item",-1); + $component_operation = get_parameter ("component_operation","AND"); + $sql_insert = "INSERT INTO tcompound_alert (id, id_aam, operation) + VALUES ($alerta_id_aam, $component_item, '$component_operation')"; + $result=mysql_query($sql_insert); + if (! $result) { + echo "

".lang_string ("Problem adding component alert")."

"; + } else { + echo "

".lang_string ("Alert component added ok")."

"; + } + +} + // Update ALERT // ============= if (isset($_POST["update_alert"])){ // Update an existing alert - $id_aam = entrada_limpia($_POST["id_aam"]); - $tipo_alerta = entrada_limpia($_POST["tipo_alerta"]); - if (isset($_POST["agente_modulo"])) { - $id_agente_modulo = entrada_limpia($_POST["agente_modulo"]); - } - $descripcion= entrada_limpia($_POST["descripcion"]); - $campo_1 = entrada_limpia($_POST["campo_1"]); - $campo_2 = entrada_limpia($_POST["campo_2"]); - $campo_3 = entrada_limpia($_POST["campo_3"]); - $maximo = entrada_limpia($_POST["maximo"]); - $minimo = entrada_limpia($_POST["minimo"]); - $time_threshold = entrada_limpia($_POST["time_threshold"]); - $max_alerts = entrada_limpia($_POST["max_alerts"]); - $min_alerts = entrada_limpia($_POST["min_alerts"]); - $other = entrada_limpia($_POST["other"]); - $alert_text = entrada_limpia($_POST["alert_text"]); - $time_from = entrada_limpia($_POST["time_from"]); - $time_to= entrada_limpia($_POST["time_to"]); - $disable_alert = entrada_limpia($_POST["disable_alert"]); + $id_agente_modulo = get_parameter ("agente_modulo",0); + $id_aam = get_parameter ("id_aam",0); + $maximo = get_parameter ("maximo",0); + $minimo = get_parameter ("minimo",0); + $descripcion= get_parameter ('descripcion', ''); + $campo_1 = get_parameter ('campo_1', ''); + $campo_2 = get_parameter ('campo_2', ''); + $campo_3 = get_parameter ('campo_3', ''); + $tipo_alerta = get_parameter ("tipo_alerta",3); + $alert_text = get_parameter ("alert_text",''); + $time_threshold = get_parameter ("time_threshold",900); + $max_alerts = get_parameter ("max_alerts",1); + $min_alerts = get_parameter ("min_alerts",0); + $time_from = get_parameter ("time_from"); + $time_to= get_parameter ("time_to"); + $other = get_parameter ("other",0); + $disable_alert = get_parameter ("disable_alert"); + $alert_d1 = get_parameter("alert_d1",0); + $alert_d2 = get_parameter("alert_d2",0); + $alert_d3 = get_parameter("alert_d3",0); + $alert_d4 = get_parameter("alert_d4",0); + $alert_d5 = get_parameter("alert_d5",0); + $alert_d6 = get_parameter("alert_d6",0); + $alert_d7 = get_parameter("alert_d7",0); + $alert_recovery = get_parameter("alert_recovery", 1); + $alert_priority = get_parameter("alert_priority", 0); + $campo2_rec = get_parameter ("campo_2_rec",""); + $campo3_rec = get_parameter ("campo_3_rec",""); + $alert_d1 = get_parameter("alert_d1",0); + $alert_d2 = get_parameter("alert_d2",0); + $alert_d3 = get_parameter("alert_d3",0); + $alert_d4 = get_parameter("alert_d4",0); + $alert_d5 = get_parameter("alert_d5",0); + $alert_d6 = get_parameter("alert_d6",0); + $alert_d7 = get_parameter("alert_d7",0); + $alert_recovery = get_parameter("alert_recovery", 1); + $alert_priority = get_parameter("alert_priority", 0); + $campo2_rec = get_parameter ("campo_2_rec",""); + $campo3_rec = get_parameter ("campo_3_rec",""); if ($time_threshold == -1) { $time_threshold = $other; } @@ -321,7 +412,19 @@ if (isset($_POST["update_alert"])){ // Update an existing alert alert_text = '$alert_text', time_to = '$time_to', time_from = '$time_from', - disable = '$disable_alert' + disable = '$disable_alert', + monday = '$alert_d1', + tuesday = '$alert_d2', + wednesday = '$alert_d3', + thursday = '$alert_d4', + friday = '$alert_d5', + saturday = '$alert_d6', + sunday = '$alert_d7', + recovery_notify = $alert_recovery, + priority = $alert_priority, + al_f2_recovery = '$campo2_rec', + al_f3_recovery = '$campo3_rec', + id_alerta = $tipo_alerta WHERE id_aam = ".$id_aam; $result=mysql_query($sql_insert); if (! $result) { @@ -446,7 +549,9 @@ if ((isset($_GET["update_module"])) && (!isset($_POST["oid"])) && (!isset($_POST $modulo_min ="N/A"; } } -// Read alert data if editing alert +// Read ALERT data if editing alert +// ================================== + if (isset($_GET["update_alert"])){ $id_grupo = dame_id_grupo($id_agente); if (give_acl($id_user, $id_grupo, "LW")==0){ @@ -465,6 +570,8 @@ if (isset($_GET["update_alert"])){ $alerta_campo1 = $row["al_campo1"]; $alerta_campo2 = $row["al_campo2"]; $alerta_campo3 = $row["al_campo3"]; + $alerta_campo2_rec = $row["al_f2_recovery"]; + $alerta_campo3_rec = $row["al_f3_recovery"]; $alerta_dis_max = $row["dis_max"]; $alerta_dis_min = $row["dis_min"]; $tipo_alerta = $row["id_alerta"]; @@ -477,8 +584,17 @@ if (isset($_GET["update_alert"])){ $time_from = $row["time_from"]; $time_to = $row["time_to"]; $alerta_id_agentemodulo = $row["id_agente_modulo"]; // Only to show, cannot be changed - } - + $alert_id_agent = $row["id_agent"]; + $alert_d1 = $row["monday"]; + $alert_d2 = $row["tuesday"]; + $alert_d3 = $row["wednesday"]; + $alert_d4 = $row["thursday"]; + $alert_d5 = $row["friday"]; + $alert_d6 = $row["saturday"]; + $alert_d7 = $row["sunday"]; + $alert_recovery = $row["recovery_notify"]; + $alert_priority = $row["priority"]; + } } // GET DATA for MODULE UPDATE OR MODULE INSERT @@ -680,7 +796,7 @@ case "module": require "module_manager_editor.php"; break; case "alert": - if ($form_alerttype == "") + if (($form_alerttype == "") AND (!isset($_GET["update_alert"]))) require "alert_manager.php"; else require "alert_manager_editor.php"; diff --git a/pandora_console/images/mod_data.png b/pandora_console/images/mod_data.png index d0a57239e39a5ea64c715e6c6acab987f61fc405..4cc81920e66e11b2d614b65859ffe4d551fb493f 100644 GIT binary patch delta 830 zcmV-E1Ht_A1my;hBnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*aQI%7Amqhq)Y$+0_90WK~zY`?Uhex6G0Tlf4kY(s!`YKrU&&RiWNPHdKATr zmWqF<2f;%R^{9e3LGU7|7ZH0>QADf=Y85QBAV{ILcoI?k(=@HxB8`pJO*dK6WOv4Y zgHzo!Sq&oO;s?V%X1{qe-@fndXog|PHEY*lJ30OqLI~`sNeVN0jT%8)+OSM^cJ*?v zci^v+6lU@~zIT<+sg&Q`+|1zMU@a?BdPq&vFijJG+qO%HA3uKJ_?fo0^!W6RXw*PTiM49+(TU;g z^S+*ery==AfN>xSOah02*=D>8Gyp9?kDA*AJXi5<;HKj2tXfD=#O?d1OT?tpX)bi0 z?%uL@)s6Z_9X$$CXt*iAqw!_o-P@rzVHHgS+g02KoCHn*3xU;u2gCxLXMs3>$gxze zQ0TKZ35rOL^>LzOFHKEN0C=9q^tWuwqS!K4%-cXLzY@c4K)Ca8bGfFh<5W}qTfhz# zw*ZgS*dM~LhEpm8z%)(nbe$tP)<-s%#>fnFz4rE!(y+O_QT1*D-%#gfEkMu3zfLwrx_Wl(L^d z2p=hh8uHhPD_g5>&R#-UW*cx(&2LqG@HN1#hEusBvtl~V4)JNs<@%-3l7^2hS@7Ny z9&XV=NPo_sEc8R=1Mwl?39tva2JBMfGO%yXx@tJ(LUdg(5z~3)Lx~7~iDdeV`)+b9 z|L=~B$-U|AO8T~0q^5SofyiCh5!Hn07*qo IM6N<$g8V3mr2qf` delta 601 zcmV-f0;c`t2J!@uB!32COGiWi{{a60|De66lK=n$CrLy>RCwCemA#JBKoo_~o$)GO z0(c@MY6>7JL85^tfQlv^6;hxAgy^VfsVJZTf%ug`TLcP3fkYDt#6y5rLRlfCuqb1^ z2~M2&QtUd|iFbCC#^N@%W{&Oi&78R=$8q@Ru{v}(z_OJj34ipj9!Ak0LP_NuIOyTd z{by*u|FrZ=#-j)y+K*6XIRFEk;BamK_6QNE=vpvFv^_H#MX0Q-lndfWiPI;JFVAYT`uX{Ed|sc<&FhRH zS%_D!Z!N%ho_|NpLoUZJE`s(|G2K{4v*vQUA5qZ`&6_78CL%VO$!blyq7tczEQH_f z;Ksf4XfzsGNM3t<9SFYw>mA6!2A-a)6t1Glq-n+XdfucH>5WnfYj1AD?{=^?_z5TY zic8l{K`Hf5Ty;TP0T2TiCybAOBw6xYxN`K+%%{o@A5}UmUPwu|U#Vh&V z1?@m2;RL-ORRo7L`9uQYt1$QrtV}5Z{2@Ri0#lh zkRS*TSsjWXyxD0%NGM*lL*k(VgNl^V!IP{*Wd>a;Bt0ZDMGrTAY$gb=ob!-HXbJ|D}=%LpNV@Or(3 z2gA1Hoqn#(N}w8etltqY(60Ob3h-I)`3U$eziHcnkK0bJsi{#?N+qRKfC>+WRj@0l zTKij7AP`VeN~M%i!LFcc?rBzjzh6ly3;a+hq}WHea{s1b7<3MGGCDO%Vl~0a+6uLo zYiVj~BArf?SWPgsI7Q>lMhwG$DDd|iuACvIq@$&ScznBJlM|CfyQ7Sck5i#1QhG5> zv^$z_C#%29*82Aq$%%>e#V}_~W(Q`GQlgZ??RI0%n9L2#)CY_U(k7;qQ33OoQ( h`kU;HQ^bFTpK(=1T&xHVTMYmJ002ovPDHLkV1lCzb}Rq@ delta 600 zcmV-e0;m1T2Jr-tB!32COGiWi{{a60|De66lK=n$CP_p=RCwCml|66MP!xvWV>^OK zCB7&UAIgFP6+x=X%3p}onLohDlm&G}5n^EI%7BE*NY#m@s7!?Zg-Vf?fu*IUjqK{; z#Kv|GLvUm}c4%BxmN?SY{nXWY?m6#0q-h#ISbYdvIw)$B$$td)@FzTXOeo2;8#NtU zZ@01g`JnJ6zdaXUcHf~)(*Oo|f?GFNrYl6CtUhCnXu9KhF0NH7<$`FciYJd(v3CD1 zh-hI`6eV*krNp;SAIgr%)M~XFm>EO_Ap~sOo;$4TIuQ{^b7m$0a2$uTE+-<6&cw%g z^Ypz-gAh>yVt@1F<{XT!>(p-4`S|quM3e|b2!ZZS7d@kg zvtMU0OatrB)**zL9j*!jpGzPB*k@FsBK{B;aW(|;l8O}Mu%w$;>UsfMP#6=+zsTBmltS(rVHGAo(W{gH7 zRul!U>rp0ZOBjZn_iN<|ILpx@&L=>kl!`l^R|NC+$Kx@=Ff6wqN-5FlbfBuqA1K`~ m+Vg!MgTbIw5MpNh5B3KE_8XUts$w$$0000J!x diff --git a/pandora_console/images/mod_keepalive.png b/pandora_console/images/mod_keepalive.png index 56626132fcdac4be06068289864c0624f03597df..90b466fba75d4ae6a6cc67ff894d09836eb3f948 100644 GIT binary patch delta 657 zcmV;C0&e}&1mp#fUw;Gv4jeeUZat0w00Lx5L_t(Y$L*ERYZE~f$3L^1l4?E7M&ch} z{c#ZVCLRO@K{O~TwJ1I3A}HvgSHYXddK9UiEI|_$^bjaY4-$G;R6^>(P{al`vQ5qA z$Bu_i;&wZmq(#WZ2gA;L^H|>ZeZTWY#9}eEZ~sB6ZjJ4l?|=JLzpv2n>VhGea1y)K z<7auY`M2BtNyDo%pMAi$^5>xeiGc#;v&Y$`p$UZPYlsQ4e&Ts`;v*vr(?l|vRK;Sk zTU0+&N@+|R^HZr5g+gIyj98{3qfAOE9LK?N9Hf*;DTS1>SMg7Q*P+;=A+Hm=2TTUy zCxAJ*#^eaFHcz*$09uSDqg`Wlv0YzX| z_0}9e-uZwTJa7P54a7Rq>exFy7&b~P+}Ysew{4qRt)?u? z>Vga`<+^Sd_=KU$DZL*z6n-q^PaAT^domJ~k%00oZq5YDqg;ENE1`l>-LzfQ4A7R`MH6Aj1%=bm$~#I|i793H{d9yUcB$8hg%Fb#Y`MUdw19^YRM(0?0z+V~^Wz{iK)8(dGm zR7S)G2r$Ne^Jzj&AVtrDGm-n7An@VTYN!&@YPC2Tjnbr6fn>rdAKz}bF&qx7R3x9| zGD3|;LjW*a2mo+hmu0-OahWqIh?6z$7KE5@lu3eQT6L4e$*#lj`~{-kDT1?OoHQIh zxb9KJFcUV3iGQ(>BO)ScBH6uRCwAYy1oQ~_{1KKn!MkGzC6y|x{9l90j?k6CPwJ4L z-+>UoG=}BuY*OWIKw~ZTh*GLNlSHBT+gC_JBGwUZuBKRFEpBNqDeH-)&7QRqNt2vB ze|5pv&+4epfZHDmr^8>lNw%aJ`A?>nQYvSyqCNqDzIPi)zZ-B3>&*M34!|#%NL;7N zYbY$G2+359A{9s?ilS1Yb8@rU ztkOTbt+hs{(}87K3rd*e%I?B2#CSZ$e>?(y1Lb_ZXls0O$N&HU07*qoM6N<$f~l79 AZ~y=R diff --git a/pandora_console/images/mod_proc.png b/pandora_console/images/mod_proc.png index 296293ca4ad6f264888aa19ca4d024554dd66f30..998ace35c2bea10637b670f66a15933ba26b6af0 100644 GIT binary patch delta 941 zcmV;e15*5r1=9zRBnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*aQI%91|DP#LfT!15-&vK~zY`?UhexTtytmKeO+>ec4SmZ{brDp)0y(jG#ZvbF^`C2co< z*<`nGci-E$?~jMhZr^S;3azpizc9?qcYZU>cYc3HsHz%_Pwb~;R(V|bzE7!Gz^U7U z9zhHZ?+U*8ex3{Smmd2Nr*8A}g)`h=z1=e*Dg+StJT){Rr3pm0z6&SB!$rL)_iP#Y>ZSYg%E;BB+}wd)8yA5&yl~~Lm|z<;NT!Z z5RgnJ0a#pIg-vf>T4iE*-0B3;+@Ch&tB!H{HalmT{5kjt+vFs{(w2ydyjKSmpOG`^+GuhVVQ>j!p zkJue^qxpIrNB~7SJ`TJkMIifs6To-UJFkcKeF*fog;wWl1^__-K|m}P$MZcZH4{DB zhv$1ui+_R#>;`_3p``*J$h9U9Z~!$`DI3VR+lF*HjoWZpUA;r# zd&FaL`t&}E#SJz$wm5X~&^Ga1LW@uc9R^+le(T^fKsqGQk|7wzu;e{|DX58Y;M6vc zl*{FZ{x=M!CZ~vMQF1qLu(7txu2_}){R$O-g!KMNW@l&r&4RNI_;UOe@Hucalp|kC z{%PPN;A3ff3Ru}Ow94f&hG8%=GQyuZ6Zh^sjq2}goBvhy90ShFDt1v; zEnQZv^MC?;3S5@fJg P00000NkvXXu0mjf#lEB% delta 628 zcmV-)0*n3A2aN@gB!32COGiWi{{a60|De66lK=n$LP zzS+V~?aP@DIUa=gwDT5OiU1hkF|J)*iZw(a)7zjUijlz}#HCy=TOz`?@#x+v?%ui% zBAWYHmStS~zK^|+@3M|aEQLY=%nTxeloFojO&L3mLqx=C&&&h>K@hO%@T6_hewKdG zcRH5TixV(KVt?cP#uORHaj5*T$Ui^7Kt5-~@BBjfevxb6yQCsxlG9wCh*-Bv?iFsr z)Otb$z=TA-S;zY3I!dJy8jXe`$-lq8hTW-S*gM4K2zd4MCWwgJ?e>MHNs?refC*D; zOA(P$qPks0y;(=+sDoy^iM3~IkWx;5kk47*{vj|1IDZ22!bZ{&v(ihCMpB>j>V?#Z z=XsD)V&(Y?#F9YR4zatnn@X?1JAjB{62k%GpnDv98Civ04)4dh_KKN_L>;m5*=EJ`6$R7^FaV|u*^{UVBtscY4~b;(q;uIuu7 z>OrpoJ#8J;Wp!+-YXQJ$G@8r>*L5eJRx_j5>#=272*WTnTcRl9SzT*hTK&uZG?-8+ zmAv?@Avg=~_xp&VDBFSP`#vg_3T!*wf%Nx0Y&aaE)oNu*gqRusgZu@d@>7(wQ<)k7 O0000H=&k73xOWmQwYTnE3}2+hN1^^X`voMpjD`CEZH^=-dHCl#Gi~|>|?iDX(v?GV&T@!9&UK9 zB7|sailWr@3xxvO(hI(3+So|Nv0ANvghC-yRV9^5;q`hsJUk>4iQsTJaJgI!i|p;y zyw49iVP|JY4h#&)CL6YP%DjRYa0loE-UH$c&-^`+3fE7<<#I7SJ&mSmIGs*^78e&; zU0uayvoSU{Mlcv;d3l-c?(U0X$bDc5_yybp3myL}Lwzs#L zoSY;cj}r(4NG6la&CTI-I>~0U=lx(ekf@nI174YQ`wTdMbW3-n9yT{OSzlkr@Ap?@ zilQ(vF~P#Z0)vBt)mWobZGbF);I9+!1G<0`a2xn=)`CjqMDqDO`F#FZ(&O~iN#_xqh<>~o~OVA)1CnKb5pB=+Gcutdr?&tpU;QgZfAae zp4r)1rlzI{1OkkVj4(Vr+)5)Ssr3=~2D~$=1@Ibp1Ux*Gvb)`GnaN~bFbv~V{ixLr zo6S}&qU$=NqoZh=);?vIQljg6l_JeVu-1yjVl`hZ7CAaPYOk^v3I%3nX0TW+$M}A7 kY?dpPN~F_i{^J7h8vv{bOHfJA)&Kwi07*qoM6N<$f}a~$cK`qY delta 630 zcmV-+0*U>a29E`hB!32COGiWi{{a60|De66lK=n$L`g(JRCwCeRlSQ7K@|VJ-8~aQ zvvZB00rBfFf+!Zk{Q)+Tzrer2=7JVBb{1lxHXRj@U0L@9WZU zSu)f{N{PzVyZGMz0RY%(_pyHc6QqJ^1Y_`O4%(|{MuS4mu{o$V}nJFMD zrLu<48iKR#!!Se~$N3IK&+|~L)nJ"; + } elseif ($id_tipo_modulo != 0) { + $string .= ""; + } else { + $string .= "--"; + } + + if (isset($row2["operation"])){ + $string = $string."".$row2["operation"]; + } else { + $string = $string."".get_db_sql("SELECT nombre FROM talerta WHERE id_alerta = ".$row2["id_alerta"]); + } + + $string = $string."".human_time_description($row2["time_threshold"]); + if ($row2["dis_min"]!=0){ + $mytempdata = fmod($row2["dis_min"], 1); + if ($mytempdata == 0) + $mymin = intval($row2["dis_min"]); + else + $mymin = $row2["dis_min"]; + $mymin = format_for_graph($mymin ); + } else { + $mymin = 0; + } + + if ($row2["dis_max"]!=0){ + $mytempdata = fmod($row2["dis_max"], 1); + if ($mytempdata == 0) + $mymax = intval($row2["dis_max"]); + else + $mymax = $row2["dis_max"]; + $mymax = format_for_graph($mymax ); + } else { + $mymax = 0; + } + + if (($mymin == 0) && ($mymax == 0)){ + $mymin = lang_string ("N/A"); + $mymax = $mymin; + } + + // We have alert text ? + if ($row2["alert_text"]!= "") { + $string = $string."".$lang_label["text"].""; + } else { + $string = $string."".$mymin.""; + $string = $string."".$mymax.""; + } + + // Alert times + $string = $string.""; + $string .= get_alert_times ($row2); + + // Description + $string = $string."".salida_limpia ($row2["descripcion"]); + + // Has recovery notify activated ? + if ($row2["recovery_notify"] > 0) + $recovery_notify = lang_string("Yes"); + else + $recovery_notify = lang_string("No"); + + // calculate priority + $priority = get_alert_priority ($row2["priority"]); + + // calculare firing conditions + if ($row2["alert_text"] != ""){ + $firing_cond = lang_string("text")."(".substr($row2["alert_text"],0,8).")"; + } else { + $firing_cond = $row2["min_alerts"]." / ".$row2["max_alerts"]; + } + // calculate days + $firing_days = get_alert_days ( $row2 ); + + // More details EYE tooltip + $string = $string.""; + $string.= "
"; + + // Add float info table + $string.= " + + + + + + + + + + +
". + lang_string("Recovery")."
$recovery_notify
". + lang_string("Priority")."
$priority
". + lang_string("Alert Ctrl.")."
".$firing_cond."
". + lang_string("Firing days")."
".$firing_days."
"; + return $string; +} + +function show_alert_show_view ($data, $tdcolor = "datos", $combined = 0){ + global $config; + global $lang_label; + + if ($combined == 0){ + $module_name = get_db_sql ("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$data["id_agente_modulo"]); + $agent_name = get_db_sql ("SELECT tagente.nombre FROM tagente_modulo, tagente WHERE tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_agente_modulo = ".$data["id_agente_modulo"]); + $id_agente = get_db_sql ("SELECT id_agente FROM tagente_modulo WHERE id_agente_modulo = ".$data["id_agente_modulo"]); + } else { + $agent_name = get_db_sql ("SELECT nombre FROM tagente WHERE id_agente =".$data["id_agent"]); + $id_agente = $data["id_agent"]; + } + $alert_name = get_db_sql ("SELECT nombre FROM talerta WHERE id_alerta = ".$data["id_alerta"]); + + echo "".$alert_name.""; + if ($combined == 0){ + echo "".substr($module_name,0,21).""; + } else { + echo ""; + // More details EYE tooltip (combined) + echo " "; + echo show_alert_row_mini ($data["id_aam"]); + echo " "; + echo substr($agent_name,0,21).""; + } + + // Description + echo "".$data["descripcion"].""; + + // Extended info + echo ""; + + // Has recovery notify activated ? + if ($data["recovery_notify"] > 0) + $recovery_notify = lang_string("Yes"); + else + $recovery_notify = lang_string("No"); + + // calculate priority + $priority = get_alert_priority ($data["priority"]); + + // calculare firing conditions + if ($data["alert_text"] != ""){ + $firing_cond = lang_string("text")."(".substr($data["alert_text"],0,8).")"; + } else { + $firing_cond = $data["min_alerts"]." / ".$data["max_alerts"]; + } + // calculate days + $firing_days = get_alert_days ($data); + + // More details EYE tooltip + echo ""; + + // Add float info table + echo " + + + + + + + + + + +
". + lang_string("Recovery")."
$recovery_notify
". + lang_string("Priority")."
$priority
". + lang_string("Alert Ctrl.")."
".$firing_cond."
". + lang_string("Firing days")."
".$firing_days."
"; + + $mytempdata = fmod($data["dis_min"], 1); + if ($mytempdata == 0) + $mymin = intval($data["dis_min"]); + else + $mymin = $data["dis_min"]; + $mymin = format_for_graph($mymin ); + + $mytempdata = fmod($data["dis_max"], 1); + if ($mytempdata == 0) + $mymax = intval($data["dis_max"]); + else + $mymax = $data["dis_max"]; + $mymax = format_for_graph($mymax ); + // Text alert ? + if ($data["alert_text"] != "") + echo "".$lang_label["text"].""; + else { + echo "".$mymin.""; + echo "".$mymax.""; + } + echo "".human_time_description($data["time_threshold"]); + if ($data["last_fired"] == "0000-00-00 00:00:00") { + echo "".$lang_label["never"].""; + } + else { + echo "".human_time_comparation ($data["last_fired"]).""; + } + echo "".$data["times_fired"].""; + if ($data["times_fired"] <> 0){ + echo ""; + echo ""; + $id_grupo_alerta = get_db_value ("id_grupo", "tagente", "id_agente", $id_agente); + if (give_acl($config["id_user"], $id_grupo_alerta, "AW") == 1) { + echo ""; + echo ""; + echo ""; + } + } else + echo ""; +} + +function form_render_check ($name_form, $value_form = 1){ + echo ""; +} ?> diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index fafeadd768..3b0a951d72 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -1289,4 +1289,126 @@ function lang_string ($string){ else return "[".$string."]"; } + + +function check_server_status (){ + global $config; + // This check assumes that server_keepalive should be AT LEAST 15 MIN + $sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > NOW() - INTERVAL 15 MINUTE"; + $res = get_db_sql ($sql); + // Set servers to down + if ($res == 0){ + $res2 = mysql_query("UPDATE tserver SET status = 0"); + } + return $res; +} + +function show_alert_row_mini ($id_combined_alert){ + global $config; + global $lang_label; + + $color=1; + $sql_com = "SELECT talerta_agente_modulo.*, tcompound_alert.operation FROM talerta_agente_modulo, tcompound_alert WHERE tcompound_alert.id_aam = talerta_agente_modulo.id_aam AND tcompound_alert.id = ".$id_combined_alert; + $result_com = mysql_query ($sql_com); + echo ""; + echo ""; + + if ($row2["disable"] == 1){ + $tdcolor = "datos3"; + } + echo ""; + } else { + echo ""; + } + + // Alert times + echo ""; + else + echo ""; + + } + echo "
".lang_string("Name"); + echo "".lang_string("Oper"); + echo "".lang_string("Tt"); + echo "".lang_string("Firing"); + echo "".lang_string("Time"); + echo "".lang_string("Desc"); + echo "".lang_string("Recovery"); + echo "".lang_string("MinMax.Al"); + echo "".lang_string("Days"); + echo "".lang_string("Fired"); + while ($row2=mysql_fetch_array($result_com)){ + + if ($color == 1){ + $tdcolor = "datos"; + $color = 0; + } + else { + $tdcolor = "datos2"; + $color = 1; + } + echo "
".get_db_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo =".$row2["id_agente_modulo"]); + echo "".$row2["operation"]; + + echo "".human_time_description($row2["time_threshold"]); + + if ($row2["dis_min"]!=0){ + $mytempdata = fmod($row2["dis_min"], 1); + if ($mytempdata == 0) + $mymin = intval($row2["dis_min"]); + else + $mymin = $row2["dis_min"]; + $mymin = format_for_graph($mymin ); + } else { + $mymin = 0; + } + + if ($row2["dis_max"]!=0){ + $mytempdata = fmod($row2["dis_max"], 1); + if ($mytempdata == 0) + $mymax = intval($row2["dis_max"]); + else + $mymax = $row2["dis_max"]; + $mymax = format_for_graph($mymax ); + } else { + $mymax = 0; + } + + if (($mymin == 0) && ($mymax == 0)){ + $mymin = lang_string ("N/A"); + $mymax = $mymin; + } + + // We have alert text ? + if ($row2["alert_text"]!= "") { + echo "".$lang_label["text"]."".$mymin."/".$mymax.""; + echo get_alert_times ($row2); + + // Description + echo "".substr($row2["descripcion"],0,20); + + // Has recovery notify activated ? + if ($row2["recovery_notify"] > 0) + $recovery_notify = lang_string("Yes"); + else + $recovery_notify = lang_string("No"); + + echo "".$recovery_notify; + + // calculare firing conditions + if ($row2["alert_text"] != ""){ + $firing_cond = lang_string("text")."(".substr($row2["alert_text"],0,8).")"; + } else { + $firing_cond = $row2["min_alerts"]." / ".$row2["max_alerts"]; + } + echo "".$firing_cond; + + // calculate days + $firing_days = get_alert_days ( $row2 ); + echo "".$firing_days; + + // Fired ? + if ($row2["times_fired"]>0) + echo "
"; +} ?> diff --git a/pandora_console/include/languages/language_en.php b/pandora_console/include/languages/language_en.php index 1bd5d2f50f..309583ef92 100644 --- a/pandora_console/include/languages/language_en.php +++ b/pandora_console/include/languages/language_en.php @@ -155,7 +155,7 @@ $lang_label["log_filter"]="Log type filter"; $lang_label["not_connected"]="You're not connected"; $lang_label["administrator"]="Administrator"; $lang_label["normal_user"]="Standard user"; -$lang_label["has_connected"]="You are connected as"; +$lang_label["has_connected"]="You are "; $lang_label["logged_out"]="Logged Out"; $lang_label["logout_msg"]="Your session is over. Please close your browser window to close session on Pandora.

"; $lang_label["user_last_activity"]="This is your last activity in Pandora FMS console"; @@ -895,6 +895,31 @@ $lang_label["post_process"]="Post process"; $lang_label["max_timeout"]="Max. timeout"; $lang_label["snmp_walk"]="SNMP walk"; +$lang_label["System ready"]="Sytem ready"; +$lang_label["System ready"]="Sytem ready"; +$lang_label["Server status: DOWN"]="Server status: DOWN"; +$lang_label["Autorefresh"]="Autorefresh"; +$lang_label["Autorefresh active"]="Autorefresh active"; + +$lang_label["Mon"]="Mon"; +$lang_label["Tue"]="Tue"; +$lang_label["Wed"]="Wed"; +$lang_label["Thu"]="Thu"; +$lang_label["Fri"]="Fri"; +$lang_label["Sat"]="Sat"; +$lang_label["Sun"]="Sun"; +$lang_label["Days of week"] = "Days of week"; +$lang_label["Alert recovery"]="Alert recovery"; +$lang_label["Priority"]="Priority"; +$lang_label["Field #2 (Rec)"]="Field #2 (Rec)"; +$lang_label["Field #3 (Rec)"]="Field #3 (Rec)"; +$lang_label["Simple alerts"]="Simple alerts"; +$lang_label["Combined alerts"]="Combined alerts"; +$lang_label["Oper"]="Oper"; +$lang_label["info"]="info"; +$lang_label["Operation"]="Operation"; +$lang_label["Source Agent/Alert"]="Source Agent/Alert"; + global $lang_label; global $help_label; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 1d79c87324..07895429b8 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -102,6 +102,13 @@ a.white_bold { text-decoration: none; font-weight: bold; } + +a.white_grey_bold { + color: #999; + text-decoration: none; + font-weight: bold; +} + a.white { color: #eee; text-decoration: none; @@ -439,6 +446,17 @@ div.title_line { float:left; border-bottom: 1px solid #778866; } +#menu_tab_frame_view { + background: #66AA44; + width: 805px; + min-height: 22px; + padding-left: 0x; + margin-left: -25px; + float:left; + border-bottom: 1px solid #778866; +} + + #menu_tab .mn, #menu_tab ul, #menu_tab .mn ul { padding: 0px; list-style: none; @@ -601,8 +619,8 @@ span.rmess, span.nrmess { } #head_m { position: absolute; - padding-top: 7px; - padding-left: 210px; + padding-top: 6px; + padding-left: 200px; } span#logo_text1 { font: bolder 3em Arial, Sans-serif; diff --git a/pandora_console/include/styles/tip.css b/pandora_console/include/styles/tip.css index 4255d7f188..3b38fcb604 100644 --- a/pandora_console/include/styles/tip.css +++ b/pandora_console/include/styles/tip.css @@ -18,10 +18,17 @@ a.help { a.info { padding: 25px 0px 0px 0px; } + +a.info_table { + padding: 25px 0px 0px 0px; + margin: -50px 0px 0px 0px; +} + a.info2 { padding: 2px 0px 0px 0px; } -a.tip, a.tip2, a.tipp, a.help , a.info, a.info2 { + +a.tip, a.tip2, a.tipp, a.help , a.info, a.info2, a.info_table { position: relative; text-decoration: none; } @@ -38,14 +45,14 @@ a.tipp:hover { text-decoration: none; background-color: #778866; } -a.info:hover, a.info2:hover, a.help:hover { +a.info:hover, a.info2:hover, a.help:hover, a.info_table:hover { text-decoration: none; } -a.tip span, a.tip2 span, a.tipp span, a.info span, a.info2 span, a.help span { +a.tip span, a.tip2 span, a.tipp span, a.info span, a.info2 span, a.help span, a.info_table span { display: none; } a.tip:hover span, a.tip2:hover span,a.tipp:hover span, a.info:hover span, -a.info2:hover span, a.help:hover span { +a.info2:hover span, a.help:hover span, a.info_table:hover span { display: block; text-decoration: none; position: absolute; @@ -58,6 +65,16 @@ a.info2:hover span, a.help:hover span { color: #000; padding: 2px; } + +a.info_table:hover span{ + width: 1px; + height: 1px; + left: -140px; + top: 50px; + background-color: #fff; + border: 0px solid #fff; +} + a.info:hover span { top: 45px; left: 20px; diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php index ad26566887..3a94ad57cd 100644 --- a/pandora_console/operation/agentes/estado_alertas.php +++ b/pandora_console/operation/agentes/estado_alertas.php @@ -1,13 +1,12 @@ ".$lang_label["ag_title"]." > ".$lang_label["alert_listing"].""; } - $query_gen='SELECT talerta_agente_modulo.alert_text, talerta_agente_modulo.id_alerta, talerta_agente_modulo.descripcion, talerta_agente_modulo.last_fired, talerta_agente_modulo.times_fired, tagente_modulo.nombre, talerta_agente_modulo.dis_max, talerta_agente_modulo.dis_min, talerta_agente_modulo.max_alerts, talerta_agente_modulo.time_threshold, talerta_agente_modulo.min_alerts, talerta_agente_modulo.id_agente_modulo, tagente_modulo.id_agente_modulo, talerta_agente_modulo.id_aam FROM tagente_modulo, talerta_agente_modulo WHERE tagente_modulo.id_agente = '.$id_agente.' AND tagente_modulo.id_agente_modulo = talerta_agente_modulo.id_agente_modulo AND talerta_agente_modulo.disable = 0 ORDER BY tagente_modulo.nombre'; + $query_gen='SELECT talerta_agente_modulo.* FROM talerta_agente_modulo, tagente_modulo WHERE talerta_agente_modulo.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente ='.$id_agente; $result_gen=mysql_query($query_gen); if (mysql_num_rows ($result_gen)) { @@ -66,6 +65,7 @@ if (isset($_GET["id_agente"])){ echo " ".$lang_label["type"]."".$lang_label["name"]." ".$lang_label["description"]." + ".lang_string ("info")." ".$lang_label["min."]." ".$lang_label["max."]." ".$lang_label["time_threshold"]." @@ -84,52 +84,25 @@ if (isset($_GET["id_agente"])){ $color = 1; } echo ""; - echo "".dame_nombre_alerta($data["id_alerta"]).""; - echo "".substr($data["nombre"],0,21).""; - echo "".$data["descripcion"].""; - - $mytempdata = fmod($data["dis_min"], 1); - if ($mytempdata == 0) - $mymin = intval($data["dis_min"]); - else - $mymin = $data["dis_min"]; - $mymin = format_for_graph($mymin ); - - $mytempdata = fmod($data["dis_max"], 1); - if ($mytempdata == 0) - $mymax = intval($data["dis_max"]); - else - $mymax = $data["dis_max"]; - $mymax = format_for_graph($mymax ); - // Text alert ? - if ($data["alert_text"] != "") - echo "".$lang_label["text"].""; - else { - echo "".$mymin.""; - echo "".$mymax.""; - } - echo "".human_time_description($data["time_threshold"]); - - - if ($data["last_fired"] == "0000-00-00 00:00:00") { - echo "".$lang_label["never"].""; - } - else { - echo "".human_time_comparation ($data["last_fired"]).""; - } - echo "".$data["times_fired"].""; - if ($data["times_fired"] <> 0){ - echo ""; - echo ""; - $id_grupo_alerta = get_db_value ("id_grupo", "tagente", "id_agente", $id_agente); - if (give_acl($id_user, $id_grupo_alerta, "AW") == 1) { - echo ""; - echo ""; - echo ""; - } - } else - echo ""; + show_alert_show_view ($data, $tdcolor, 0); } + + echo "
".lang_string("Combined alerts")."
"; + // Show combined alerts for this agent + $result_com = mysql_query("SELECT * FROM talerta_agente_modulo WHERE id_agent = $id_agente"); + while ($data_com=mysql_fetch_array($result_com)){ + if ($color == 1){ + $tdcolor = "datos"; + $color = 0; + } + else { + $tdcolor = "datos2"; + $color = 1; + } + echo ""; + show_alert_show_view ($data_com, $tdcolor, 1); + } + echo ''; } else { @@ -176,8 +149,9 @@ if (isset($_GET["id_agente"])){ "; - // Show only selected groups + // Display single alerts + // ======================= if ($ag_group > 1) $sql='SELECT id_agente, nombre, disabled FROM tagente WHERE id_grupo='.$ag_group.' ORDER BY nombre'; else @@ -245,35 +219,101 @@ if (isset($_GET["id_agente"])){ unset($string); } //end result } //end disabled=0 - } //end while - if (isset($string)) { - echo ""; - echo " ".$lang_label["fired"].""; - echo ""; - echo " ".$lang_label["not_fired"]; - echo ""; - echo "
"; - echo ""; - echo " - - - - - - "; - - echo $string; //built table of alerts - echo "
".$lang_label["agent"]."".$lang_label["status"]."".$lang_label["type"]."".$lang_label["description"]."".$lang_label["last_fired"]."".$lang_label["times_fired"]."
"; - } - else { - echo "
". - $lang_label["no_alert"]."
"; - } - } else { - echo "
". - $lang_label["no_agent"].$lang_label["no_agent_alert"]."
"; - } -} + } + // Display combined alerts + // ======================= + if ($ag_group > 1) + $sql='SELECT id_agente, nombre, disabled FROM tagente WHERE id_grupo='.$ag_group.' ORDER BY nombre'; + else + $sql='SELECT id_agente, nombre, disabled FROM tagente ORDER BY id_grupo, nombre'; + $result=mysql_query($sql); + + if (mysql_num_rows($result)){ + $color=1; + while ($row=mysql_fetch_array($result)){ //while there are agents + if ($row["disabled"] == 0) { + $id_agente = $row['id_agente']; + $nombre_agente = strtoupper($row["nombre"]); + $query_gen='SELECT talerta_agente_modulo.id_alerta, + talerta_agente_modulo.descripcion, + talerta_agente_modulo.last_fired, + talerta_agente_modulo.times_fired, + talerta_agente_modulo.id_agent + FROM talerta_agente_modulo + WHERE talerta_agente_modulo.id_agent = '.$id_agente.' AND talerta_agente_modulo.disable = 0 '; + $result_gen=mysql_query($query_gen); + if (mysql_num_rows ($result_gen)) { + while ($data=mysql_fetch_array($result_gen)){ + if ($color == 1){ + $tdcolor = "datos"; + $color = 0; + } + else { + $tdcolor = "datos2"; + $color = 1; + } + if (!isset($string)) { + $string=''; + } + $string = $string." + + ".$nombre_agente." (*)"; + $string .= ""; + if ($data["times_fired"] <> 0) + $string .= ""; + else + $string .= ""; + + $string = $string."" + .dame_nombre_alerta($data["id_alerta"]).""; + $string=$string."". + $data["descripcion"].""; + if ($data["last_fired"] == "0000-00-00 00:00:00") { + $string=$string."". + $lang_label["never"].""; + } else { + $string=$string."". + human_time_comparation($data["last_fired"]).""; + + + } + $string=$string."". + $data["times_fired"].""; + } + } + else if($ag_group>1) { + unset($string); + } //end result + } //end disabled=0 + } //end while + } // if rows.. + + if (isset($string)) { + echo ""; + echo " ".$lang_label["fired"].""; + echo ""; + echo " ".$lang_label["not_fired"]; + echo "(*) ".lang_string("Combined alert").""; + echo "
"; + echo ""; + echo " + + + + + + "; + + echo $string; //built table of alerts + echo "
".$lang_label["agent"]."".$lang_label["status"]."".$lang_label["type"]."".$lang_label["description"]."".$lang_label["last_fired"]."".$lang_label["times_fired"]."
"; + } + else { + echo "
". + $lang_label["no_alert"]."
"; + } +} // Main alert view ?> diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index aa5dfd9fc3..b10fe7f30d 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -29,7 +29,8 @@ if (comprueba_login() == 0) { if (mysql_num_rows ($result_t)) { echo "

".$lang_label["monitor_listing"]."

"; echo ""; - echo " + echo ""; + echo " @@ -67,8 +68,19 @@ if (comprueba_login() == 0) { else $agent_down = 0; + + + echo ""; echo "
".$lang_label["type"]."
X".$lang_label["type"]." ".$lang_label["module_name"]." ".$lang_label["description"]." ".$lang_label["status"]."
"; - + + if (($row_t["id_modulo"] != 1) AND ($row_t["id_tipo_modulo"] < 100)) { + if ($row_t["flag"] == 0){ + echo ""; + } else { + echo ""; + } + } + echo ""; echo ""; echo "".$est_modulo."" diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index fc96866fd9..f83185367e 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -78,23 +78,11 @@ if (comprueba_login() == 0) { $id_grupo = $row_t["id_grupo"]; $id_usuario=$_SESSION["id_usuario"]; if (give_acl($id_usuario, $id_grupo, "AW")==1){ - if ($row3["id_tipo_modulo"] > 4 AND ($row3["id_tipo_modulo"] < 100)){ + if (($row3["id_modulo"] != 1) AND ($row3["id_tipo_modulo"] < 100)) { if ($row3["flag"] == 0){ - echo " - "; + echo ""; } else { - echo " - "; + echo ""; } } } diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index fb55d64516..f49401e0b8 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1,19 +1,12 @@ -// Additions to Pandora FMS 1.2 graph code and new XML reporting template management -// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es -// +// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es +// Please see http://pandora.sourceforge.net for full contribution list + // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; version 2 +// as published by the Free Software Foundation for version 2. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -21,6 +14,7 @@ // 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. + // Load global vars require("include/config.php"); @@ -56,7 +50,7 @@ if (comprueba_login() == 0) { } } if (give_acl($id_usuario,$id_grupo, "AR") == 1){ - + echo "