2007-05-24 Sancho Lerena <slerena@artica.es>

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





git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@466 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-05-24 20:03:05 +00:00
parent 15ca21e72e
commit 8d0650ba2c
15 changed files with 125 additions and 56 deletions

View File

@ -1,6 +1,32 @@
2007-05-23 Sancho Lerena <slerena@artica.es> 2007-05-24 Sancho Lerena <slerena@artica.es>
* 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 <slerena@artica.es> 2007-05-22 Sancho Lerena <slerena@artica.es>
@ -13,8 +39,7 @@
* operation/agentes/estado_alertas.php: Style fix (databox). * operation/agentes/estado_alertas.php: Style fix (databox).
* operation/agentes/ver_agente.php: Now main view shows also alert * operation/agentes/ver_agente.php: Now main view shows also alert info.
info.
* operation/menu.php: Fixed SQL error when there is no data. * operation/menu.php: Fixed SQL error when there is no data.
@ -22,11 +47,10 @@
* include/styles/pandora.css: Updated footer style. * include/styles/pandora.css: Updated footer style.
* operation/estado_generalagente.php: Closed div for footer if * operation/estado_generalagente.php: Closed div for footer if agent not
agent not found. found.
* godmode/configurar_agente.php: Closed div for footer if agent * godmode/configurar_agente.php: Closed div for footer if agent not found.
not found.
2007-05-20 Sancho Lerena <slerena@artica.es> 2007-05-20 Sancho Lerena <slerena@artica.es>

View File

@ -31,10 +31,10 @@
<td class='f9b'> <td class='f9b'>
Login <br> Login <br>
<input class="login" type="text" name="nick" value=""> <input class="login" type="text" name="nick" value="demo">
<tr><td class='f9b'> <tr><td class='f9b'>
Password <br> Password <br>
<input class="login" type="password" name="pass" value=""> <input class="login" type="password" name="pass" value="demo">
<tr><td align='center'> <tr><td align='center'>
<input type="submit" class="sub next" value="Login"> <input type="submit" class="sub next" value="Login">
</table> </table>

View File

