2010-06-19 16:06:57 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-28 20:29:34 +00:00
|
|
|
$sql = "SELECT * FROM `ucd_diskio` WHERE device_id = '" . $device['device_id'] . "' ORDER BY diskio_descr";
|
2010-06-19 16:06:57 +00:00
|
|
|
$query = mysql_query($sql);
|
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
echo('<table cellspacing="0" cellpadding="5" width="100%">');
|
2010-06-19 16:06:57 +00:00
|
|
|
|
|
|
|
#echo("<tr class=tablehead>
|
|
|
|
# <th width=250>Drive</th>
|
|
|
|
# <th width=420>Usage</th>
|
|
|
|
# <th width=50>Free</th>
|
|
|
|
# <th></th>
|
|
|
|
# </tr>");
|
|
|
|
|
|
|
|
$row = 1;
|
|
|
|
|
2011-04-06 13:54:50 +00:00
|
|
|
while ($drive = mysql_fetch_assoc($query))
|
2011-03-16 23:10:10 +00:00
|
|
|
{
|
|
|
|
if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
$fs_url = "device/".$device['device_id']."/health/diskio/";
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['diskio_descr'];
|
2011-03-28 09:11:05 +00:00
|
|
|
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['diskio_id'] . "&type=diskio_ops&from=$month&to=$now&width=400&height=125\'>";
|
2011-03-16 23:10:10 +00:00
|
|
|
$fs_popup .= "', RIGHT, FGCOLOR, '#e5e5e5');\" onmouseout=\"return nd();\"";
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
if ($perc > '90') { $left_background='c4323f'; $right_background='C96A73'; }
|
2011-03-17 00:09:20 +00:00
|
|
|
elseif ($perc > '75') { $left_background='bf5d5b'; $right_background='d39392'; }
|
|
|
|
elseif ($perc > '50') { $left_background='bf875b'; $right_background='d3ae92'; }
|
|
|
|
elseif ($perc > '25') { $left_background='5b93bf'; $right_background='92b7d3'; }
|
2011-03-16 23:10:10 +00:00
|
|
|
else { $left_background='9abf5b'; $right_background='bbd392'; }
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
echo("<tr bgcolor='$row_colour'><th><a href='$fs_url' $fs_popup>" . $drive['diskio_descr'] . "</a></td></tr>");
|
2010-06-19 16:06:57 +00:00
|
|
|
|
|
|
|
$types = array("diskio_bits", "diskio_ops");
|
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
foreach ($types as $graph_type)
|
|
|
|
{
|
2010-06-19 16:06:57 +00:00
|
|
|
echo('<tr bgcolor="'.$row_colour.'"><td colspan=5>');
|
|
|
|
|
|
|
|
$graph_array['id'] = $drive['diskio_id'];
|
|
|
|
$graph_array['type'] = $graph_type;
|
|
|
|
|
2010-07-25 14:21:05 +00:00
|
|
|
include("includes/print-quadgraphs.inc.php");
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2010-07-25 14:21:05 +00:00
|
|
|
echo("</td></tr>");
|
2010-06-19 16:06:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$row++;
|
|
|
|
}
|
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
echo("</table>");
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
?>
|