From ec79e3182712ccd14cb8823a0b72723559658a89 Mon Sep 17 00:00:00 2001 From: Mike Rostermund Date: Thu, 18 Jun 2015 15:45:30 +0200 Subject: [PATCH 1/2] Fix typo and reorder string replacements --- html/includes/functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index d7fe5b323251..8912bb636e3b 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -763,8 +763,8 @@ function get_client_ip() { function shorten_interface_type($string) { return str_ireplace( - array('FastEthernet','GigbitEthernet','TenGigabitEthernet','Port-Channel','Ethernet'), - array('Fa','Gi','Te','Po','Eth'), + array('FastEthernet','TenGigabitEthernet','GigabitEthernet','Port-Channel','Ethernet'), + array('Fa','Te','Gi','Po','Eth'), $string ); } From 442f0522651e6b10648975de18824f50ba56b331 Mon Sep 17 00:00:00 2001 From: Mike Rostermund Date: Thu, 18 Jun 2015 15:45:52 +0200 Subject: [PATCH 2/2] Shorten the label shown on graph legend --- html/includes/graphs/device/bits.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/graphs/device/bits.inc.php b/html/includes/graphs/device/bits.inc.php index 19fe0d67c822..64d4c0398a4d 100644 --- a/html/includes/graphs/device/bits.inc.php +++ b/html/includes/graphs/device/bits.inc.php @@ -36,7 +36,7 @@ $rrd_filenames[] = $rrd_filename; $rrd_list[$i]['filename'] = $rrd_filename; - $rrd_list[$i]['descr'] = $port['label']; + $rrd_list[$i]['descr'] = shorten_interface_type($port['label']); $rrd_list[$i]['descr_in'] = $port['label']; $rrd_list[$i]['descr_out'] = $port['ifAlias']; $rrd_list[$i]['ds_in'] = $ds_in;