Fixed smokeping graphs (#10415)

* Remove duplicate code

* Fix smokeping rrd file discovery

* Fix Smokeping outgoing graphs
This commit is contained in:
Sander Steffann
2019-07-09 11:28:35 +02:00
committed by Neil Lathwood
parent 592b2ea432
commit 164f3a096a
3 changed files with 9 additions and 7 deletions

View File

@@ -87,13 +87,14 @@ if ($vars['view'] == 'incoming') {
$graph_array['type'] = 'device_smokeping_out_all_avg';
$graph_array['device'] = $device['device_id'];
echo '<tr><td>';
echo '<h3>Aggregate</h3>';
echo '<h3>Average</h3>';
include 'includes/html/print-graphrow.inc.php';
echo '</td></tr>';
$graph_array['type'] = 'device_smokeping_out_all';
$graph_array['device'] = $device['device_id'];
$graph_array['legend'] = 'no';
echo '<tr><td>';
echo '<h3>Aggregate</h3>';
@@ -106,7 +107,7 @@ if ($vars['view'] == 'incoming') {
asort($smokeping_files['out'][$device['hostname']]);
foreach ($smokeping_files['out'][$device['hostname']] as $host) {
$hostname = str_replace('.rrd', '', $host);
$hostname = str_replace('_', '.', str_replace('.rrd', '', $host));
list($hostname) = explode('~', $hostname);
$host = device_by_name($hostname);
if (is_numeric($host['device_id'])) {