From 659f31f3e78d12c49575102bbd75374241ac4fab Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Sat, 1 Aug 2015 17:07:49 +1000 Subject: [PATCH 1/2] Added tag to IPSLA type Jitter --- includes/discovery/cisco-sla.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/discovery/cisco-sla.inc.php b/includes/discovery/cisco-sla.inc.php index 0a2efb2a8..d0e45107d 100644 --- a/includes/discovery/cisco-sla.inc.php +++ b/includes/discovery/cisco-sla.inc.php @@ -70,6 +70,10 @@ if ($config['enable_sla'] && $device['os_group'] == 'cisco') { $data['tag'] = preg_replace('/:0*([0-9])/', ':$1', $data['tag']); } break; + + case 'jitter': + $data['tag'] = $sla_config['rttMonEchoAdminCodecType'] ." (". preg_replace('/milliseconds/', 'ms', $sla_config['rttMonEchoAdminCodecInterval']) .")"; + break; }//end switch }//end if From 128c330ebbc96f9573df42166621a4b32fdaa71d Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Sun, 2 Aug 2015 20:18:14 +1000 Subject: [PATCH 2/2] Resolved bug where $text would use the previous iteration if $sla_type was unknown. Now set a default $text value which will be over written if $sla_type is known. --- html/pages/device/slas.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/pages/device/slas.inc.php b/html/pages/device/slas.inc.php index 587c7d743..a84a8833d 100644 --- a/html/pages/device/slas.inc.php +++ b/html/pages/device/slas.inc.php @@ -9,6 +9,9 @@ $slas = dbFetchRows('SELECT * FROM `slas` WHERE `device_id` = ? AND `deleted` = // Collect types $sla_types = array('all' => 'All'); foreach ($slas as $sla) { + // Set a default type, if we know about it, it will be overwritten below. + $text = 'Unknown'; + $sla_type = $sla['rtt_type']; if (!in_array($sla_type, $sla_types)) {