initial commit; version 22.5.12042
This commit is contained in:
27
html/includes/graphs/multi-status/auth.inc.php
Normal file
27
html/includes/graphs/multi-status/auth.inc.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (!is_array($vars['id'])) { $vars['id'] = array($vars['id']); }
|
||||
|
||||
$auth = TRUE;
|
||||
|
||||
foreach ($vars['id'] as $status_id)
|
||||
{
|
||||
if (!$auth && !is_status_permitted('status', $status_id))
|
||||
$auth = FALSE;
|
||||
}
|
||||
|
||||
$title = "Multi status :: ";
|
||||
|
||||
// EOF
|
||||
|
48
html/includes/graphs/multi-status/graph.inc.php
Normal file
48
html/includes/graphs/multi-status/graph.inc.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$units = '';
|
||||
$unit_text = 'Value';
|
||||
$total_units = '';
|
||||
|
||||
$i = 1;
|
||||
|
||||
$rrd_list = array();
|
||||
|
||||
foreach ($vars['id'] as $port_id)
|
||||
{
|
||||
|
||||
$status = dbFetchRow("SELECT * FROM `status` WHERE `status_id` = ?", array($port_id));
|
||||
|
||||
$device = device_by_id_cache($status['device_id']);
|
||||
|
||||
$rrd_filename = get_rrd_path($device, get_status_rrd($device, $status));
|
||||
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $status['status_descr'];
|
||||
$rrd_list[$i]['ds'] = 'status';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$colours='mixed';
|
||||
|
||||
$scale_min = "0";
|
||||
$nototal = 1;
|
||||
$simple_rrd = TRUE;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
// EOF
|
||||
|
Reference in New Issue
Block a user