From 4006a43733a4fcc5fd517670ef4b36eb2db96e7e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 6 Mar 2013 19:26:54 +0545 Subject: Add display by host name to Traffic Graph --- usr/local/www/status_graph.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php index 04f91a5..620c996 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['hostipformat']) { + $curhostipformat = $_GET['hostipformat']; +} else { + $curhostipformat = ""; +} $pgtitle = array(gettext("Status"),gettext("Traffic Graph")); @@ -111,11 +116,12 @@ include("head.inc"); function updateBandwidth(){ var hostinterface = jQuery("#if").val(); var sorting = jQuery("#sort").val(); - bandwidthAjax(hostinterface, sorting); + var hostipformat = jQuery("#hostipformat").val(); + bandwidthAjax(hostinterface, sorting, hostipformat); } -function bandwidthAjax(hostinterface, sorting) { - uri = "bandwidth_by_ip.php?if=" + hostinterface + "&sort=" + sorting; +function bandwidthAjax(hostinterface, sorting, hostipformat) { + uri = "bandwidth_by_ip.php?if=" + hostinterface + "&sort=" + sorting + "&hostipformat=" + hostipformat; var opt = { // Use GET type: 'get', @@ -208,6 +214,11 @@ foreach ($ifdescrs as $ifn => $ifd) { +, Display: +

@@ -217,7 +228,7 @@ foreach ($ifdescrs as $ifn => $ifd) {
- + -- cgit v1.1