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,33 +6,39 @@
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @copyright (C) Adam Armstrong
*
*/
// $cbqos = dbFetchRows("SELECT * FROM `ports_cbqos` WHERE `port_id` = ?", array($port['port_id']));
if (is_numeric($vars['id']))
{
$cbqos = dbFetchRow("SELECT * FROM `ports_cbqos` WHERE `cbqos_id` = ?", array($vars['id']));
if (!is_intnum($vars['id'])) {
return;
}
if (is_numeric($cbqos['device_id']) && ($auth || device_permitted($cbqos['device_id'])))
{
$cbqos = dbFetchRow("SELECT * FROM `ports_cbqos` WHERE `cbqos_id` = ?", [$vars['id']]);
if (is_numeric($cbqos['device_id']) && ($auth || device_permitted($cbqos['device_id']))) {
$device = device_by_id_cache($cbqos['device_id']);
$port = get_port_by_id_cache($cbqos['port_id']);
$rrd_filename = get_rrd_path($device, "cbqos-".$cbqos['policy_index']."-".$cbqos['object_index']);
$title = generate_device_link($device);
$title .= " :: CBQoS :: " . $cbqos['policy_index']."-".$cbqos['object_index'];
$auth = TRUE;
}
}
$auth = TRUE;
$title_array = array();
$title_array[] = array('text' => $device['hostname'], 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id'])));
$title_array[] = array('text' => $port['port_label'], 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id'])));
$title_array[] = array('text' => 'CBQoS', 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'port', 'port' => $port['port_id'], 'view' => 'cbqos')));
$title_array[] = array('text' => $cbqos['policy_name'] . '/' . $cbqos['object_name'] , 'url' => generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'port', 'port' => $port['port_id'], 'view' => 'cbqos')));
$rrd_filename = get_rrd_path($device, "cbqos-" . $cbqos['policy_index'] . "-" . $cbqos['object_index']);
$title_array = [];
$title_array[] = [ 'text' => $device['hostname'],
'url' => generate_url([ 'page' => 'device', 'device' => $device['device_id'] ]) ];
$title_array[] = [ 'text' => $port['port_label'],
'url' => generate_url([ 'page' => 'device', 'device' => $device['device_id'] ]) ];
$title_array[] = [ 'text' => 'CBQoS',
'url' => generate_url([ 'page' => 'device', 'device' => $device['device_id'], 'tab' => 'port', 'port' => $port['port_id'], 'view' => 'cbqos' ]) ];
$title_array[] = [ 'text' => $cbqos['policy_name'] . '/' . $cbqos['object_name'],
'url' => generate_url([ 'page' => 'device', 'device' => $device['device_id'], 'tab' => 'port', 'port' => $port['port_id'], 'view' => 'cbqos' ]) ];
$graph_title = device_name($device, TRUE);
$graph_title .= " :: CBQoS :: " . $cbqos['policy_index'] . "-" . $cbqos['object_index'];
}
// 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
*
*/
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$rrd_options .= " DEF:pre_B=$rrd_filename_escape:PrePolicyByte:AVERAGE";
$rrd_options .= " DEF:post_B=$rrd_filename_escape:PostPolicyByte:AVERAGE";

View File

@ -5,15 +5,15 @@
*
* 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
*
*/
$scale_min = 0;
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$ds = "DropByte";
@ -22,11 +22,11 @@ $colour_line = "006600";
$colour_area_max = "FFEE99";
$graph_max = 1;
$graph_max = 1;
$multiplier = 8;
$unit_text = "Bps";
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_simplex.inc.php");
?>

View File

@ -5,15 +5,15 @@
*
* 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
*
*/
$scale_min = 0;
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$ds = "PostPolicyByte";
@ -22,11 +22,11 @@ $colour_line = "006600";
$colour_area_max = "FFEE99";
$graph_max = 1;
$graph_max = 1;
$multiplier = 8;
$unit_text = "bps";
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_simplex.inc.php");
?>

View File

@ -5,15 +5,15 @@
*
* 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
*
*/
$scale_min = 0;
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$ds = "PrePolicyByte";
@ -22,11 +22,11 @@ $colour_line = "006600";
$colour_area_max = "FFEE99";
$graph_max = 1;
$graph_max = 1;
$multiplier = 8;
$unit_text = "Bps";
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_simplex.inc.php");
?>

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
*
*/
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$rrd_options .= " DEF:pre=$rrd_filename_escape:PrePolicyPkt:AVERAGE";
$rrd_options .= " DEF:drop=$rrd_filename_escape:DropPkt:AVERAGE";

View File

@ -5,15 +5,15 @@
*
* 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
*
*/
$scale_min = 0;
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$ds = "DropPkt";
@ -27,6 +27,6 @@ $graph_max = 1;
$unit_text = "Pkts";
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_simplex.inc.php");
// EOF

View File

@ -5,15 +5,15 @@
*
* 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
*
*/
$scale_min = 0;
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$ds = "DropPkt";
@ -27,6 +27,6 @@ $graph_max = 1;
$unit_text = "Pkts";
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_simplex.inc.php");
?>

View File

@ -5,15 +5,15 @@
*
* 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
*
*/
$scale_min = 0;
include($config['html_dir']."/includes/graphs/common.inc.php");
include($config['html_dir'] . "/includes/graphs/common.inc.php");
$ds = "PrePolicyPkt";
@ -27,6 +27,6 @@ $graph_max = 1;
$unit_text = "Pkts";
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_simplex.inc.php");
?>