summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_graph.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-03-06 19:26:54 +0545
committerPhil Davis <phil.davis@world.inf.org>2013-03-06 19:26:54 +0545
commit4006a43733a4fcc5fd517670ef4b36eb2db96e7e (patch)
treea10c3c267b3f4a4ae78bd5badf231612d8a18a32 /usr/local/www/status_graph.php
parentb710a07883fbc0a462e5aad6bf6f6d85f1126615 (diff)
downloadpfsense-4006a43733a4fcc5fd517670ef4b36eb2db96e7e.zip
pfsense-4006a43733a4fcc5fd517670ef4b36eb2db96e7e.tar.gz
Add display by host name to Traffic Graph
Diffstat (limited to 'usr/local/www/status_graph.php')
-rwxr-xr-xusr/local/www/status_graph.php19
1 files changed, 15 insertions, 4 deletions
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) {
<option value="">Bandwidth In</option>
<option value="out"<?php if ($cursort == "out") echo " selected";?>>Bandwidth Out</option>
</select>
+, Display:
+<select id="hostipformat" name="hostipformat" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
+ <option value="">IP Address</option>
+ <option value="hostname"<?php if ($curhostipformat == "hostname") echo " selected";?>>Host Name</option>
+</select>
</form>
<p>
<div id="niftyOutter">
@@ -217,7 +228,7 @@ foreach ($ifdescrs as $ifn => $ifd) {
<div id="col2" style="float: right; width: 48%; padding: 5px; position: relative;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td class="listtopic" valign="top"><?=gettext("Host IP"); ?></td>
+ <td class="listtopic" valign="top"><?=(($curhostipformat=="hostname") ? gettext("Host Name or IP") : gettext("Host IP")); ?></td>
<td class="listtopic" valign="top"><?=gettext("Bandwidth In"); ?></td>
<td class="listtopic" valign="top"><?=gettext("Bandwidth Out"); ?></td>
</tr>
OpenPOWER on IntegriCloud