From f0a3b883e64692edea9f8332ee6ba361e28b66f8 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 15 Jun 2009 19:06:29 -0400 Subject: Adding Scott Dale's rate package to system -> traffic graphs. Cool stuff! --- usr/local/www/bandwidth_by_ip.php | 77 ++++++++++++++ usr/local/www/status_graph.php | 206 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 275 insertions(+), 8 deletions(-) create mode 100755 usr/local/www/bandwidth_by_ip.php diff --git a/usr/local/www/bandwidth_by_ip.php b/usr/local/www/bandwidth_by_ip.php new file mode 100755 index 0000000..3fd01a6 --- /dev/null +++ b/usr/local/www/bandwidth_by_ip.php @@ -0,0 +1,77 @@ + diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php index 2b58bad..12a9fd3 100755 --- a/usr/local/www/status_graph.php +++ b/usr/local/www/status_graph.php @@ -40,17 +40,18 @@ ##|-PRIV + require("guiconfig.inc"); if ($_POST['width']) $width = $_POST['width']; else - $width = "550"; + $width = "100%"; if ($_POST['height']) $height = $_POST['height']; else - $height = "275"; + $height = "200"; if ($_GET['if']) @@ -59,14 +60,104 @@ else $curif = "wan"; $pgtitle = array("Status","Traffic Graph"); + include("head.inc"); ?> + + + + + 'WAN', 'lan' => 'LAN'); + +for($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { + if(isset($config['interfaces']['opt' . $j]['enable'])) + $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr']; +} +if((isset($config['ipsec']['enable'])) || (isset($config['ipsec']['mobileclients']['enable']))) { + $ifdescrs['ipsec'] = "IPSEC"; +} /* link the ipsec interface magically */ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) @@ -89,13 +180,112 @@ foreach ($ifdescrs as $ifn => $ifd) {

-

- - - Your browser does not support the type SVG! You need to either use Firefox or download the Adobe SVG plugin. - +
+
+ + + Your browser does not support the type SVG! You need to either use Firefox or download the Adobe SVG plugin. + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Host IPBandwidth InBandwidth Out
+
+ + -- cgit v1.1