mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-21 08:02:54 +02:00
updating
git-svn-id: http://www.observium.org/svn/observer/trunk@79 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
<?
|
||||
|
||||
$interface_query = mysql_query("select * from interfaces WHERE id = '$_GET[id]'");
|
||||
$interface_query = mysql_query("select * from interfaces WHERE interface_id = '$_GET[id]'");
|
||||
$interface = mysql_fetch_array($interface_query);
|
||||
|
||||
$device_query = mysql_query("select * from devices where id = '$interface[host]'");
|
||||
$device = mysql_fetch_array($device_query);
|
||||
|
||||
$hostname = $device['hostname'];
|
||||
$hostid = $device['id'];
|
||||
$ifname = $interface['if'];
|
||||
$up = $interface['up'];
|
||||
$up_admin = $interface['up_admin'];
|
||||
$hostid = $device['interface_id'];
|
||||
$ifname = $interface['ifDescr'];
|
||||
$ifIndex = $interface['ifIndex'];
|
||||
$speed = humanspeed($interface['ifSpeed']);
|
||||
|
||||
@@ -19,9 +17,9 @@ $interface = mysql_fetch_array($interface_query);
|
||||
if($interface['ifPhysAddress']) { $mac = "$interface[ifPhysAddress]"; }
|
||||
|
||||
$color = "black";
|
||||
if ($up_admin == "down") { $status = "<span class='grey'>Disabled</span>"; }
|
||||
if ($up_admin == "up" && $up == "down") { $status = "<span class='red'>Enabled / Disconnected</span>"; }
|
||||
if ($up_admin == "up" && $up == "up") { $status = "<span class='green'>Enabled / Connected</span>"; }
|
||||
if ($interface['ifAdminStatus'] == "down") { $status = "<span class='grey'>Disabled</span>"; }
|
||||
if ($interface['ifAdminStatus'] == "up" && $interface['ifOperStatus'] == "down") { $status = "<span class='red'>Enabled / Disconnected</span>"; }
|
||||
if ($interface['ifAdminStatus'] == "up" && $interface['ifOperStatus'] == "up") { $status = "<span class='green'>Enabled / Connected</span>"; }
|
||||
|
||||
$i = 1;
|
||||
$inf = fixifName($ifname);
|
||||
|
||||
Reference in New Issue
Block a user