Revision ebfbb1b3
Added by Stephen Beaver over 9 years ago
src/usr/local/www/status_queues.php | ||
---|---|---|
241 | 241 |
function processQueues($altqstats, $level, $parent_name) { |
242 | 242 |
global $g; |
243 | 243 |
global $if_queue_list; |
244 |
$gray_value = 190 + $level * 10; |
|
245 |
if ($gray_value > 250) { |
|
246 |
$gray_value = 255; |
|
247 |
} |
|
248 |
$row_background = str_repeat(dechex($gray_value), 3); |
|
244 |
|
|
245 |
$row_class="alert_default"; |
|
246 |
|
|
249 | 247 |
$parent_name = $parent_name . " queuerow" . $altqstats['name'] . $altqstats['interface']; |
250 | 248 |
$prev_if = $altqstats['interface']; |
251 | 249 |
foreach ($altqstats['queue'] as $q) { |
... | ... | |
262 | 260 |
} |
263 | 261 |
?> |
264 | 262 |
<tr class="<?php echo $parent_name?>"> |
265 |
<td style="background-color:#<?php echo $row_background?>;padding-left:<?php echo $level * 20?>px;">
|
|
263 |
<td class="<?=$row_class?>" style="padding-left:<?=$level * 20?>px;">
|
|
266 | 264 |
<?php |
267 | 265 |
if (is_array($q['queue'])) { |
268 | 266 |
echo "<a href=\"#\" onclick=\"StatsShowHide('queuerow{$q['name']}{$q['interface']}');return false\">+/-</a>"; |
... | ... | |
276 | 274 |
</td> |
277 | 275 |
<?php |
278 | 276 |
$cpuUsage = 0; |
279 |
echo "<td style=\"background-color:#{$row_background}\" >";
|
|
280 |
echo "<div class=\"progress\" style=\"height: 7px;width: 170px;\">
|
|
281 |
<div class=\"progress-bar\" role=\"progressbar\" id=\"queue{$q['name']}{$q['interface']}width\" aria-valuenow=\"70\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: " . ($cpuUsage*100) . "%;\"></div>
|
|
282 |
</div>";
|
|
283 |
echo "</td>";
|
|
284 |
echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}pps\" id=\"queue{$q['name']}{$q['interface']}pps\" value=\"(" . gettext("Loading") . ")\" /></td>";
|
|
285 |
echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:80px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}bps\" id=\"queue{$q['name']}{$q['interface']}bps\" value=\"\" /></td>";
|
|
286 |
echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}borrows\" id=\"queue{$q['name']}{$q['interface']}borrows\" value=\"\" /></td>";
|
|
287 |
echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}suspends\" id=\"queue{$q['name']}{$q['interface']}suspends\" value=\"\" /></td>";
|
|
288 |
echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}drops\" id=\"queue{$q['name']}{$q['interface']}drops\" value=\"\" /></td>";
|
|
289 |
echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}length\" id=\"queue{$q['name']}{$q['interface']}length\" value=\"\" /></td>";
|
|
277 |
print('<td class="' . $row_class . '">');
|
|
278 |
print('<div class="progress" style="height: 7px;width: 170px;">');
|
|
279 |
print(' <div class="progress-bar" role="progressbar" id="queue' . $q['name'] . $q['interface'] . 'width" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: ' . $cpuUsage*100 . '%;\"></div>');
|
|
280 |
print(' </div>');
|
|
281 |
print('</td>');
|
|
282 |
print('<td class="' . $row_class . '"><input readonly style="border:0;width:70px;text-align:right;" size="10" name="queue' . $q['name'] . $q['interface'] . 'pps" id="queue' . $q['name'] . $q['interface'] . 'pps" value="(' . gettext("Loading") . ')" /></td>');
|
|
283 |
print('<td class="' . $row_class . '"><input readonly style="border:0;width:80px;text-align:right;" size="10" name="queue' . $q['name'] . $q['interface'] . 'bps" id="queue' . $q['name'] . $q['interface'] . 'bps" value="" /></td>');
|
|
284 |
print('<td class="' . $row_class . '"><input readonly style="border:0;width:70px;text-align:right;" size="10" name="queue' . $q['name'] . $q['interface'] . 'borrows" id="queue' . $q['name'] . $q['interface'] . 'borrows" value="" /></td>');
|
|
285 |
print('<td class="' . $row_class . '"><input readonly style="border:0;width:70px;text-align:right;" size="10" name="queue' . $q['name'] . $q['interface'] . 'suspends" id="queue' . $q['name'] . $q['interface'] . 'suspends" value="" /></td>');
|
|
286 |
print('<td class="' . $row_class . '"><input readonly style="border:0;width:70px;text-align:right;" size="10" name="queue' . $q['name'] . $q['interface'] . 'drops" id="queue' . $q['name'] . $q['interface'] . 'drops" value="" /></td>');
|
|
287 |
print('<td class="' . $row_class . '"><input readonly style="border:0;width:70px;text-align:right;" size="10" name="queue' . $q['name'] . $q['interface'] . 'length" id="queue' . $q['name'] . $q['interface'] . 'length" value="" /></td>');
|
|
290 | 288 |
?> |
291 | 289 |
</tr> |
292 | 290 |
<?php |
Also available in: Unified diff
Fixed # 5770
Gave page a makeover