From da11e022012a72d6fb65b30c12142a19f0fbbc90 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 7 Mar 2013 18:53:40 +0545 Subject: Bandwidth by IP - allow filter by local and remote --- usr/local/www/status_graph.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php index ec7b73d..636f5d9 100755 --- a/usr/local/www/status_graph.php +++ b/usr/local/www/status_graph.php @@ -97,6 +97,11 @@ if ($_GET['sort']) { } else { $cursort = ""; } +if ($_GET['filter']) { + $curfilter = $_GET['filter']; +} else { + $curfilter = ""; +} if ($_GET['hostipformat']) { $curhostipformat = $_GET['hostipformat']; } else { @@ -116,12 +121,13 @@ include("head.inc"); function updateBandwidth(){ var hostinterface = jQuery("#if").val(); var sorting = jQuery("#sort").val(); + var filter = jQuery("#filter").val(); var hostipformat = jQuery("#hostipformat").val(); - bandwidthAjax(hostinterface, sorting, hostipformat); + bandwidthAjax(hostinterface, sorting, filter, hostipformat); } -function bandwidthAjax(hostinterface, sorting, hostipformat) { - uri = "bandwidth_by_ip.php?if=" + hostinterface + "&sort=" + sorting + "&hostipformat=" + hostipformat; +function bandwidthAjax(hostinterface, sorting, filter, hostipformat) { + uri = "bandwidth_by_ip.php?if=" + hostinterface + "&sort=" + sorting + "&filter=" + filter + "&hostipformat=" + hostipformat; var opt = { // Use GET type: 'get', @@ -211,8 +217,14 @@ foreach ($ifdescrs as $ifn => $ifd) { , Sort by: +, Filter: + , Display: