From ff3003dff44451209b314f441420100f3eef74ea Mon Sep 17 00:00:00 2001 From: Michele Di Maria Date: Wed, 6 Feb 2013 00:23:59 +0100 Subject: "Status-Queue" page: many interface improvements Add many improvements: - Each queue background has a different color depending on the level - Improved the number format of the PPS data - The children queues can be collapsed/expanded --- usr/local/www/status_queues.php | 48 +++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index 8dedf7d..2f18775 100755 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -93,7 +93,7 @@ if ($_REQUEST['getactivity']) { if ($packet_s < 0) {$packet_s = 0;} $finscript .= "jQuery('#queue{$q->queuename}widthb').width('{$packet_s}');"; $finscript .= "jQuery('#queue{$q->queuename}widtha').width('" . (200 - $packet_s) . "');"; - $finscript .= "jQuery('#queue{$q->queuename}pps').val('{$q->pps}');"; + $finscript .= "jQuery('#queue{$q->queuename}pps').val('" . number_format($q->pps,1) . "');"; $finscript .= "jQuery('#queue{$q->queuename}bps').val('" . str_replace("bytes", "B", format_bytes($q->bandwidth)) . "ps');"; $finscript .= "jQuery('#queue{$q->queuename}borrows').val('{$q->borrows}');"; $finscript .= "jQuery('#queue{$q->queuename}suspends').val('{$q->suspends}');"; @@ -152,7 +152,7 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < + processQueues($altqstats, 0, "")?>

@@ -160,13 +160,26 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < .
.

+ 250) $gray_value = 255; + $row_background = str_repeat(dechex($gray_value), 3); + $parent_name = $parent_name . " queuerow" . $altqstats['name'] . $altqstats['interface']; foreach ($altqstats['queue'] as $q) { $if_name = ""; foreach ($if_queue_list as $oif => $real_name) @@ -178,8 +191,8 @@ function processQueues($altqstats, $level){ } } ?> - - + + " . htmlspecialchars($q['name']) . ""; ?> - + "; + echo ""; echo ""; echo ""; echo ""; echo " "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + if (is_array($q['queue'])) { + echo "+/-"; + } + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; ?> queuename = $xml['name'] . $xml['interface']; - $current->pps = intval($xml['measured']); - $current->bandwidth = intval($xml['measuredspeedint']); + $current->pps = $xml['measured']; + $current->bandwidth = $xml['measuredspeedint']; $current->borrows = intval($xml['borrows']); $current->suspends = intval($xml['suspends']); $current->drops = intval($xml['drops']); -- cgit v1.1