summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2013-03-07 10:43:10 -0800
committerJim P <jim@pingle.org>2013-03-07 10:43:10 -0800
commitc988ed09be56392cb3b72f20233b0dd82740345c (patch)
tree92898edd1041a51f02941fd8b16bdbaa2c0441a8
parent1dedfdd1b7eeca5f41f8e85c237a70cc6ab22fbd (diff)
parent5356362ca3f71efadfd06814ef9f14cf1ff51a56 (diff)
downloadpfsense-c988ed09be56392cb3b72f20233b0dd82740345c.zip
pfsense-c988ed09be56392cb3b72f20233b0dd82740345c.tar.gz
Merge pull request #469 from phil-davis/master
Fix stale bandwidth-by-IP table entries
-rwxr-xr-xusr/local/www/status_graph.php42
1 files changed, 20 insertions, 22 deletions
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php
index 636f5d9..2342700 100755
--- a/usr/local/www/status_graph.php
+++ b/usr/local/www/status_graph.php
@@ -153,32 +153,30 @@ function updateBandwidthHosts(data){
d = document;
//parse top ten bandwidth abuser hosts
for (var y=0; y<10; y++){
- if (hosts_split[y] != "" && hosts_split[y] != "no info"){
- if (hosts_split[y]) {
- hostinfo = hosts_split[y].split(";");
+ if ((y < hosts_split.length) && (hosts_split[y] != "") && (hosts_split[y] != "no info")) {
+ hostinfo = hosts_split[y].split(";");
- //update host ip info
- var HostIpID = "hostip" + y;
- var hostip = d.getElementById(HostIpID);
- hostip.innerHTML = hostinfo[0];
+ //update host ip info
+ var HostIpID = "hostip" + y;
+ var hostip = d.getElementById(HostIpID);
+ hostip.innerHTML = hostinfo[0];
- //update bandwidth inbound to host
- var hostbandwidthInID = "bandwidthin" + y;
- var hostbandwidthin = d.getElementById(hostbandwidthInID);
- hostbandwidthin.innerHTML = hostinfo[1] + " Bits/sec";
+ //update bandwidth inbound to host
+ var hostbandwidthInID = "bandwidthin" + y;
+ var hostbandwidthin = d.getElementById(hostbandwidthInID);
+ hostbandwidthin.innerHTML = hostinfo[1] + " Bits/sec";
- //update bandwidth outbound from host
- var hostbandwidthOutID = "bandwidthout" + y;
- var hostbandwidthOut = d.getElementById(hostbandwidthOutID);
- hostbandwidthOut.innerHTML = hostinfo[2] + " Bits/sec";
+ //update bandwidth outbound from host
+ var hostbandwidthOutID = "bandwidthout" + y;
+ var hostbandwidthOut = d.getElementById(hostbandwidthOutID);
+ hostbandwidthOut.innerHTML = hostinfo[2] + " Bits/sec";
- //make the row appear if hidden
- var rowid = "#host" + y;
- if (jQuery(rowid).css('display') == "none"){
- //hide rows that contain no data
- jQuery(rowid).show(1000);
- }
- }
+ //make the row appear if hidden
+ var rowid = "#host" + y;
+ if (jQuery(rowid).css('display') == "none"){
+ //hide rows that contain no data
+ jQuery(rowid).show(1000);
+ }
}
else
{
OpenPOWER on IntegriCloud