fix bits_trio graphtype

git-svn-id: http://www.observium.org/svn/observer/trunk@1694 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-09-01 10:44:33 +00:00
parent 660d47fe2f
commit a3fb19c1c9

View File

@@ -7,7 +7,7 @@ if($_GET['legend']) { $legend = $_GET['legend']; }
if($height < "99") { $rrd_options .= " --only-graph"; }
$i = 1;
foreach(explode(",", $_GET['id']) as $ifid) {
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `id` AS I, devices as D WHERE I.interface_id = '" . $ifid . "' AND I.device_id = D.device_id");
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `ports` 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] . "/port-" . $int[0] . ".rrd")) {
if(strstr($inverse, "a")) { $in = "OUT"; $out = "IN"; } else { $in = "IN"; $out = "OUT"; }
@@ -23,7 +23,7 @@ if($_GET['legend']) { $legend = $_GET['legend']; }
}
unset($seperator); unset($plus);
foreach(explode(",", $_GET['idb']) as $ifid) {
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `id` AS I, devices as D WHERE I.interface_id = '" . $ifid . "' AND I.device_id = D.device_id");
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `ports` 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] . "/port-" . $int[0] . ".rrd")) {
if(strstr($inverse, "b")) { $in = "OUT"; $out = "IN"; } else { $in = "IN"; $out = "OUT"; }
@@ -39,7 +39,7 @@ if($_GET['legend']) { $legend = $_GET['legend']; }
}
unset($seperator); unset($plus);
foreach(explode(",", $_GET['idc']) as $ifid) {
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `id` AS I, devices as D WHERE I.interface_id = '" . $ifid . "' AND I.device_id = D.device_id");
$query = mysql_query("SELECT `ifIndex`, `hostname` FROM `ports` 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] . "/port-" . $int[0] . ".rrd")) {
if(strstr($inverse, "c")) { $in = "OUT"; $out = "IN"; } else { $in = "IN"; $out = "OUT"; }