Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -1,5 +1,4 @@
<?php
/**
* Observium
*
@ -7,38 +6,40 @@
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @copyright (C) Adam Armstrong
*
*/
if (!is_array($vars['id'])) { $vars['id'] = array($vars['id']); }
if (!is_array($vars['id'])) {
$vars['id'] = [$vars['id']];
}
$i = 0;
foreach ($vars['id'] as $ifid)
{
$port = dbFetchRow("SELECT * FROM `ports` AS I, devices AS D WHERE I.port_id = ? AND I.device_id = D.device_id", array($ifid));
$rrdfile = get_port_rrdfilename($port, "ipv6-octets", TRUE);
if (rrd_is_file($rrdfile))
{
humanize_port($port);
$rrd_list[$i]['filename'] = $rrdfile;
$rrd_list[$i]['descr'] = $port['hostname'] . " " . $port['ifDescr'];
$rrd_list[$i]['descr_in'] = $port['hostname'];
$rrd_list[$i]['descr_out'] = $port['port_label_short']; // Options sets for skip htmlentities
$i++;
}
$sql = 'SELECT `ports`.*, `devices`.`hostname` FROM `ports` LEFT JOIN `devices` USING (`device_id`) WHERE ' .
generate_query_values($vars['id'], 'ports.port_id');
foreach (dbFetchRows($sql) as $port) {
//$port = dbFetchRow("SELECT * FROM `ports` AS I, devices AS D WHERE I.port_id = ? AND I.device_id = D.device_id", [$ifid]);
$rrdfile = get_port_rrdfilename($port, "ipv6-octets", TRUE);
if (rrd_is_file($rrdfile)) {
//humanize_port($port);
$rrd_list[$i]['filename'] = $rrdfile;
$rrd_list[$i]['descr'] = $port['hostname'] . " " . $port['ifDescr'];
$rrd_list[$i]['descr_in'] = $port['hostname'];
$rrd_list[$i]['descr_out'] = $port['port_label_short']; // Options sets for skip htmlentities
$i++;
}
}
$units = 'b';
$total_units='B';
$colours_in='greens';
$multiplier = "8";
$units = 'b';
$total_units = 'B';
$colours_in = 'greens';
$multiplier = "8";
$colours_out = 'blues';
$ds_in = "InOctets";
$ds_out = "OutOctets";
include($config['html_dir']."/includes/graphs/generic_multi_bits_separated.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_multi_bits_separated.inc.php");
// EOF