2007-07-23 Sancho Lerena <slerena@artica.es>

* 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@574 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-07-23 11:02:31 +00:00
parent 22dcefdde2
commit 6a64b81dda
3 changed files with 20 additions and 12 deletions

View File

@ -1,3 +1,10 @@
2007-07-23 Sancho Lerena <slerena@artica.es>
* 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 <slerena@artica.es>
* operation/servers/view_server.php: Fixed bug with Data Server lag check

View File

@ -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 "<br>";
$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");
}
?>
?>

View File

@ -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);
}
}
}
}