From 3fcf51d177b079d3053c568cbe403b80db66fb8e Mon Sep 17 00:00:00 2001 From: VirTechSystems <5238065+VirTechSystems@users.noreply.github.com> Date: Mon, 22 Oct 2018 16:58:37 -0400 Subject: [PATCH] Added support for ip to sysName option in csv export and graphs (#9352) * Update html/includes/common/server-stats.inc.php allow 6 icons wide on server stats * sysname to ip config following follow ip to sysname config option on csv export and graphs * Revert "Update html/includes/common/server-stats.inc.php" This reverts commit db10e46f04643b87ec6a600e013733382717e7d4. * formatting * syntax fix too many brackets * Update html/includes/graphs/multiport/bits_separate.inc.php bad tab * format_hostname Use format_hostname to resolve the sysname. * Update bits_separate.inc.php --- html/includes/graphs/multiport/bits_separate.inc.php | 4 ++-- html/includes/reports/ports.csv.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/includes/graphs/multiport/bits_separate.inc.php b/html/includes/graphs/multiport/bits_separate.inc.php index c6ab907879..33404d63c7 100644 --- a/html/includes/graphs/multiport/bits_separate.inc.php +++ b/html/includes/graphs/multiport/bits_separate.inc.php @@ -8,8 +8,8 @@ foreach (explode(',', $vars['id']) as $ifid) { if (rrdtool_check_rrd_exists($rrd_file)) { $port = cleanPort($port); $rrd_list[$i]['filename'] = $rrd_file; - $rrd_list[$i]['descr'] = $port['hostname'].' '.$port['ifDescr']; - $rrd_list[$i]['descr_in'] = $port['hostname']; + $rrd_list[$i]['descr'] = format_hostname($port, $port['hostname']).' '.$port['ifDescr']; + $rrd_list[$i]['descr_in'] = format_hostname($port, $port['hostname']); $rrd_list[$i]['descr_out'] = makeshortif($port['label']); $i++; } diff --git a/html/includes/reports/ports.csv.inc.php b/html/includes/reports/ports.csv.inc.php index e546793a0d..43206cb431 100644 --- a/html/includes/reports/ports.csv.inc.php +++ b/html/includes/reports/ports.csv.inc.php @@ -159,7 +159,7 @@ foreach ($ports as $port) { $port['out_rate'] = formatRates(($port['ifOutOctets_rate'] * 8)); $port = cleanPort($port, $device); $csv[] = array( - $port['hostname'], + format_hostname($port, $port['hostname']), fixIfName($port['label']), $speed, $port['in_rate'],