From 6ba3121b277ad0840f253e2248353d5c6e64f6f2 Mon Sep 17 00:00:00 2001 From: Michele Di Maria Date: Thu, 31 Jan 2013 09:07:36 +0100 Subject: Fixes links and PPS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change fixes: - Interface value in the links to the "Firewall: Traffic Shaper" page; - Read the proper PPS value from the qstats XML file.  --- usr/local/www/status_queues.php | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index 8ca445c..8dedf7d 100755 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -50,8 +50,8 @@ header("Pragma: no-cache"); // HTTP/1.0 require("guiconfig.inc"); class QueueStats { public $queuename; - public $pps; - public $bandwidth; + public $pps; + public $bandwidth; public $borrows; public $suspends; public $drops; @@ -150,7 +150,9 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < - +

@@ -164,19 +166,26 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < + global $if_queue_list; + foreach ($altqstats['queue'] as $q) { + $if_name = ""; + foreach ($if_queue_list as $oif => $real_name) + { + if ($oif == $q['interface']) + { + $if_name = $real_name; + break; + } + } + ?> " . htmlspecialchars(convert_real_interface_to_friendly_descr($q['interface'])) . ""; - } + echo "" . htmlspecialchars(convert_real_interface_to_friendly_descr($q['interface'])) . ""; else - { - echo "" . htmlspecialchars($q['name']) . ""; - } + echo "" . htmlspecialchars($q['name']) . ""; ?> @@ -195,11 +204,9 @@ function processQueues($altqstats, $level){ echo ""; ?> - queuename = $xml['name'] . $xml['interface']; - $current->pps = intval($xml['pkts']); + $current->pps = intval($xml['measured']); $current->bandwidth = intval($xml['measuredspeedint']); $current->borrows = intval($xml['borrows']); $current->suspends = intval($xml['suspends']); -- cgit v1.1