mirror of
https://github.com/librenms/librenms.git
synced 2024-09-29 06:16:43 +00:00
Merge pull request #1296 from SaaldjorMike/fix-legend-iflabels
Fix legend iflabels
This commit is contained in:
commit
559d6960c7
@ -763,8 +763,8 @@ function get_client_ip() {
|
|||||||
function shorten_interface_type($string) {
|
function shorten_interface_type($string) {
|
||||||
|
|
||||||
return str_ireplace(
|
return str_ireplace(
|
||||||
array('FastEthernet','GigbitEthernet','TenGigabitEthernet','Port-Channel','Ethernet'),
|
array('FastEthernet','TenGigabitEthernet','GigabitEthernet','Port-Channel','Ethernet'),
|
||||||
array('Fa','Gi','Te','Po','Eth'),
|
array('Fa','Te','Gi','Po','Eth'),
|
||||||
$string
|
$string
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($devic
|
|||||||
|
|
||||||
$rrd_filenames[] = $rrd_filename;
|
$rrd_filenames[] = $rrd_filename;
|
||||||
$rrd_list[$i]['filename'] = $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_in'] = $port['label'];
|
||||||
$rrd_list[$i]['descr_out'] = $port['ifAlias'];
|
$rrd_list[$i]['descr_out'] = $port['ifAlias'];
|
||||||
$rrd_list[$i]['ds_in'] = $ds_in;
|
$rrd_list[$i]['ds_in'] = $ds_in;
|
||||||
|
Loading…
Reference in New Issue
Block a user