diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cac743160c..ac6e9e6055 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2007-07-23 Sancho Lerena + + * reporting/fgraph.php: Fixed problem in db information graphs due a + problem checking height and getting data on orphan data modules. + + * godmode/db/db_purge.php: Fixed notice warning for ob_fush() call. + 2007-07-20 Sancho Lerena * operation/servers/view_server.php: Fixed bug with Data Server lag check diff --git a/pandora_console/godmode/db/db_purge.php b/pandora_console/godmode/db/db_purge.php index fdc9a0bc72..6a2d7d7ff9 100644 --- a/pandora_console/godmode/db/db_purge.php +++ b/pandora_console/godmode/db/db_purge.php @@ -94,7 +94,7 @@ if (comprueba_login() == 0) while ($row=mysql_fetch_array($result_t)){ echo $lang_label["deleting_records"].dame_nombre_modulo_agentemodulo($row["id_agente_modulo"]); flush(); - ob_flush(); + //ob_flush(); echo "
"; $query = "DELETE FROM tagente_datos WHERE id_agente_modulo = ".$row["id_agente_modulo"]." and timestamp < '".$from_date."'"; mysql_query($query); @@ -248,4 +248,4 @@ if (comprueba_login() == 0) audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access to Database Purge Section"); include ("general/noaccess.php"); } -?> \ No newline at end of file +?> diff --git a/pandora_console/reporting/fgraph.php b/pandora_console/reporting/fgraph.php index d6c7172ce8..13c293b181 100644 --- a/pandora_console/reporting/fgraph.php +++ b/pandora_console/reporting/fgraph.php @@ -1202,22 +1202,20 @@ function grafico_eventos_grupo ($width = 300, $height = 200 ) { } -function generic_bar_graph ( $width =380, $height = 300, $data, $legend) { +function generic_bar_graph ( $width =380, $height = 200, $data, $legend) { include ("../include/config.php"); require_once 'Image/Graph.php'; require ("../include/languages/language_".$language_code.".php"); - $ajuste_altura = sizeof($data) * 20; - if (sizeof($data) > 10){ - $height = $height + $ajuste_altura; - } + if (sizeof($data) > 10){ + $height = sizeof($legend) * 20; + } // create the graph $Graph =& Image_Graph::factory('graph', array($width, $height)); // add a TrueType font $Font =& $Graph->addNew('font', $config_fontpath); - // set the font size to 11 pixels - $Font->setSize(8); + $Font->setSize(9); $Graph->setFont($Font); $Graph->add( Image_Graph::vertical ( @@ -1232,7 +1230,7 @@ function generic_bar_graph ( $width =380, $height = 300, $data, $legend) { // Merge data into a dataset object (sancho) $Dataset1 =& Image_Graph::factory('dataset'); for ($a=0;$a < sizeof($data); $a++){ - $Dataset1->addPoint(str_pad($legend[$a],15), $data[$a]); + $Dataset1->addPoint(substr($legend[$a],0,22), $data[$a]); } $Plot =& $Plotarea->addNew('bar', $Dataset1); $GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY); @@ -1256,8 +1254,11 @@ function grafico_db_agentes_paquetes ($width = 380, $height = 300) { $sql1="SELECT COUNT(id_agente) FROM tagente_datos WHERE id_agente = ".$row["id_agente"]; $result3=mysql_query($sql1); if ($row3=mysql_fetch_array($result3)){ - $data[]= $row3[0]; - $legend[] = str_pad(dame_nombre_agente($row[0]),15); + $agent_name = dame_nombre_agente($row[0]); + if ($agent_name != ""){ + $data[]= $row3[0]; + $legend[] = str_pad($agent_name,15); + } } } }