feature: Include adsl stats for vdsl ports (#8670)

* also include adsl stats for vdsl ports

* Update ports.inc.php
This commit is contained in:
RobJE
2018-05-21 20:33:57 +02:00
committed by Neil Lathwood
parent 66ca9a7c21
commit 82d01eb1a1

View File

@@ -246,10 +246,10 @@ if ($device['os'] == 'procera') {
}
if ($config['enable_ports_adsl']) {
$device['adsl_count'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `device_id` = ? AND `ifType` = 'adsl'", array($device['device_id']));
$device['xdsl_count'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `device_id` = ? AND `ifType` in ('adsl','vdsl')", [$device['device_id']]);
}
if ($device['adsl_count'] > '0') {
if ($device['xdsl_count'] > '0') {
echo 'ADSL ';
$port_stats = snmpwalk_cache_oid($device, '.1.3.6.1.2.1.10.94.1.1.1.1', $port_stats, 'ADSL-LINE-MIB');
$port_stats = snmpwalk_cache_oid($device, '.1.3.6.1.2.1.10.94.1.1.2.1', $port_stats, 'ADSL-LINE-MIB');