Commit version 24.12.13800
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,24 +6,25 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (is_numeric($vars['id']))
|
||||
{
|
||||
$cef = dbFetchRow("SELECT * FROM `cef_switching` AS C, `devices` AS D WHERE C.cef_switching_id = ? AND C.device_id = D.device_id", array($vars['id']));
|
||||
if (!is_intnum($vars['id'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_numeric($cef['device_id']) && ($auth || device_permitted($cef['device_id'])))
|
||||
{
|
||||
$cef = dbFetchRow("SELECT * FROM `cef_switching` WHERE `cef_switching_id` = ?", [$vars['id']]);
|
||||
|
||||
if (is_numeric($cef['device_id']) && ($auth || device_permitted($cef['device_id']))) {
|
||||
$device = device_by_id_cache($cef['device_id']);
|
||||
|
||||
$rrd_filename = get_rrd_path($device, "cefswitching-".$cef['entPhysicalIndex']."-".$cef['afi']."-".$cef['cef_index'].".rrd");
|
||||
$rrd_filename = get_rrd_path($device, "cefswitching-" . $cef['entPhysicalIndex'] . "-" . $cef['afi'] . "-" . $cef['cef_index'] . ".rrd");
|
||||
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: CEF Switching :: " . escape_html($cef['cef_descr']);
|
||||
$auth = TRUE;
|
||||
}
|
||||
$auth = TRUE;
|
||||
|
||||
$graph_title = device_name($device, TRUE);
|
||||
$graph_title .= " :: CEF Switching :: " . $cef['cef_descr'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,36 +5,34 @@
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
// Cycle through dot3stats OIDs and build list of RRAs to pass to multi simplex grapher
|
||||
|
||||
$oids = array('drop', 'punt', 'hostpunt');
|
||||
$i = 0;
|
||||
$oids = ['drop', 'punt', 'hostpunt'];
|
||||
$i = 0;
|
||||
|
||||
if (rrd_is_file($rrd_filename))
|
||||
{
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
$oid = str_replace("dot3Stats", "", $oid);
|
||||
$oid_ds = truncate($oid, 19, '');
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $oid;
|
||||
$rrd_list[$i]['ds'] = $oid_ds;
|
||||
$i++;
|
||||
}
|
||||
if (rrd_is_file($rrd_filename)) {
|
||||
foreach ($oids as $oid) {
|
||||
$oid = str_replace("dot3Stats", "", $oid);
|
||||
$oid_ds = truncate($oid, 19, '');
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $oid;
|
||||
$rrd_list[$i]['ds'] = $oid_ds;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 1;
|
||||
$unit_text = "Errors";
|
||||
$colours = "mixed";
|
||||
$nototal = 1;
|
||||
$unit_text = "Errors";
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_multi_simplex_separated.inc.php");
|
||||
include($config['html_dir'] . "/includes/graphs/generic_multi_simplex_separated.inc.php");
|
||||
} else {
|
||||
graph_error($type.'_'.$subtype); // Graph Template Missing;
|
||||
graph_error($type . '_' . $subtype); // Graph Template Missing;
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
Reference in New Issue
Block a user