mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
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:
parent
41c2a9edec
commit
cd26d7be79
@ -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>
|
2007-07-20 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* operation/servers/view_server.php: Fixed bug with Data Server lag check
|
* operation/servers/view_server.php: Fixed bug with Data Server lag check
|
||||||
|
@ -94,7 +94,7 @@ if (comprueba_login() == 0)
|
|||||||
while ($row=mysql_fetch_array($result_t)){
|
while ($row=mysql_fetch_array($result_t)){
|
||||||
echo $lang_label["deleting_records"].dame_nombre_modulo_agentemodulo($row["id_agente_modulo"]);
|
echo $lang_label["deleting_records"].dame_nombre_modulo_agentemodulo($row["id_agente_modulo"]);
|
||||||
flush();
|
flush();
|
||||||
ob_flush();
|
//ob_flush();
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
$query = "DELETE FROM tagente_datos WHERE id_agente_modulo = ".$row["id_agente_modulo"]." and timestamp < '".$from_date."'";
|
$query = "DELETE FROM tagente_datos WHERE id_agente_modulo = ".$row["id_agente_modulo"]." and timestamp < '".$from_date."'";
|
||||||
mysql_query($query);
|
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");
|
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access to Database Purge Section");
|
||||||
include ("general/noaccess.php");
|
include ("general/noaccess.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");
|
include ("../include/config.php");
|
||||||
require_once 'Image/Graph.php';
|
require_once 'Image/Graph.php';
|
||||||
require ("../include/languages/language_".$language_code.".php");
|
require ("../include/languages/language_".$language_code.".php");
|
||||||
|
|
||||||
$ajuste_altura = sizeof($data) * 20;
|
if (sizeof($data) > 10){
|
||||||
if (sizeof($data) > 10){
|
$height = sizeof($legend) * 20;
|
||||||
$height = $height + $ajuste_altura;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// create the graph
|
// create the graph
|
||||||
$Graph =& Image_Graph::factory('graph', array($width, $height));
|
$Graph =& Image_Graph::factory('graph', array($width, $height));
|
||||||
// add a TrueType font
|
// add a TrueType font
|
||||||
$Font =& $Graph->addNew('font', $config_fontpath);
|
$Font =& $Graph->addNew('font', $config_fontpath);
|
||||||
// set the font size to 11 pixels
|
$Font->setSize(9);
|
||||||
$Font->setSize(8);
|
|
||||||
$Graph->setFont($Font);
|
$Graph->setFont($Font);
|
||||||
$Graph->add(
|
$Graph->add(
|
||||||
Image_Graph::vertical (
|
Image_Graph::vertical (
|
||||||
@ -1232,7 +1230,7 @@ function generic_bar_graph ( $width =380, $height = 300, $data, $legend) {
|
|||||||
// Merge data into a dataset object (sancho)
|
// Merge data into a dataset object (sancho)
|
||||||
$Dataset1 =& Image_Graph::factory('dataset');
|
$Dataset1 =& Image_Graph::factory('dataset');
|
||||||
for ($a=0;$a < sizeof($data); $a++){
|
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);
|
$Plot =& $Plotarea->addNew('bar', $Dataset1);
|
||||||
$GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY);
|
$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"];
|
$sql1="SELECT COUNT(id_agente) FROM tagente_datos WHERE id_agente = ".$row["id_agente"];
|
||||||
$result3=mysql_query($sql1);
|
$result3=mysql_query($sql1);
|
||||||
if ($row3=mysql_fetch_array($result3)){
|
if ($row3=mysql_fetch_array($result3)){
|
||||||
$data[]= $row3[0];
|
$agent_name = dame_nombre_agente($row[0]);
|
||||||
$legend[] = str_pad(dame_nombre_agente($row[0]),15);
|
if ($agent_name != ""){
|
||||||
|
$data[]= $row3[0];
|
||||||
|
$legend[] = str_pad($agent_name,15);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user