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,36 +6,35 @@
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @copyright (C) Adam Armstrong
*
*/
if (is_numeric($vars['id']))
{
$entity = get_entity_by_id_cache($type, $vars['id']);
if (is_numeric($entity['device_id']) && ($auth || device_permitted($entity['device_id'])))
{
$device = device_by_id_cache($entity['device_id']);
$title = generate_device_link($device);
$title .= " :: Pseudowire :: " . escape_html($entity['pwID']);
$auth = TRUE;
$index = strtolower($entity['mib']) . '-' . $entity['pwIndex'];
if ($subtype == 'uptime')
{
$index = strtolower($entity['mib']) . '-uptime-' . $entity['pwIndex'];
}
$unit_text = 'PW '.$entity['pwID'];
if ($entity['pwDescr'])
{
$unit_text .= ' - '.$entity['pwDescr'];
}
$graph_title = $device['hostname'] . ' :: ' . $unit_text; // hostname :: SLA XX
$rrd_filename = get_rrd_path($device, "pseudowire-" . $index . ".rrd");
$auth = TRUE;
}
if (!is_intnum($vars['id'])) {
return;
}
$entity = get_entity_by_id_cache($type, $vars['id']);
if (is_numeric($entity['device_id']) && ($auth || device_permitted($entity['device_id']))) {
$device = device_by_id_cache($entity['device_id']);
$auth = TRUE;
$index = strtolower($entity['mib']) . '-' . $entity['pwIndex'];
if ($subtype === 'uptime') {
$index = strtolower($entity['mib']) . '-uptime-' . $entity['pwIndex'];
}
$rrd_filename = get_rrd_path($device, "pseudowire-" . $index . ".rrd");
$unit_text = 'ID ' . $entity['pwID'];
if ($entity['pwDescr']) {
$unit_text .= ' - ' . $entity['pwDescr'];
}
$graph_title = device_name($device, TRUE);
$graph_title .= ' :: Pseudowire :: ' . $unit_text;
}
// EOF

View File

@ -5,9 +5,9 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage graphs
* @copyright (C) Adam Armstrong
*
*/
@ -17,6 +17,6 @@ $ds_out = "OutOctets";
//$graph_max = 1;
$format == "octets";
include($config['html_dir']."/includes/graphs/generic_data.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_data.inc.php");
// EOF

View File

@ -5,13 +5,13 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage graphs
* @copyright (C) Adam Armstrong
*
*/
$ds_in = "InPkts";
$ds_in = "InPkts";
$ds_out = "OutPkts";
$colour_area_in = $config['colours']['graphs']['pkts']['in_area'];
@ -20,14 +20,16 @@ $colour_line_in = darken_color($colour_area_in);
$colour_area_out = $config['colours']['graphs']['pkts']['out_area'];
$colour_line_out = $config['colours']['graphs']['pkts']['out_line'];
$colour_area_in_max = $config['colours']['graphs']['pkts']['in_max'];
$colour_area_in_max = $config['colours']['graphs']['pkts']['in_max'];
$colour_area_out_max = $config['colours']['graphs']['pkts']['out_max'];
//$graph_max = 1;
$unit_text = "Packets/s";
$args['nototal'] = 1; $print_total = 0; $nototal = 1;
$args['nototal'] = 1;
$print_total = 0;
$nototal = 1;
include($config['html_dir']."/includes/graphs/generic_duplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_duplex.inc.php");
// EOF