summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_graph.php
diff options
context:
space:
mode:
authorMichele Di Maria <michele@nt2.it>2012-11-07 08:07:36 +0100
committerMichele Di Maria <michele@nt2.it>2012-11-07 08:07:36 +0100
commit893fb622feffe3590eb1f8de2914ce22376d0696 (patch)
treee8d8158a5dfb38d5ea73b4cd7571bcaa3e226d0d /usr/local/www/status_graph.php
parent9539590cc1094ed44908fe289ff23d1893f64bd7 (diff)
downloadpfsense-893fb622feffe3590eb1f8de2914ce22376d0696.zip
pfsense-893fb622feffe3590eb1f8de2914ce22376d0696.tar.gz
Adds "Sort by direction" in the Traffic Graph page
Added the option to sort IPs by direction in the Traffic Graph page, and improved the detection of the local network to monitor (before the results could not be realistic because of too many "local IPs" were monitored.
Diffstat (limited to 'usr/local/www/status_graph.php')
-rwxr-xr-xusr/local/www/status_graph.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php
index bbe3a66..7f59cb3 100755
--- a/usr/local/www/status_graph.php
+++ b/usr/local/www/status_graph.php
@@ -81,6 +81,11 @@ if ($_GET['if']) {
} else {
$curif = "wan";
}
+if ($_GET['sort']) {
+ $cursort = $_GET['sort'];
+} else {
+ $cursort = "";
+}
$pgtitle = array(gettext("Status"),gettext("Traffic Graph"));
@@ -94,11 +99,12 @@ include("head.inc");
function updateBandwidth(){
var hostinterface = "<?php echo htmlspecialchars($curif); ?>";
- bandwidthAjax(hostinterface);
+ var sorting = "<?php echo htmlspecialchars($cursort); ?>";
+ bandwidthAjax(hostinterface, sorting);
}
-function bandwidthAjax(hostinterface) {
- uri = "bandwidth_by_ip.php?if=" + hostinterface;
+function bandwidthAjax(hostinterface, sorting) {
+ uri = "bandwidth_by_ip.php?if=" + hostinterface + "&sort=" + sorting;
var opt = {
// Use GET
type: 'get',
@@ -184,6 +190,11 @@ foreach ($ifdescrs as $ifn => $ifd) {
}
?>
</select>
+, Sort by:
+<select name="sort" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
+ <option value="">Bandwidth In</option>
+ <option value="out"<?php if ($cursort == "out") echo " selected";?>>Bandwidth Out</option>
+</select>
</form>
<p><form method="post" action="status_graph.php">
</form>
OpenPOWER on IntegriCloud