Commit version 24.12.13800
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,31 +6,31 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (is_numeric($vars['id']))
|
||||
{
|
||||
$tunnel = dbFetchRow("SELECT * FROM `ipsec_tunnels`WHERE `tunnel_id` = ?", array($vars['id']));
|
||||
if (!is_intnum($vars['id'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_numeric($tunnel['device_id']) && ($auth || device_permitted($tunnel['device_id'])))
|
||||
{
|
||||
$tunnel = dbFetchRow("SELECT * FROM `ipsec_tunnels` WHERE `tunnel_id` = ?", [$vars['id']]);
|
||||
|
||||
if (is_numeric($tunnel['device_id']) && ($auth || device_permitted($tunnel['device_id']))) {
|
||||
$device = device_by_id_cache($tunnel['device_id']);
|
||||
|
||||
if ($tunnel['tunnel_endhash'])
|
||||
{
|
||||
// New index
|
||||
$rrd_index = $tunnel['local_addr'] . '-' . $tunnel['peer_addr'] . '-' . $tunnel['tunnel_endhash'];
|
||||
if ($tunnel['tunnel_endhash']) {
|
||||
// New index
|
||||
$rrd_index = $tunnel['local_addr'] . '-' . $tunnel['peer_addr'] . '-' . $tunnel['tunnel_endhash'];
|
||||
} else {
|
||||
$rrd_index = $tunnel['peer_addr'];
|
||||
$rrd_index = $tunnel['peer_addr'];
|
||||
}
|
||||
$rrd_filename = get_rrd_path($device, "ipsectunnel-".$rrd_index.".rrd");
|
||||
$rrd_filename = get_rrd_path($device, "ipsectunnel-" . $rrd_index . ".rrd");
|
||||
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: IPSEC Tunnel :: " . escape_html($tunnel['peer_addr']);
|
||||
$auth = TRUE;
|
||||
}
|
||||
$auth = TRUE;
|
||||
|
||||
$graph_title = device_name($device, TRUE);
|
||||
$graph_title .= " :: IPSEC Tunnel :: " . $tunnel['peer_addr'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,17 +5,17 @@
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
$ds_in = "TunInOctets";
|
||||
$ds_in = "TunInOctets";
|
||||
$ds_out = "TunOutOctets";
|
||||
|
||||
$format = "octets";
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_data.inc.php");
|
||||
include($config['html_dir'] . "/includes/graphs/generic_data.inc.php");
|
||||
|
||||
?>
|
||||
|
@ -5,26 +5,26 @@
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
$ds_in = "TunInPkts";
|
||||
$ds_in = "TunInPkts";
|
||||
$ds_out = "TunOutPkts";
|
||||
|
||||
$colour_area_in = $config['colours']['graphs']['pkts']['in_area'];
|
||||
$colour_line_in = $config['colours']['graphs']['pkts']['in_line'];
|
||||
$colour_area_in = $config['colours']['graphs']['pkts']['in_area'];
|
||||
$colour_line_in = $config['colours']['graphs']['pkts']['in_line'];
|
||||
$colour_area_out = $config['colours']['graphs']['pkts']['out_area'];
|
||||
$colour_line_out = $config['colours']['graphs']['pkts']['out_line'];
|
||||
|
||||
$colour_area_in_max = $config['colours']['graphs']['pkts']['in_max'];
|
||||
$colour_area_in_max = $config['colours']['graphs']['pkts']['in_max'];
|
||||
$colour_area_out_max = $config['colours']['graphs']['pkts']['out_max'];
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "Packets";
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_duplex.inc.php");
|
||||
include($config['html_dir'] . "/includes/graphs/generic_duplex.inc.php");
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user