mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@76 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql = "SELECT * FROM `interfaces` AS I, `devices` AS D WHERE I.device_id = D.id ORDER BY D.hostname, I.ifDescr";
|
$sql = "SELECT * FROM `interfaces` AS I, `devices` AS D WHERE I.device_id = D.device_id ORDER BY D.hostname, I.ifDescr";
|
||||||
$query = mysql_query($sql);
|
$query = mysql_query($sql);
|
||||||
|
|
||||||
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
||||||
@@ -14,7 +14,7 @@ while($interface = mysql_fetch_array($query)) {
|
|||||||
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
|
|
||||||
$speed = humanspeed($interface['ifSpeed']);
|
$speed = humanspeed($interface['ifSpeed']);
|
||||||
$if_link = generateiflink($interface);
|
$if_link = generateiflink($interface, makeshortif($interface['ifDescr']));
|
||||||
$dev_link = generatedevicelink($interface);
|
$dev_link = generatedevicelink($interface);
|
||||||
$type = humanmedia($interface['ifType']);
|
$type = humanmedia($interface['ifType']);
|
||||||
|
|
||||||
|
|||||||
@@ -343,6 +343,8 @@ function fixifName ($inf) {
|
|||||||
$inf = str_replace("dial", "Dial", $inf);
|
$inf = str_replace("dial", "Dial", $inf);
|
||||||
$inf = str_replace("hp procurve switch software Loopback interface", "Loopback Interface", $inf);
|
$inf = str_replace("hp procurve switch software Loopback interface", "Loopback Interface", $inf);
|
||||||
$inf = str_replace("control plane interface", "Control Plane", $inf);
|
$inf = str_replace("control plane interface", "Control Plane", $inf);
|
||||||
|
$inf = preg_replace("", "Interface \\1", $inf);
|
||||||
|
$inf = preg_replace("/^([0-9]+)$/", "Interface \\1", $inf);
|
||||||
return $inf;
|
return $inf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user