diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4626d74821..f69e462215 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,6 +1,32 @@ -2007-05-23 Sancho Lerena +2007-05-24 Sancho Lerena - * pandoradb.sql: Added field to tlayout_data (no_link_color) + * include/styles/pandora.css: Some margin adjustements for databox + classes and H1-3. + + * include/config.inc.php: Added support to detect empty + configuration tokens in DB and abort. + + * include/languages/language_en.php: More strings. + + * operation/visual_console/render_view.php: Fixed static links to + images. + + * operation/agentes/estado_alertas.php: Databox style fixed. + + * operation/agentes/estado_monitores.php: Added image instead + label. + + * operation/servers/view_server.php: Fixed divbyzero notice. + + * operation/servers/view_server_detail.php: Fixed static image URL. + + * reporting/fgraph.php: Fixed distribution of X axis ticks. + + * general/login_page.php: Added "demo" user by default. + + * godmode/agentes/alert_manager.php, + godmode/alertas/modificar_alerta.php + godmode/alertas/configurar_alerta.php: Style 'databox' update. 2007-05-22 Sancho Lerena @@ -13,8 +39,7 @@ * operation/agentes/estado_alertas.php: Style fix (databox). - * operation/agentes/ver_agente.php: Now main view shows also alert - info. + * operation/agentes/ver_agente.php: Now main view shows also alert info. * operation/menu.php: Fixed SQL error when there is no data. @@ -22,11 +47,10 @@ * include/styles/pandora.css: Updated footer style. - * operation/estado_generalagente.php: Closed div for footer if - agent not found. + * operation/estado_generalagente.php: Closed div for footer if agent not + found. - * godmode/configurar_agente.php: Closed div for footer if agent - not found. + * godmode/configurar_agente.php: Closed div for footer if agent not found. 2007-05-20 Sancho Lerena diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 6e529aa6e8..6dc71f4f73 100644 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -31,10 +31,10 @@ Login
- + Password
- + @@ -43,4 +43,4 @@
'.$REMOTE_ADDR.''; ?>
- \ No newline at end of file + diff --git a/pandora_console/godmode/agentes/alert_manager.php b/pandora_console/godmode/agentes/alert_manager.php index 02ac7ee4b8..f79f80c316 100644 --- a/pandora_console/godmode/agentes/alert_manager.php +++ b/pandora_console/godmode/agentes/alert_manager.php @@ -25,7 +25,7 @@ // ==================================================================================== // VIEW ALERTS -// ====================================================================================
+// ==================================================================================== $sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"'; $result=mysql_query($sql1); @@ -101,15 +101,15 @@ $result=mysql_query($sql1); } } if (isset($string) & $string!='') { - echo " + echo "
- + "; echo $string; - echo "
".$lang_label["name_type"]." ".$lang_label["alert"]."".$lang_label["time_threshold"]."".$lang_label["threshold"]." ".$lang_label["min_max"]." ".$lang_label["description"]." ".$lang_label["action"]."
"; + echo ""; } else { echo "
".$lang_label["no_alerts"]."
"; } @@ -136,8 +136,8 @@ if ($update_alert != 1) { } ?> - -
+ +'; -echo '
+  + + +  + + +     @@ -188,8 +195,10 @@ _agent_
_timestamp_
_data_
-
+
+  +
'; +echo "
"; +echo ''; +echo '"; + echo ""; echo ""; diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index ef2252739d..59f0c51018 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -132,7 +132,6 @@ if (comprueba_login() == 0) { ".$nombre_grupomodulo.""; } } - $nombre_tipo_modulo = dame_nombre_tipo_modulo($row3["id_tipo_modulo"]); echo "
'; if ($update_alert== "1"){ echo ''; } else { diff --git a/pandora_console/godmode/alertas/configurar_alerta.php b/pandora_console/godmode/alertas/configurar_alerta.php index 14e00eeb32..1c1c37fc9d 100644 --- a/pandora_console/godmode/alertas/configurar_alerta.php +++ b/pandora_console/godmode/alertas/configurar_alerta.php @@ -64,7 +64,7 @@ echo "

"; '.$lang_label["help"].''; echo "

"; ?> - +
@@ -76,8 +76,8 @@ echo ""; echo ""; } ?> - @@ -97,8 +97,9 @@ _data_
-
- + +
-
+
+ +
"; @@ -115,4 +116,4 @@ else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management"); require ("general/noaccess.php"); } -?> \ No newline at end of file +?> diff --git a/pandora_console/godmode/alertas/modificar_alerta.php b/pandora_console/godmode/alertas/modificar_alerta.php index 785dbf024f..2b9e45b343 100644 --- a/pandora_console/godmode/alertas/modificar_alerta.php +++ b/pandora_console/godmode/alertas/modificar_alerta.php @@ -50,7 +50,7 @@ if ( (give_acl($id_user, 0, "LM")==1)){ echo "

".$lang_label["alert_config"]."

"; echo "

".$lang_label["alert_defined2"]." ".$lang_label["help"]."

"; - echo ""; + echo "
"; echo ""; echo ""; echo ""; @@ -70,9 +70,11 @@ if ( (give_acl($id_user, 0, "LM")==1)){ echo ""; echo ""; } - - echo ""; - echo "
".$lang_label["alertname"]."".$lang_label["description"]."".$lang_label["delete"]."".$row["descripcion"]."
"; + + echo "
"; + echo "
"; + echo ""; + echo "
"; echo ""; echo ""; echo ""; @@ -83,4 +85,4 @@ else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management"); require ("general/noaccess.php"); } -?> \ No newline at end of file +?> diff --git a/pandora_console/include/config.inc.php b/pandora_console/include/config.inc.php index 8ecac9e55b..d3ef5fa45a 100644 --- a/pandora_console/include/config.inc.php +++ b/pandora_console/include/config.inc.php @@ -20,17 +20,17 @@ // This is the base config file //Pandora Version -$build_version="PC070224"; //PCyymmdd +$build_version="PC070524"; //PCyymmdd $pandora_version="v1.3 devel"; // Database configuration (default ones) -//$dbname="pandora"; // MySQL DataBase +//$dbname="pandora13"; // MySQL DataBase //$dbuser="pandora"; // DB User //$dbpassword="pandora"; // Password //$dbhost="localhost"; // MySQL Host // This is used for reporting, please add "/" character at the end -//$config_homedir = "/var/www/pandora_console/"; +//$config_homedir = "/var/www/pandora2/"; // Do not display any ERROR //error_reporting(0); // Need to use active console at this moment @@ -55,7 +55,7 @@ if (! mysql_connect($dbhost,$dbuser,$dbpassword)){
- +

