mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Adding Column ifSpeed_prev, ifHighSpeed_prev to Ports Table (#11348)
* adding Column ifSpeed_prev, ifHighSpeed_prev to Ports table * grammar fix * rename migration class * tests * . * .
This commit is contained in:
@@ -667,7 +667,7 @@ foreach ($ports as $port) {
|
||||
$port['update'][$oid] = $this_port[$oid];
|
||||
|
||||
// store the previous values for alerting
|
||||
if ($oid == 'ifOperStatus' || $oid == 'ifAdminStatus') {
|
||||
if (in_array($oid, ['ifOperStatus', 'ifAdminStatus', 'ifSpeed', 'ifHighSpeed'])) {
|
||||
$port['update'][$oid . '_prev'] = $port[$oid];
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ foreach ($ports as $port) {
|
||||
echo $oid . ' ';
|
||||
}
|
||||
} else {
|
||||
if ($oid == 'ifOperStatus' || $oid == 'ifAdminStatus') {
|
||||
if (in_array($oid, ['ifOperStatus', 'ifAdminStatus', 'ifSpeed', 'ifHighSpeed'])) {
|
||||
if ($port[$oid.'_prev'] == null) {
|
||||
$port['update'][$oid . '_prev'] = $this_port[$oid];
|
||||
}
|
||||
|
Reference in New Issue
Block a user