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:
parent
307479e4d7
commit
d22ac30999
|
@ -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>
|
||||
|
||||
|
@ -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 <slerena@artica.es>
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
<td class='f9b'>
|
||||
Login <br>
|
||||
|
||||
<input class="login" type="text" name="nick" value="">
|
||||
<input class="login" type="text" name="nick" value="demo">
|
||||
<tr><td class='f9b'>
|
||||
Password <br>
|
||||
<input class="login" type="password" name="pass" value="">
|
||||
<input class="login" type="password" name="pass" value="demo">
|
||||
<tr><td align='center'>
|
||||
<input type="submit" class="sub next" value="Login">
|
||||
</table>
|
||||
|
@ -43,4 +43,4 @@
|
|||
<div id="ip"><?php echo 'IP: <b class="f10">'.$REMOTE_ADDR.'</b>'; ?></div>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
</center>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
// ====================================================================================
|
||||
// VIEW ALERTS
|
||||
// ====================================================================================<br>
|
||||
// ====================================================================================
|
||||
|
||||
$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 "<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>
|
||||
<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["description"]."</th>
|
||||
<th width='50'>".$lang_label["action"]."</th></tr>";
|
||||
echo $string;
|
||||
echo "<tr><td colspan='6'><div class='raya'></div></td></tr></table>";
|
||||
echo "</table>";
|
||||
} else {
|
||||
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 ?>">
|
||||
<table width=600 cellpadding="4" cellspacing="4" class="fon" border=0>
|
||||
<tr><td class='lb' rowspan='10' width='3'>
|
||||
<table width=600 cellpadding="4" cellspacing="4" class="databox_color" border=0>
|
||||
<tr>
|
||||
<td class="datos"><?php echo $lang_label["alert_type"]?>
|
||||
<td class="datos">
|
||||
<select name="tipo_alerta">
|
||||
|
@ -155,7 +155,14 @@ while ($row=mysql_fetch_array($result)){
|
|||
<a name="alerts"> <!-- Don't Delete !! -->
|
||||
|
||||
<tr><td class="datos2"><?php echo $lang_label["min_value"] ?>
|
||||
<a href='#' class='tip'> <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;">
|
||||
|
||||
<a href='#' class='tip'> <span>
|
||||
<?PHP echo $lang_label["max_valid_value_help"]; ?>
|
||||
</span></a>
|
||||
|
||||
<?php echo $lang_label["max_value"] ?>
|
||||
<input type="text" name="maximo" size="5" value="<?php echo $alerta_dis_max ?>">
|
||||
|
||||
|
@ -188,8 +195,10 @@ _agent_<br>
|
|||
_timestamp_<br>
|
||||
_data_<br>
|
||||
</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"] ?>
|
||||
<a href='#' class='tip'> <span> <?PHP echo $lang_label["alert_time_threshold_help"]; ?> </span></a>
|
||||
|
||||
<td class="datos2">
|
||||
<select name="time_threshold" style="margin-right: 60px;">
|
||||
<?php
|
||||
|
@ -247,8 +256,9 @@ if ($update_alert != 1) {
|
|||
|
||||
// End block only if $creacion_agente != 1;
|
||||
|
||||
echo '<tr><td colspan="3"><div class="raya"></div></td></tr>';
|
||||
echo '<tr><td colspan="3" align="right">';
|
||||
echo "</table>";
|
||||
echo '<table width=605>';
|
||||
echo '<tr><td align="right">';
|
||||
if ($update_alert== "1"){
|
||||
echo '<input name="updbutton" type="submit" class="sub upd" value="'.$lang_label["update"].'">';
|
||||
} else {
|
||||
|
|
|
@ -64,7 +64,7 @@ echo "<h3>";
|
|||
<span>'.$lang_label["help"].'</span></a>';
|
||||
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 ?>">
|
||||
|
||||
|
@ -76,8 +76,8 @@ echo "</h3>";
|
|||
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 ?>">
|
||||
|
||||
<tr>
|
||||
|
@ -97,8 +97,9 @@ _data_<br>
|
|||
<td class="datos"><textarea name="descripcion" cols="50" rows="7">
|
||||
<?php echo $descripcion ?>
|
||||
</textarea>
|
||||
<tr><td colspan='3'><div class='raya'></div></td></tr>
|
||||
<tr><td colspan="3" align="right">
|
||||
</table>
|
||||
<table width=500>
|
||||
<tr><td align="right">
|
||||
<?php
|
||||
if (isset($_GET["creacion"])){
|
||||
echo "<input name='crtbutton' type='submit' class='sub' value='".$lang_label["create"]."'>";
|
||||
|
@ -115,4 +116,4 @@ else {
|
|||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management");
|
||||
require ("general/noaccess.php");
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -50,7 +50,7 @@ if ( (give_acl($id_user, 0, "LM")==1)){
|
|||
|
||||
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'> <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>".$lang_label["description"]."</th>";
|
||||
echo "<th>".$lang_label["delete"]."</th>";
|
||||
|
@ -70,9 +70,11 @@ if ( (give_acl($id_user, 0, "LM")==1)){
|
|||
echo "<td class='$tdcolor'>".$row["descripcion"]."</td>";
|
||||
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 "<tr><td align='right' colspan='3'>";
|
||||
|
||||
echo "</table>";
|
||||
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 "<input type='submit' class='sub next' name='crt' value='".$lang_label["create_alert"]."'>";
|
||||
echo "</form>";
|
||||
|
@ -83,4 +85,4 @@ else {
|
|||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management");
|
||||
require ("general/noaccess.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)){
|
|||
</head><body><div align="center">
|
||||
<div id="db_f">
|
||||
<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 id="db_ftxt">
|
||||
<h1 id="db_fh1" class="error">Pandora Console Error DB-001</h1>
|
||||
|
@ -69,9 +69,9 @@ if (! mysql_connect($dbhost,$dbuser,$dbpassword)){
|
|||
</div></body></html>');
|
||||
}
|
||||
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 ('<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') {
|
||||
$help_code='ast';
|
||||
}
|
||||
else $help_code = substr($language_code,0,2);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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;
|
||||
?>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -121,7 +121,7 @@ if (isset($_GET["id_agente"])){
|
|||
} else {
|
||||
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 valign='middle'>";
|
||||
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 "</td></tr></table>";
|
||||
echo "<br>";
|
||||
echo "<table cellpadding='3' cellspacing='3' width='700'>";
|
||||
echo "<table cellpadding='4' cellspacing='4' width='700' class='databox'>";
|
||||
echo "<tr>
|
||||
<th>".$lang_label["agent"]."</th>
|
||||
<th>".$lang_label["type"]."</th>
|
||||
|
@ -223,8 +223,7 @@ if (isset($_GET["id_agente"])){
|
|||
<th>".$lang_label["times_fired"]."</th>
|
||||
<th>".$lang_label["status"]."</th>";
|
||||
echo $string; //built table of alerts
|
||||
echo "<tr><td colspan='6'><div class='raya'></div></td></tr>
|
||||
</table>";
|
||||
echo "</table>";
|
||||
}
|
||||
else {
|
||||
echo "</table><br><div class='nf'>".
|
||||
|
|
|
@ -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 "<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."f9'>"
|
||||
.substr($est_description,0,32)."</td>";
|
||||
|
|
|
@ -132,7 +132,6 @@ if (comprueba_login() == 0) {
|
|||
<b>".$nombre_grupomodulo."</b>";
|
||||
}
|
||||
}
|
||||
|
||||
$nombre_tipo_modulo = dame_nombre_tipo_modulo($row3["id_tipo_modulo"]);
|
||||
echo "<td class='".$tdcolor."_id' title='".salida_limpia($row3["nombre"])."'>";
|
||||
echo salida_limpia(substr($row3["nombre"],0,15));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -127,7 +127,7 @@ if ((comprueba_login() == 0) AND (give_acl($id_user, 0, "AR")==1) ) {
|
|||
echo "<td class='$tdcolor'>";
|
||||
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 "<img src='../images/wrench_orange.png'></A>";
|
||||
echo "<img src='images/wrench_orange.png'></A>";
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
|
|
|
@ -94,7 +94,7 @@ while ($row = mysql_fetch_array($res)){
|
|||
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'>";
|
||||
} 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
|
||||
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)){
|
||||
$link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>";
|
||||
} 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
|
||||
echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>";
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue