Commit version 24.12.13800
This commit is contained in:
@ -5,20 +5,22 @@
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
if (!is_array($vars['id'])) { $vars['id'] = array($vars['id']); }
|
||||
if (!is_array($vars['id'])) {
|
||||
$vars['id'] = [$vars['id']];
|
||||
}
|
||||
|
||||
$auth = TRUE;
|
||||
|
||||
foreach ($vars['id'] as $processor_id)
|
||||
{
|
||||
if (!$auth && !is_entity_permitted('processor', $processor_id))
|
||||
$auth = FALSE;
|
||||
foreach ($vars['id'] as $processor_id) {
|
||||
if (!$auth && !is_entity_permitted('processor', $processor_id)) {
|
||||
$auth = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
$title = "Multi Processor :: ";
|
||||
|
@ -4,45 +4,44 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$units = '%';
|
||||
$unit_text = 'Utilisation';
|
||||
$units = '%';
|
||||
$unit_text = 'Utilisation';
|
||||
$total_units = '';
|
||||
|
||||
$i = 1;
|
||||
|
||||
$rrd_list = array();
|
||||
$rrd_list = [];
|
||||
|
||||
foreach ($vars['id'] as $port_id)
|
||||
{
|
||||
foreach ($vars['id'] as $port_id) {
|
||||
|
||||
$processor = dbFetchRow("SELECT * FROM `processors` WHERE `processor_id` = ?", array($port_id));
|
||||
$processor = dbFetchRow("SELECT * FROM `processors` WHERE `processor_id` = ?", [$port_id]);
|
||||
|
||||
$device = device_by_id_cache($processor['device_id']);
|
||||
$device = device_by_id_cache($processor['device_id']);
|
||||
|
||||
$rrd_filename = get_rrd_path($device, "processor-" . $processor['processor_type'] . "-" . $processor['processor_index'] . ".rrd");
|
||||
$rrd_filename = get_rrd_path($device, get_processor_rrd($device, $processor));
|
||||
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = rewrite_entity_name($processor['processor_descr'], 'processor');
|
||||
$rrd_list[$i]['ds'] = 'usage';
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = rewrite_entity_name($processor['processor_descr'], 'processor');
|
||||
$rrd_list[$i]['ds'] = 'usage';
|
||||
|
||||
$i++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$colours='mixed';
|
||||
$colours = 'mixed';
|
||||
|
||||
$scale_min = "0";
|
||||
$scale_max = "100";
|
||||
$nototal = 1;
|
||||
$scale_min = "0";
|
||||
$scale_max = "100";
|
||||
$nototal = 1;
|
||||
$simple_rrd = TRUE;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_multi_line.inc.php");
|
||||
include($config['html_dir'] . "/includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
// EOF
|
||||
|
||||
|
Reference in New Issue
Block a user