@ -25,7 +25,7 @@
// ==================================================================================== // ====================================================================================
// VIEW ALERTS // VIEW ALERTS
// ====================================================================================<br> // ====================================================================================
$sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"'; $sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"';
$result=mysql_query($sql1); $result=mysql_query($sql1);
@ -101,15 +101,15 @@ $result=mysql_query($sql1);
} }
} }
if (isset($string) & $string!='') { if (isset($string) & $string!='') {
echo "<table cellpadding='3' cellspacing='3' width='700' class='fon'> echo "<table cellpadding='4' cellspacing='4' width='720' class='databox'>
<tr><th>".$lang_label["name_type"]."</th> <tr><th>".$lang_label["name_type"]."</th>
<th>".$lang_label["alert"]."</th> <th>".$lang_label["alert"]."</th>
<th>".$lang_label["time_threshold"]."</th> <th>".$lang_label["threshold"]."</th>
<th>".$lang_label["min_max"]."</th> <th>".$lang_label["min_max"]."</th>
<th>".$lang_label["description"]."</th> <th>".$lang_label["description"]."</th>
<th width='50'>".$lang_label["action"]."</th></tr>"; <th width='50'>".$lang_label["action"]."</th></tr>";
echo $string; echo $string;
echo "<tr><td colspan='6'><div class='raya'></div></td></tr></table>"; echo "</table>";
} else { } else {
echo "<div class='nf'>".$lang_label["no_alerts"]."</div>"; echo "<div class='nf'>".$lang_label["no_alerts"]."</div>";
} }
@ -136,8 +136,8 @@ if ($update_alert != 1) {
} }
?> ?>
<input type="hidden" name="id_agente" value="<?php echo $id_agente ?>"> <input type="hidden" name="id_agente" value="<?php echo $id_agente ?>">
<table width=600 cellpadding="4" cellspacing="4" class="fon" border=0> <table width=600 cellpadding="4" cellspacing="4" class="databox_color" border=0>
<tr><td class='lb' rowspan='10' width='3'> <tr>
<td class="datos"><?php echo $lang_label["alert_type"]?> <td class="datos"><?php echo $lang_label["alert_type"]?>
<td class="datos"> <td class="datos">
<select name="tipo_alerta"> <select name="tipo_alerta">
@ -155,7 +155,14 @@ while ($row=mysql_fetch_array($result)){
<a name="alerts"> <!-- Don't Delete !! --> <a name="alerts"> <!-- Don't Delete !! -->
<tr><td class="datos2"><?php echo $lang_label["min_value"] ?> <tr><td class="datos2"><?php echo $lang_label["min_value"] ?>
<a href='#' class='tip'>&nbsp;<span> <?PHP echo $lang_label["min_valid_value_help"]; ?> </span></a>
<td class="datos2"><input type="text" name="minimo" size="5" value="<?php echo $alerta_dis_min ?>" style="margin-right: 70px;"> <td class="datos2"><input type="text" name="minimo" size="5" value="<?php echo $alerta_dis_min ?>" style="margin-right: 70px;">
<a href='#' class='tip'>&nbsp;<span>
<?PHP echo $lang_label["max_valid_value_help"]; ?>
</span></a>
<?php echo $lang_label["max_value"] ?> &nbsp;&nbsp;&nbsp; <?php echo $lang_label["max_value"] ?> &nbsp;&nbsp;&nbsp;
<input type="text" name="maximo" size="5" value="<?php echo $alerta_dis_max ?>"> <input type="text" name="maximo" size="5" value="<?php echo $alerta_dis_max ?>">
@ -188,8 +195,10 @@ _agent_<br>
_timestamp_<br> _timestamp_<br>
_data_<br> _data_<br>
</span></a> </span></a>
<td class="datos"><textarea name="campo_3" style='height:55px;' cols="36" rows="2"><?php echo $alerta_campo3 ?></textarea> <td class="datos"><textarea name="campo_3" style='height:85px;' cols="36" rows="4"><?php echo $alerta_campo3 ?></textarea>
<tr><td class="datos2"><?php echo $lang_label["time_threshold"] ?> <tr><td class="datos2"><?php echo $lang_label["time_threshold"] ?>
<a href='#' class='tip'>&nbsp;<span> <?PHP echo $lang_label["alert_time_threshold_help"]; ?> </span></a>
<td class="datos2"> <td class="datos2">
<select name="time_threshold" style="margin-right: 60px;"> <select name="time_threshold" style="margin-right: 60px;">
<?php <?php
@ -247,8 +256,9 @@ if ($update_alert != 1) {
// End block only if $creacion_agente != 1; // End block only if $creacion_agente != 1;
echo '<tr><td colspan="3"><div class="raya"></div></td></tr>'; echo "</table>";
echo '<tr><td colspan="3" align="right">'; echo '<table width=605>';
echo '<tr><td align="right">';
if ($update_alert== "1"){ if ($update_alert== "1"){
echo '<input name="updbutton" type="submit" class="sub upd" value="'.$lang_label["update"].'">'; echo '<input name="updbutton" type="submit" class="sub upd" value="'.$lang_label["update"].'">';
} else { } else {

View File

@ -64,7 +64,7 @@ echo "<h3>";
<span>'.$lang_label["help"].'</span></a>'; <span>'.$lang_label["help"].'</span></a>';
echo "</h3>"; echo "</h3>";
?> ?>
<table width="500" cellspacing="3" cellpadding="3"> <table width="500" cellspacing="4" cellpadding="4" class="databox_color">
<form name="alerta" method="post" action="index.php?sec=galertas&sec2=godmode/alertas/modificar_alerta&id_alerta=<?php echo $id_alerta ?>"> <form name="alerta" method="post" action="index.php?sec=galertas&sec2=godmode/alertas/modificar_alerta&id_alerta=<?php echo $id_alerta ?>">
@ -76,8 +76,8 @@ echo "</h3>";
echo "<input type='hidden' name='id_alerta' value='".$id_alerta."'>"; echo "<input type='hidden' name='id_alerta' value='".$id_alerta."'>";
} }
?> ?>
<tr><td class='lb' rowspan='3' width='5'>
<td class="datos"><?php echo $lang_label["alertname"] ?> <tr><td class="datos"><?php echo $lang_label["alertname"] ?>
<td class="datos"><input type="text" name="nombre" size=30 value="<?php echo $nombre ?>"> <td class="datos"><input type="text" name="nombre" size=30 value="<?php echo $nombre ?>">
<tr> <tr>
@ -97,8 +97,9 @@ _data_<br>
<td class="datos"><textarea name="descripcion" cols="50" rows="7"> <td class="datos"><textarea name="descripcion" cols="50" rows="7">
<?php echo $descripcion ?> <?php echo $descripcion ?>
</textarea> </textarea>
<tr><td colspan='3'><div class='raya'></div></td></tr> </table>
<tr><td colspan="3" align="right"> <table width=500>
<tr><td align="right">
<?php <?php
if (isset($_GET["creacion"])){ if (isset($_GET["creacion"])){
echo "<input name='crtbutton' type='submit' class='sub' value='".$lang_label["create"]."'>"; echo "<input name='crtbutton' type='submit' class='sub' value='".$lang_label["create"]."'>";

View File

@ -50,7 +50,7 @@ if ( (give_acl($id_user, 0, "LM")==1)){
echo "<h2>".$lang_label["alert_config"]."</h2>"; echo "<h2>".$lang_label["alert_config"]."</h2>";
echo "<h3>".$lang_label["alert_defined2"]."<a href='help/".$help_code."/chap3.php#3221' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>"; echo "<h3>".$lang_label["alert_defined2"]."<a href='help/".$help_code."/chap3.php#3221' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
echo "<table width='500' cellpadding='3' cellspacing='3'>"; echo "<table width='500' cellpadding='4' cellspacing='4' class='databox'>";
echo "<th width='100px'>".$lang_label["alertname"]."</th>"; echo "<th width='100px'>".$lang_label["alertname"]."</th>";
echo "<th>".$lang_label["description"]."</th>"; echo "<th>".$lang_label["description"]."</th>";
echo "<th>".$lang_label["delete"]."</th>"; echo "<th>".$lang_label["delete"]."</th>";
@ -71,8 +71,10 @@ if ( (give_acl($id_user, 0, "LM")==1)){
echo "<td class='$tdcolor' align='center'><a href='index.php?sec=gagente&sec2=godmode/alertas/modificar_alerta&borrar_alerta=".$row["id_alerta"]."' onClick='if (!confirm(\' ".$lang_label["are_you_sure"]."\')) return false;'><img border='0' src='images/cross.png'></a></td></tr>"; echo "<td class='$tdcolor' align='center'><a href='index.php?sec=gagente&sec2=godmode/alertas/modificar_alerta&borrar_alerta=".$row["id_alerta"]."' onClick='if (!confirm(\' ".$lang_label["are_you_sure"]."\')) return false;'><img border='0' src='images/cross.png'></a></td></tr>";
} }
echo "<tr><td colspan='3'><div class='raya'></div></td></tr>"; echo "</table>";
echo "<tr><td align='right' colspan='3'>"; echo "<br>";
echo "<table width=500>";
echo "<tr><td align='right'>";
echo "<form method=post action='index.php?sec=galertas&sec2=godmode/alertas/configurar_alerta&creacion=1'>"; echo "<form method=post action='index.php?sec=galertas&sec2=godmode/alertas/configurar_alerta&creacion=1'>";
echo "<input type='submit' class='sub next' name='crt' value='".$lang_label["create_alert"]."'>"; echo "<input type='submit' class='sub next' name='crt' value='".$lang_label["create_alert"]."'>";
echo "</form>"; echo "</form>";

View File

@ -20,17 +20,17 @@
// This is the base config file // This is the base config file
//Pandora Version //Pandora Version
$build_version="PC070224"; //PCyymmdd $build_version="PC070524"; //PCyymmdd
$pandora_version="v1.3 devel"; $pandora_version="v1.3 devel";
// Database configuration (default ones) // Database configuration (default ones)
//$dbname="pandora"; // MySQL DataBase //$dbname="pandora13"; // MySQL DataBase
//$dbuser="pandora"; // DB User //$dbuser="pandora"; // DB User
//$dbpassword="pandora"; // Password //$dbpassword="pandora"; // Password
//$dbhost="localhost"; // MySQL Host //$dbhost="localhost"; // MySQL Host
// This is used for reporting, please add "/" character at the end // 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 // Do not display any ERROR
//error_reporting(0); // Need to use active console at this moment //error_reporting(0); // Need to use active console at this moment
@ -55,7 +55,7 @@ if (! mysql_connect($dbhost,$dbuser,$dbpassword)){
</head><body><div align="center"> </head><body><div align="center">
<div id="db_f"> <div id="db_f">
<div> <div>
<a href="index.php"><img src="images/logo_menu.gif" border="0"></a> <a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
</div> </div>
<div id="db_ftxt"> <div id="db_ftxt">
<h1 id="db_fh1" class="error">Pandora Console Error DB-001</h1> <h1 id="db_fh1" class="error">Pandora Console Error DB-001</h1>
@ -69,7 +69,7 @@ if (! mysql_connect($dbhost,$dbuser,$dbpassword)){
</div></body></html>'); </div></body></html>');
} }
mysql_select_db($dbname); mysql_select_db($dbname);
$result2=mysql_query("SELECT * FROM tconfig"); if($result2=mysql_query("SELECT * FROM tconfig")){
while ($row2=mysql_fetch_array($result2)){ while ($row2=mysql_fetch_array($result2)){
switch ($row2["token"]) { switch ($row2["token"]) {
case "language_code": $language_code=$row2["value"]; case "language_code": $language_code=$row2["value"];
@ -92,6 +92,25 @@ while ($row2=mysql_fetch_array($result2)){
break; break;
} }
} }
} else {
exit ('<html><head><title>Pandora Error</title>
<link rel="stylesheet" href="./include/styles/pandora.css" type="text/css">
</head><body><div align="center">
<div id="db_f">
<div>
<a href="index.php"><img src="images/pandora_logo.png" border="0"></a>
</div>
<div id="db_ftxt">
<h1 id="db_fh1" class="error">Pandora Console Error DB-002</h1>
Cannot load configuration variables. Please check your database setup in the
<b>./include/config.php</b> file and read documentation.<i><br><br>
Probably database schema is created but there are no data inside it or you have a problem with DB access credentials.
</i><br>
</div>
</div></body></html>');
}
if ($language_code == 'ast_es') { if ($language_code == 'ast_es') {
$help_code='ast'; $help_code='ast';
} }

View File

@ -791,6 +791,11 @@ $lang_label["avg_only"]="Avg.Only";
$lang_label["avg_value"]="Avg. Value"; $lang_label["avg_value"]="Avg. Value";
$lang_label["auto_refresh_time"]="Autorefresh time"; $lang_label["auto_refresh_time"]="Autorefresh time";
$lang_label["refresh"]="Refresh"; $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 $lang_label;
global $help_label; global $help_label;
?> ?>

View File

@ -67,8 +67,8 @@ h1, h2, h3 {
font: bold 1em 'Trebuchet MS', Tahoma, Sans-serif; font: bold 1em 'Trebuchet MS', Tahoma, Sans-serif;
text-transform: uppercase; text-transform: uppercase;
color: #778855; color: #778855;
padding-bottom: 15px; padding-bottom: 5px;
padding-top: 10px; padding-top: 7px;
} }
h3 { h3 {
font-size: 13px; font-size: 13px;
@ -539,7 +539,9 @@ span.master, span.snmp, span.binary, span.recon {
} }
/* New styles for data box */ /* New styles for data box */
.databox, .databox_color, .databox_frame { .databox, .databox_color, .databox_frame {
margin: 10px 15px; margin-bottom: 10px;
margin-top: 5px;
margin-left: 0px;
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
} }
.databox { .databox {

View File

@ -121,7 +121,7 @@ if (isset($_GET["id_agente"])){
} else { } else {
echo "<form method='post' action='index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60'>"; echo "<form method='post' action='index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60'>";
} }
echo "<table cellpadding='3' cellspacing='3'><tr>"; echo "<table cellpadding='4' cellspacing='4' class='databox'><tr>";
echo "<td>".$lang_label["group"]."</td>"; echo "<td>".$lang_label["group"]."</td>";
echo "<td valign='middle'>"; echo "<td valign='middle'>";
echo "<select name='ag_group' onChange='javascript:this.form.submit();' class='w130'>"; echo "<select name='ag_group' onChange='javascript:this.form.submit();' class='w130'>";
@ -214,7 +214,7 @@ if (isset($_GET["id_agente"])){
echo "<img src='images/dot_green.gif'> - ".$lang_label["not_fired"]; echo "<img src='images/dot_green.gif'> - ".$lang_label["not_fired"];
echo "</td></tr></table>"; echo "</td></tr></table>";
echo "<br>"; echo "<br>";
echo "<table cellpadding='3' cellspacing='3' width='700'>"; echo "<table cellpadding='4' cellspacing='4' width='700' class='databox'>";
echo "<tr> echo "<tr>
<th>".$lang_label["agent"]."</th> <th>".$lang_label["agent"]."</th>
<th>".$lang_label["type"]."</th> <th>".$lang_label["type"]."</th>
@ -223,8 +223,7 @@ if (isset($_GET["id_agente"])){
<th>".$lang_label["times_fired"]."</th> <th>".$lang_label["times_fired"]."</th>
<th>".$lang_label["status"]."</th>"; <th>".$lang_label["status"]."</th>";
echo $string; //built table of alerts echo $string; //built table of alerts
echo "<tr><td colspan='6'><div class='raya'></div></td></tr> echo "</table>";
</table>";
} }
else { else {
echo "</table><br><div class='nf'>". echo "</table><br><div class='nf'>".

View File

@ -38,7 +38,7 @@ if (comprueba_login() == 0) {
$color=0; $color=0;
while ($row_t=mysql_fetch_array($result_t)){ while ($row_t=mysql_fetch_array($result_t)){
# For evey module in the status table # 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_tipo = dame_nombre_tipo_modulo($row_t["id_tipo_modulo"]);
$est_description = $row_t["descripcion"]; $est_description = $row_t["descripcion"];
$est_timestamp = $row_t["timestamp"]; $est_timestamp = $row_t["timestamp"];
@ -67,7 +67,9 @@ if (comprueba_login() == 0) {
else else
$agent_down = 0; $agent_down = 0;
echo "<tr><td class='".$tdcolor."'>".$est_tipo."</td>"; echo "<tr><td class='".$tdcolor."'>";
echo "<img src='images/".show_icon_type($row_t["id_tipo_modulo"])."' border=0>";
echo "<td class='".$tdcolor."'>".$est_modulo."</td>"; echo "<td class='".$tdcolor."'>".$est_modulo."</td>";
echo "<td class='".$tdcolor."f9'>" echo "<td class='".$tdcolor."f9'>"
.substr($est_description,0,32)."</td>"; .substr($est_description,0,32)."</td>";

View File

@ -132,7 +132,6 @@ if (comprueba_login() == 0) {
<b>".$nombre_grupomodulo."</b>"; <b>".$nombre_grupomodulo."</b>";
} }
} }
$nombre_tipo_modulo = dame_nombre_tipo_modulo($row3["id_tipo_modulo"]); $nombre_tipo_modulo = dame_nombre_tipo_modulo($row3["id_tipo_modulo"]);
echo "<td class='".$tdcolor."_id' title='".salida_limpia($row3["nombre"])."'>"; echo "<td class='".$tdcolor."_id' title='".salida_limpia($row3["nombre"])."'>";
echo salida_limpia(substr($row3["nombre"],0,15)); echo salida_limpia(substr($row3["nombre"],0,15));

View File

@ -149,6 +149,7 @@ if (comprueba_login() == 0) {
$total_modules = $row2[0]; $total_modules = $row2[0];
if ($total_modules == 0) if ($total_modules == 0)
$percentil = 0; $percentil = 0;
else
$percentil = $modules_server / ($total_modules / 100); $percentil = $modules_server / ($total_modules / 100);
$total_modules_temp = $total_modules; $total_modules_temp = $total_modules;
} }

View File

@ -127,7 +127,7 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
echo "<td class='$tdcolor'>"; echo "<td class='$tdcolor'>";
if (give_acl($id_user, 0, "PM")==1){ if (give_acl($id_user, 0, "PM")==1){
echo "<a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update=$id_rt'>"; echo "<a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update=$id_rt'>";
echo "<img src='../images/wrench_orange.png'></A>"; echo "<img src='images/wrench_orange.png'></A>";
} }
} }
echo "</table>"; echo "</table>";

View File

@ -94,7 +94,7 @@ while ($row = mysql_fetch_array($res)){
if (($link_layout == "") OR ($link_layout == 0)){ if (($link_layout == "") OR ($link_layout == 0)){
$link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>"; $link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>";
} else { } else {
$link_string = "<a href='http://localhost/pandora_console/index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$link_layout'>"; $link_string = "<a href='index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$link_layout'>";
} }
// Draw image // Draw image
echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>"; echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>";
@ -117,7 +117,7 @@ while ($row = mysql_fetch_array($res)){
if (($link_layout == "") OR ($link_layout == 0)){ if (($link_layout == "") OR ($link_layout == 0)){
$link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>"; $link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>";
} else { } else {
$link_string = "<a href='http://localhost/pandora_console/index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$link_layout'>"; $link_string = "<a href='http://index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$link_layout'>";
} }
// Draw image // Draw image
echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>"; echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>";

View File

@ -542,11 +542,16 @@ function grafico_modulo_sparse ( $id_agente_modulo, $periodo, $show_event,
$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y);
$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'format_for_graph')); $AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'format_for_graph'));
$AxisY->setLabelOption("showtext",true); $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); $AxisY->showLabel(IMAGE_GRAPH_LABEL_ZERO);
if ($unit_name != "") if ($unit_name != "")
$AxisY->setTitle($unit_name, 'vertical'); $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->forceMinimum($minvalue);
$AxisY->forceMaximum($max_value+($max_value/12)) ; $AxisY->forceMaximum($max_value+($max_value/12)) ;
$GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY); $GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY);