diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-07-26 06:29:08 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-07-26 06:29:08 +0000 |
commit | a92a8524d8ed82855ea113e50e6894684e87ae9d (patch) | |
tree | 5c7fb36b8b92f3324641c04c2a2529529fbf5a03 /frontends/php/chart3.php | |
parent | f54cd33a46be956ce776c16bc63e32a4db3d0a7c (diff) | |
download | zabbix-a92a8524d8ed82855ea113e50e6894684e87ae9d.tar.gz zabbix-a92a8524d8ed82855ea113e50e6894684e87ae9d.tar.xz zabbix-a92a8524d8ed82855ea113e50e6894684e87ae9d.zip |
Host selection for availability report.
git-svn-id: svn://svn.zabbix.com/trunk@443 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart3.php')
-rw-r--r-- | frontends/php/chart3.php | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/frontends/php/chart3.php b/frontends/php/chart3.php index d5fe159b..e32b3787 100644 --- a/frontends/php/chart3.php +++ b/frontends/php/chart3.php @@ -69,7 +69,7 @@ $now = time(NULL); $to_time=$now; - $from_time=$to_time-24*3600; + $from_time=$to_time-7*24*3600; $count=array(); $min=array(); @@ -80,36 +80,17 @@ while($row=DBfetch($result)) { $value=$row["value"]; - $i=intval(900*($from_time-$row["clock"])/($from_time-$to_time)); + $i=intval( 900*($from_time-$row["clock"])/($from_time-$to_time)); if( (!isset($max[$i])) || ($max[$i]<$value)) { $max[$i]=$value; } if(!isset($min[$i]) || ($min[$i]>$value)) $min[$i]=$value; -// $min[$i]=0; $avg[$i]=0; -// $max[$i]=$row["value"]; -// echo "$from_time $to_time ".$row["clock"]," ",($from_time-$row["clock"])/($from_time-$to_time),"<br>"; -// echo intval(900*($from_time-$row["clock"])/($from_time-$to_time)),"<br>"; -// $max[$row["clock"]%900]=$row["value"]; -// $avg[$row["clock"]%900]=$row["value"]; $count[$i]=1; + $nodata=0; } - $nodata=0; - -/* for($i=0;$i<900;$i++) - { - $result=DBselect("select count(value),min(value),max(value),avg(value) from history where itemid=$itemid and clock>$from_time+$i*($to_time-$from_time)/(900-50) and clock<$from_time+($i+1)*($to_time-$from_time)/(900-50)"); - $count[$i]=DBget_field($result,0,0); - if($count[$i]>0) - { - $min[$i]=DBget_field($result,0,1); - $max[$i]=DBget_field($result,0,2); - $avg[$i]=DBget_field($result,0,3); - $nodata=0; - } - }*/ for($i=0;$i<=$sizeY;$i+=50) { |