All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ ##|+PRIV ##|*IDENT=page-status-rrdgraphs ##|*NAME=Status: RRD Graphs page ##|*DESCR=Allow access to the 'Status: RRD Graphs' page. ##|*MATCH=status_rrd_graph_settings.php* ##|-PRIV require("guiconfig.inc"); if (!is_array($config['gateways']['settings'])) $config['gateways']['settings'] = array(); $a_settings = &$config['gateways']['settings']; $changedesc = "Gateways: "; $input_errors = array(); if (empty($a_settings)) { $pconfig['latencylow'] = "100"; $pconfig['latencyhigh'] = "500"; $pconfig['losslow'] = "10"; $pconfig['losshigh'] = "20"; } else { $pconfig['latencylow'] = $a_settings['latencylow']; $pconfig['latencyhigh'] = $a_settings['latencyhigh']; $pconfig['losslow'] = $a_settings['losslow']; $pconfig['losshigh'] = $a_settings['losshigh']; } if ($_POST) { unset($input_errors); $pconfig = $_POST; /* input validation */ if($_POST['latencylow']) { if (! is_numeric($_POST['latencylow'])) { $input_errors[] = "The low latency watermark needs to be a numeric value."; } } if($_POST['latencyhigh']) { if (! is_numeric($_POST['latencyhigh'])) { $input_errors[] = "The high latency watermark needs to be a numeric value."; } } if($_POST['losslow']) { if (! is_numeric($_POST['losslow'])) { $input_errors[] = "The low loss watermark needs to be a numeric value."; } } if($_POST['losshigh']) { if (! is_numeric($_POST['losshigh'])) { $input_errors[] = "The high loss watermark needs to be a numeric value."; } } if(($_POST['latencylow']) && ($_POST['latencyhigh'])){ if(($_POST['latencylow'] > $_POST['latencyhigh'])) { $input_errors[] = "The High latency watermark needs to be higher then the low latency watermark"; } } if(($_POST['losslow']) && ($_POST['losshigh'])){ if($_POST['losslow'] > $_POST['losshigh']) { $input_errors[] = "The High packet loss watermark needs to be higher then the low packet loss watermark"; } } if (!$input_errors) { $a_settings['latencylow'] = $_POST['latencylow']; $a_settings['latencyhigh'] = $_POST['latencyhigh']; $a_settings['losslow'] = $_POST['losslow']; $a_settings['losshigh'] = $_POST['losshigh']; $config['gateways']['settings'] = $a_settings; $retval = 0; $retval = setup_gateways_monitor(); write_config(); $savemsg = get_std_save_message($retval); } } $pgtitle = array("Gateways","Settings"); include("head.inc"); ?>
Latency boundaries From To
These define the low and high water marks for latency in milliseconds.
Packet Loss boundaries From To
These define the low and high water marks for packet loss in %.