Fixed snmp interface wizard for switch dell powerconnect

This commit is contained in:
danielmaya 2017-11-20 10:28:08 +01:00
parent 04c271ae61
commit 18ba88dae2
1 changed files with 13 additions and 6 deletions

View File

@ -106,10 +106,17 @@ if ($snmpwalk) {
}
if (array_key_exists(1,$data)) {
// Fixed for switch dell powerconnect
if(count($data) > 2) {
$interfaces[$keydata2[1]][$keydata2[0]]['type'] = $data[0];
unset($data[0]);
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = implode(": ",$data);
} else {
$interfaces[$keydata2[1]][$keydata2[0]]['type'] = $data[0];
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[1];
}
else {
} else {
$interfaces[$keydata2[1]][$keydata2[0]]['type'] = '';
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[0];
}