Merge branch '1572-Descripción-de-interfaces-dell-powerconnect-dev' into 'develop'
Changed explode in wizard snmp interface explorer See merge request artica/pandorafms!1256
This commit is contained in:
commit
d471b0889c
|
@ -96,7 +96,7 @@ if ($snmpwalk) {
|
||||||
// We get here only the interface part of the MIB, not full mib
|
// We get here only the interface part of the MIB, not full mib
|
||||||
foreach($snmpis as $key => $snmp) {
|
foreach($snmpis as $key => $snmp) {
|
||||||
|
|
||||||
$data = explode(': ',$snmp);
|
$data = explode (': ',$snmp, 2);
|
||||||
$keydata = explode('::',$key);
|
$keydata = explode('::',$key);
|
||||||
$keydata2 = explode('.',$keydata[1]);
|
$keydata2 = explode('.',$keydata[1]);
|
||||||
|
|
||||||
|
@ -106,16 +106,8 @@ if ($snmpwalk) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists(1,$data)) {
|
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]]['type'] = $data[0];
|
||||||
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[1];
|
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[1];
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$interfaces[$keydata2[1]][$keydata2[0]]['type'] = '';
|
$interfaces[$keydata2[1]][$keydata2[0]]['type'] = '';
|
||||||
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[0];
|
$interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[0];
|
||||||
|
|
Loading…
Reference in New Issue