initial commit; version 22.5.12042
This commit is contained in:
28
html/includes/graphs/customer/auth.inc.php
Normal file
28
html/includes/graphs/customer/auth.inc.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME - wtfbbq
|
||||
|
||||
if ($_SESSION['userlevel'] >= "5" || $auth)
|
||||
{
|
||||
$id = $vars['id'];
|
||||
$title = "Customer :: ". escape_html($vars['id']);
|
||||
$auth = TRUE;
|
||||
|
||||
$title_array = array();
|
||||
$title_array[] = array('text' => 'Customer Ports', 'url' => generate_url(array('page' => 'customers')));
|
||||
$title_array[] = array('text' => escape_html($vars['id']), 'url' => generate_url(array('page' => 'customers')));
|
||||
|
||||
}
|
||||
|
||||
// EOF
|
40
html/includes/graphs/customer/bits.inc.php
Normal file
40
html/includes/graphs/customer/bits.inc.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// Generate a list of ports and then call the multi_bits grapher to generate from the list
|
||||
$rrd_list = [];
|
||||
foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = ? AND D.device_id = I.device_id", array($vars['id'])) as $port)
|
||||
{
|
||||
$rrd_filename = get_port_rrdfilename($port, NULL, TRUE);
|
||||
if (rrd_is_file($rrd_filename))
|
||||
{
|
||||
$rrd_list[] = [ 'filename' => $rrd_filename,
|
||||
'descr' => $port['hostname'] ."-". $port['ifDescr'],
|
||||
'descr_in' => device_name($port, TRUE),
|
||||
'descr_out' => short_ifname($port['ifDescr'], NULL, FALSE) ]; // Options sets for skip htmlentities
|
||||
}
|
||||
}
|
||||
|
||||
$units ='b';
|
||||
$total_units ='B';
|
||||
$colours_in ='greens';
|
||||
$multiplier = "8";
|
||||
$colours_out = 'blues';
|
||||
|
||||
$nototal = 1;
|
||||
|
||||
$ds_in = "INOCTETS";
|
||||
$ds_out = "OUTOCTETS";
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_multi_bits_separated.inc.php");
|
||||
|
||||
// EOF
|
Reference in New Issue
Block a user