mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@209 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -6,7 +6,7 @@ include("includes/functions.php");
|
||||
|
||||
if($argv[1]) { $where = "WHERE `interface_id` = '$argv[1]'"; }
|
||||
|
||||
$interface_query = mysql_query("SELECT * FROM `interfaces` $where");
|
||||
$interface_query = mysql_query("SELECT * FROM `interfaces` $where ORDER BY interface_id DESC");
|
||||
while ($interface = mysql_fetch_array($interface_query)) {
|
||||
|
||||
unset($this);
|
||||
@@ -63,7 +63,6 @@ while ($interface = mysql_fetch_array($interface_query)) {
|
||||
if($this['ifTrunk']) { echo("Interface is a " . $this['ifTrunk'] . " trunk\n"); }
|
||||
if($this['ifVlan']) { echo("Interface is a member of vlan " . $this['ifVlan'] . " \n"); }
|
||||
|
||||
|
||||
}
|
||||
|
||||
list($ifName, $ifDescr, $ifAdminStatus, $ifOperStatus, $ifAlias, $ifSpeed, $ifDuplex, $ifType, $ifMtu, $ifPhysAddress) = explode("\n", $snmp_output);
|
||||
@@ -74,6 +73,9 @@ while ($interface = mysql_fetch_array($interface_query)) {
|
||||
$ifAlias = trim(str_replace("\"", "", $ifAlias));
|
||||
$ifAlias = trim($ifAlias);
|
||||
|
||||
echo("\n$ifName\n");
|
||||
$ifDescr = fixifname($ifDescr);
|
||||
|
||||
$ifPhysAddress = strtolower(str_replace("\"", "", $ifPhysAddress));
|
||||
$ifPhysAddress = str_replace(" ", ":", $ifPhysAddress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user