. 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. */ /* pfSense_MODULE: routing */ ##|+PRIV ##|*IDENT=page-status-trafficgraph ##|*NAME=Status: Traffic Graph page ##|*DESCR=Allow access to the 'Status: Traffic Graph' page. ##|*MATCH=status_graph.php* ##|*MATCH=bandwidth_by_ip.php* ##|*MATCH=graph.php* ##|*MATCH=ifstats.php* ##|-PRIV require("guiconfig.inc"); if ($_POST['width']) { $width = $_POST['width']; } else { $width = "100%"; } if ($_POST['height']) { $height = $_POST['height']; } else { $height = "200"; } // Get configured interface list $ifdescrs = get_configured_interface_with_descr(); if (isset($config['ipsec']['enable'])) { $ifdescrs['enc0'] = "IPsec"; } foreach (array('server', 'client') as $mode) { if (is_array($config['openvpn']["openvpn-{$mode}"])) { foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { if (!isset($setting['disable'])) { $ifdescrs['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); } } } } if ($_GET['if']) { $curif = $_GET['if']; $found = false; foreach ($ifdescrs as $descr => $ifdescr) { if ($descr == $curif) { $found = true; break; } } if ($found === false) { header("Location: status_graph.php"); exit; } } else { if (empty($ifdescrs["wan"])) { /* Handle the case when WAN has been disabled. Use the first key in ifdescrs. */ reset($ifdescrs); $curif = key($ifdescrs); } else { $curif = "wan"; } } if ($_GET['sort']) { $cursort = $_GET['sort']; } else { $cursort = ""; } if ($_GET['filter']) { $curfilter = $_GET['filter']; } else { $curfilter = ""; } if ($_GET['hostipformat']) { $curhostipformat = $_GET['hostipformat']; } else { $curhostipformat = ""; } $pgtitle = array(gettext("Status"), gettext("Traffic Graph")); include("head.inc"); ?>
=(($curhostipformat == "") ? gettext("Host IP") : gettext("Host Name or IP")); ?> | =gettext("Bandwidth In"); ?> | =gettext("Bandwidth Out"); ?> |
=gettext("Note"); ?>: =gettext("the"); ?> =gettext("Adobe SVG Viewer"); ?>, =gettext("Firefox 1.5 or later or other browser supporting SVG is required to view the graph"); ?>.