smallprettygraphs!

git-svn-id: http://www.observium.org/svn/observer/trunk@217 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-04-01 11:03:14 +00:00
parent f923b8e676
commit 0ecc96788c

View File

@@ -6,7 +6,8 @@ function graph_multi_bits ($interfaces, $graph, $from, $to, $width, $height) {
global $config, $rrdtool, $installdir, $mono_font;
$imgfile = "graphs/" . "$graph";
$options = "--alt-autoscale-max -E --start $from --end " . ($to - 150) . " --width $width --height $height";
foreach(explode("\n", $interfaces) as $ifid) {
if($height < "33") { $options .= " --only-graph"; }
foreach(explode(",", $interfaces) as $ifid) {
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `interfaces` AS I, devices as D WHERE I.interface_id = '" . $ifid . "' AND I.device_id = D.device_id");
$int = mysql_fetch_row($query);
if(is_file($config['rrd_dir'] . "/" . $int[1] . "/" . $int[0] . ".rrd")) {