Pandora Console Error DB-001

@@ -69,9 +69,9 @@ if (! mysql_connect($dbhost,$dbuser,$dbpassword)){
'); } mysql_select_db($dbname); -$result2=mysql_query("SELECT * FROM tconfig"); -while ($row2=mysql_fetch_array($result2)){ - switch ($row2["token"]) { +if($result2=mysql_query("SELECT * FROM tconfig")){ + while ($row2=mysql_fetch_array($result2)){ + switch ($row2["token"]) { case "language_code": $language_code=$row2["value"]; break; case "block_size": $block_size=$row2["value"]; @@ -90,11 +90,30 @@ while ($row2=mysql_fetch_array($result2)){ break; case "bgimage": $config_bgimage=$row2["value"]; break; + } } -} +} else { + exit ('Pandora Error + +
+
+
+ +
+
+

Pandora Console Error DB-002

+ Cannot load configuration variables. Please check your database setup in the + ./include/config.php file and read documentation.

+ Probably database schema is created but there are no data inside it or you have a problem with DB access credentials. +

+
+
'); +} + + if ($language_code == 'ast_es') { $help_code='ast'; } else $help_code = substr($language_code,0,2); -?> \ No newline at end of file +?> diff --git a/pandora_console/include/languages/language_en.php b/pandora_console/include/languages/language_en.php index eab6b85783..d26c576779 100644 --- a/pandora_console/include/languages/language_en.php +++ b/pandora_console/include/languages/language_en.php @@ -791,6 +791,11 @@ $lang_label["avg_only"]="Avg.Only"; $lang_label["avg_value"]="Avg. Value"; $lang_label["auto_refresh_time"]="Autorefresh time"; $lang_label["refresh"]="Refresh"; +$lang_label["threshold"]="Threshold"; +$lang_label["min_valid_value_help"]="Min. possible value to consider 'valid' values, below this limit, Pandora FMS will fire the alert"; +$lang_label["max_valid_value_help"]="Max. possible value to consider 'valid' values, above this limit, Pandora FMS will fire the alert"; +$lang_label["alert_time_threshold_help"]="This value must be al least Module Interval * (Min.Number of Alerts + 1)"; + global $lang_label; global $help_label; ?> diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 92e6977ccc..051c78525a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -67,8 +67,8 @@ h1, h2, h3 { font: bold 1em 'Trebuchet MS', Tahoma, Sans-serif; text-transform: uppercase; color: #778855; - padding-bottom: 15px; - padding-top: 10px; + padding-bottom: 5px; + padding-top: 7px; } h3 { font-size: 13px; @@ -539,7 +539,9 @@ span.master, span.snmp, span.binary, span.recon { } /* New styles for data box */ .databox, .databox_color, .databox_frame { - margin: 10px 15px; + margin-bottom: 10px; + margin-top: 5px; + margin-left: 0px; border: 1px solid #f2f2f2; } .databox { diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php index 89f17eeddf..19ca67cc7a 100644 --- a/pandora_console/operation/agentes/estado_alertas.php +++ b/pandora_console/operation/agentes/estado_alertas.php @@ -121,7 +121,7 @@ if (isset($_GET["id_agente"])){ } else { echo "
"; } - echo ""; + echo "
"; echo ""; echo "
".$lang_label["group"].""; echo "
"; echo "
"; - echo ""; + echo "
"; echo " @@ -223,8 +223,7 @@ if (isset($_GET["id_agente"])){ "; echo $string; //built table of alerts - echo " -
".$lang_label["agent"]." ".$lang_label["type"]."".$lang_label["times_fired"]." ".$lang_label["status"]."
"; + echo "
"; } else { echo "

". diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index 8c654f615e..5a9029be3c 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -38,7 +38,7 @@ if (comprueba_login() == 0) { $color=0; while ($row_t=mysql_fetch_array($result_t)){ # For evey module in the status table - $est_modulo = $row_t["nombre"]; + $est_modulo = substr($row_t["nombre"],0,25); $est_tipo = dame_nombre_tipo_modulo($row_t["id_tipo_modulo"]); $est_description = $row_t["descripcion"]; $est_timestamp = $row_t["timestamp"]; @@ -67,7 +67,9 @@ if (comprueba_login() == 0) { else $agent_down = 0; - echo "
".$est_tipo."
"; + + echo ""; echo "".$est_modulo."" .substr($est_description,0,32).""; echo salida_limpia(substr($row3["nombre"],0,15)); diff --git a/pandora_console/operation/servers/view_server.php b/pandora_console/operation/servers/view_server.php index 7d57a79116..e13115e24f 100644 --- a/pandora_console/operation/servers/view_server.php +++ b/pandora_console/operation/servers/view_server.php @@ -149,7 +149,8 @@ if (comprueba_login() == 0) { $total_modules = $row2[0]; if ($total_modules == 0) $percentil = 0; - $percentil = $modules_server / ($total_modules / 100); + else + $percentil = $modules_server / ($total_modules / 100); $total_modules_temp = $total_modules; } else diff --git a/pandora_console/operation/servers/view_server_detail.php b/pandora_console/operation/servers/view_server_detail.php index 2acab184ca..d3efc0cf8f 100644 --- a/pandora_console/operation/servers/view_server_detail.php +++ b/pandora_console/operation/servers/view_server_detail.php @@ -127,7 +127,7 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) { echo ""; if (give_acl($id_user, 0, "PM")==1){ echo ""; - echo ""; + echo ""; } } echo "
"; diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index d788f6e9db..efe645af20 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -94,7 +94,7 @@ while ($row = mysql_fetch_array($res)){ if (($link_layout == "") OR ($link_layout == 0)){ $link_string = ""; } else { - $link_string = ""; + $link_string = ""; } // Draw image echo "
"; @@ -117,7 +117,7 @@ while ($row = mysql_fetch_array($res)){ if (($link_layout == "") OR ($link_layout == 0)){ $link_string = ""; } else { - $link_string = ""; + $link_string = ""; } // Draw image echo "
"; diff --git a/pandora_console/reporting/fgraph.php b/pandora_console/reporting/fgraph.php index 0268cf6564..a0a3c77ca9 100644 --- a/pandora_console/reporting/fgraph.php +++ b/pandora_console/reporting/fgraph.php @@ -542,11 +542,16 @@ function grafico_modulo_sparse ( $id_agente_modulo, $periodo, $show_event, $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); $AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'format_for_graph')); $AxisY->setLabelOption("showtext",true); - $AxisY->setLabelInterval(ceil($max_value / 5)); + $yinterval = $height / 30; + $AxisY->setLabelInterval(ceil($max_value / $yinterval)); $AxisY->showLabel(IMAGE_GRAPH_LABEL_ZERO); if ($unit_name != "") $AxisY->setTitle($unit_name, 'vertical'); - $AxisX->setLabelInterval($resolution / 10); + if ($periodo < 10000) + $xinterval = 8; + else + $xinterval = $resolution / 7 ; + $AxisX->setLabelInterval($xinterval) ; //$AxisY->forceMinimum($minvalue); $AxisY->forceMaximum($max_value+($max_value/12)) ; $GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY);