cleanups in device graphs

git-svn-id: http://www.observium.org/svn/observer/trunk@1892 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-16 21:59:11 +00:00
parent 08d22bb42f
commit 2d5eee1c95
11 changed files with 78 additions and 76 deletions
@@ -3,13 +3,14 @@
$device = device_by_id_cache($id);
$query = mysql_query("SELECT * FROM `processors` where `device_id` = '".$id."'");
$i=0;
while($proc = mysql_fetch_array($query)) {
$i = 0;
while ($proc = mysql_fetch_array($query))
{
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("processor-" . $proc['processor_type'] . "-" . $proc['processor_index'] . ".rrd");
if(is_file($rrd_filename)) {
if (is_file($rrd_filename))
{
$descr = short_hrDeviceDescr($proc['processor_descr']);
$rrd_list[$i]['filename'] = $rrd_filename;
@@ -21,9 +22,9 @@ while($proc = mysql_fetch_array($query)) {
$unit_text = "Load %";
$units='%';
$total_units='%';
$colours='mixed';
$units ='%';
$total_units ='%';
$colours ='mixed';
$scale_min = "0";
$scale_max = "100";
@@ -32,4 +33,4 @@ $nototal = 1;
include ("includes/graphs/generic_multi_line.inc.php");
?>
?>