add duplex detection frmo dot3stats and display this for ports (and fix weird bug where speed wasn't shown for devices with no ifAlias!)

git-svn-id: http://www.observium.org/svn/observer/trunk@1504 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-28 17:37:11 +00:00
parent f91db2a32d
commit f5ab46aecf
2 changed files with 21 additions and 9 deletions

View File

@ -77,10 +77,10 @@
}
echo("</td><td width=75>");
if($interface['ifSpeed'] && $interface['ifAlias'] != "") { echo("<span class=box-desc>".humanspeed($interface['ifSpeed'])."</span>"); }
if($interface['ifSpeed']) { echo("<span class=box-desc>".humanspeed($interface['ifSpeed'])."</span>"); }
echo("<br />");
# if($interface[ifDuplex] != unknown) { echo("<span class=box-desc>Duplex " . $interface['ifDuplex'] . "</span>"); } else { echo("-"); }
if($interface[ifDuplex] != "unknown") { echo("<span class=box-desc>" . $interface['ifDuplex'] . "</span>"); } else { echo("-"); }
if($device['os'] == "ios" || $device['os'] == "iosxe") {
if($interface['ifTrunk']) {
@ -92,8 +92,8 @@
echo("<span style='color: green;'>" . $vrf['vrf_name'] . "</span>");
}
}
if($port_adsl['adslLineCoding']) {
if($port_adsl['adslLineCoding']) {
echo("</td><td width=150>");
echo($port_adsl['adslLineCoding']."/".$port_adsl['adslLineType']);
echo("<br />");
@ -104,8 +104,6 @@
echo("Atten:".$port_adsl['adslAtucCurrAtn'] . "dB/". $port_adsl['adslAturCurrAtn'] . "dB");
echo("<br />");
echo("SNR:".$port_adsl['adslAtucCurrSnrMgn'] . "dB/". $port_adsl['adslAturCurrSnrMgn']. "dB");
} else {
echo("</td><td width=150>");
if($interface['ifType'] && $interface['ifType'] != "") { echo("<span class=box-desc>" . fixiftype($interface['ifType']) . "</span>"); } else { echo("-"); }