mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove unwanted characters from poll info
Similar to PR 3883.
Removing carriage return character \r, causing the following error while trying view minigraphs on device list page:
SyntaxError: unterminated string literal
return overlib('<div style=\'background-color: #FFFFFF;\'><div><span class=
This issue has been experienced with S4810 devices.
This commit is contained in:
@@ -17,7 +17,8 @@ if (preg_match('/Dell Networking N[1234].*/' , $temp_hardware) == 1) { // If De
|
|||||||
$features = snmp_get($device, 'productIdentificationDescription.0', '-Ovq', 'Dell-Vendor-MIB');
|
$features = snmp_get($device, 'productIdentificationDescription.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||||
}
|
}
|
||||||
else { // Assume S-series
|
else { // Assume S-series
|
||||||
list(,,$version,$hardware,,) = explode(PHP_EOL, $poll_device['sysDescr']);
|
$sysDescr = preg_replace('/[\r]+/',' ', $poll_device['sysDescr']);
|
||||||
|
list(,,$version,$hardware,,) = explode(PHP_EOL, $sysDescr);
|
||||||
list(,$version) = explode(': ',$version);
|
list(,$version) = explode(': ',$version);
|
||||||
list(,$hardware) = explode(': ',$hardware);
|
list(,$hardware) = explode(': ',$hardware);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user