Commit version 24.12.13800
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user