fix: Cleanup printing ifAlias (#4874)

This commit is contained in:
Neil Lathwood
2016-12-12 14:25:48 +00:00
committed by GitHub
parent d3c6d82b21
commit 9b9c10e204
26 changed files with 32 additions and 33 deletions

View File

@@ -30,7 +30,7 @@ foreach (dbFetchRows('SELECT * FROM `ports` WHERE `device_id` = ?', array($devic
$rrd_list[$i]['filename'] = $rrd_filename;
$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]['descr_out'] = display($port['ifAlias']);
$rrd_list[$i]['ds_in'] = $ds_in;
$rrd_list[$i]['ds_out'] = $ds_out;
$i++;

View File

@@ -30,7 +30,7 @@ foreach ($devices as $device) {
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $port['label'];
$rrd_list[$i]['descr_in'] = $device['hostname'];
$rrd_list[$i]['descr_out'] = $port['ifAlias'];
$rrd_list[$i]['descr_out'] = display($port['ifAlias']);
$rrd_list[$i]['ds_in'] = $ds_in;
$rrd_list[$i]['ds_out'] = $ds_out;
$i++;

View File

@@ -6,7 +6,7 @@ if (is_numeric($vars['id']) && ($auth || port_permitted($vars['id']))) {
$title = generate_device_link($device);
$title .= ' :: Port '.generate_port_link($port);
if ($port['ifAlias'] != '') {
$title .= ', '.$port['ifAlias'];
$title .= ', '.display($port['ifAlias']);
}
$graph_title = shorthost($device['hostname']).'::'.strtolower(makeshortif($port['ifDescr']));