Project

General

Profile

« Previous | Next » 

Revision 737aef33

Added by Phil Davis over 11 years ago

Make Local the default filter for Traffic Graph

to preserve the old behavior, that it shows "Local" traffic when first started.

View differences:

usr/local/www/bandwidth_by_ip.php
30 30
$netmask = find_interface_subnet($real_interface);
31 31
$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";
32 32

  
33
// see if they want all, local or remote IPs returned
33
// see if they want local, remote or all IPs returned
34 34
$filter = $_GET['filter'];
35 35

  
36
if ($filter == "")
37
	$filter = "local";
38

  
36 39
if ($filter == "local") {
37 40
	$ratesubnet = "-c " . $intsubnet;
38 41
} else {
......
79 82
    $emptyinfocounter = 1;
80 83
    if ($bandwidthinfo != "") {
81 84
        $infoarray = explode (":",$bandwidthinfo);
82
		if (($filter == "") ||
85
		if (($filter == "all") ||
83 86
		    (($filter == "local") && (ip_in_subnet($infoarray[0], $intsubnet))) ||
84 87
		    (($filter == "remote") && (!ip_in_subnet($infoarray[0], $intsubnet)))) {
85 88
			if ($hostipformat == "") {

Also available in: Unified diff