Update graph and port pages to use new RRD naming schema.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
This commit is contained in:
Maximilian Wilhelm
2016-01-21 22:04:33 +01:00
parent 2c9df26bbf
commit 4d78a0261e
22 changed files with 65 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
<?php
if (file_exists($config['rrd_dir'].'/'.$device['hostname'].'/port-'.$port['ifIndex'].'-adsl.rrd')) {
if (file_exists(get_port_rrdfile_path ($device['hostname'], $port['port_id'], 'adsl'))) {
$iid = $id;
echo '<div class=graphhead>ADSL Line Speed</div>';
$graph_type = 'port_adsl_speed';

View File

@@ -1,6 +1,6 @@
<?php
if (file_exists($config['rrd_dir'].'/'.$device['hostname'].'/port-'.$port['ifIndex'].'.rrd')) {
if (file_exists(get_port_rrdfile_path ($device['hostname'], $port['port_id']))) {
$iid = $id;
echo '<div class="panel panel-default">
<div class="panel-heading">
@@ -41,7 +41,7 @@ if (file_exists($config['rrd_dir'].'/'.$device['hostname'].'/port-'.$port['ifInd
include 'includes/print-interface-graphs.inc.php';
echo '</div></div>';
if (is_file($config['rrd_dir'].'/'.$device['hostname'].'/port-'.$port['ifIndex'].'-dot3.rrd')) {
if (is_file(get_port_rrdfile_path ($device['hostname'], $port['port_id'], 'dot3'))) {
echo '<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Ethernet Errors</h3>