diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-21 16:30:49 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-21 16:30:49 +0000 |
commit | a11c626c5183164f5f6aa81e33931b3a5a55f046 (patch) | |
tree | 33e7c7e4c3686ee19933465afa24445bf50dee7d /usr/local/www | |
parent | bc864536c8f8fef6e611f17c063e77e54186e622 (diff) | |
download | pfsense-a11c626c5183164f5f6aa81e33931b3a5a55f046.zip pfsense-a11c626c5183164f5f6aa81e33931b3a5a55f046.tar.gz |
Now that we have a queue status page, remove the graphs from the queues page.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/firewall_shaper_queues.php | 70 |
1 files changed, 1 insertions, 69 deletions
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php index bea09e8..b5b4a23 100755 --- a/usr/local/www/firewall_shaper_queues.php +++ b/usr/local/www/firewall_shaper_queues.php @@ -164,16 +164,7 @@ if ($_GET['act'] == "del") { </td> <td class="listbg"> <font color="#FFFFFF"><?=htmlspecialchars($queue['name']);?> - <br> -<?php - $cpuUsage = 0; - echo "<img src='bar_left.gif' height='15' width='4' border='0' align='absmiddle'>"; - echo "<img src='bar_blue.gif' height='15' name='queue{$i}widtha' id='queue{$i}widtha' width='" . $cpuUsage . "' border='0' align='absmiddle'>"; - echo "<img src='bar_gray.gif' height='15' name='queue{$i}widthb' id='queue{$i}widthb' width='" . (100 - $cpuUsage) . "' border='0' align='absmiddle'>"; - echo "<nobr><img src='bar_right.gif' height='15' width='5' border='0' align='absmiddle'> "; - echo "<input style='border: 0px solid white; background-color:#990000; color:#FFFFFF;' size='25' name='queue{$i}meter' id='queue{$i}meter' value='( Loading )'></nobr>"; -?> - + </td> <td valign="middle" nowrap class="list"> <a href="firewall_shaper_queues_edit.php?id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a> <a href="firewall_shaper_queues.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this queue?')"><img src="x.gif" width="17" height="17" border="0"></a></td> @@ -197,62 +188,3 @@ if ($_GET['act'] == "del") { <?php include("fend.inc"); ?> </body> </html> - -<?php - -sleep(3); - -$counter = 0; -While(!Connection_Aborted()) { - - $stats_array = gather_altq_queue_stats(true); - - /* calculate total packets being moved through all queues. */ - $total_packets_s = 0; - foreach($stats_array as $stats_line) { - $stat_line_split = split("\|", $stats_line); - $total_packets_s = $total_packets_s + intval($stat_line_split[2]); - } - - $i = 0; - foreach($stats_array as $stats_line) { - if($stat_line_split[2] == "" and $counter > 1) { - mwexec("/usr/bin/killall -9 pfctl php"); - exit; - } - - $stat_line_split = split("\|", $stats_line); - $packet_sampled = intval($stat_line_split[2]); - $speed = $stat_line_split[1]; - $borrows = intval($stat_line_split[3]); - - echo "<script language='javascript'>\n"; - - $packet_s = round(100 * (1 - $packet_sampled / $total_packets_s), 0); - - echo "document.queue{$i}widthb.style.width='{$packet_s}';\n"; - echo "document.queue{$i}widtha.style.width='" . (100 - $packet_s) . "';\n"; - $borrows_txt = ""; - if(intval($borrows > 0)) - $borrows_txt = " - {$borrows} borrows"; - echo "document.forms[0].queue{$i}meter.value = '" . $packet_sampled . "/pps - " . $speed . "{$borrows_txt}';\n"; - echo "</script>\n"; - $i++; - } - - /* - * prevent user from running out of ram. - * firefox and ie can be a bear on ram usage! - */ - $counter++; - if($counter > 40) { - echo "Redirecting to <a href=\"firewall_shaper_queues.php\">Firewall Shaper Queues</a>.<p>"; - echo "<meta http-equiv=\"refresh\" content=\"1;url=firewall_shaper_queues.php\">"; - mwexec("/usr/bin/killall -9 pfctl"); - exit; - } -} - -mwexec("/usr/bin/killall -9 pfctl php"); - -?> |