From a7852604cf02799b0308e0aa97ce6aec7e1b8352 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 18 Jun 2015 13:11:25 +0200 Subject: [PATCH] queues: remove status_queues.php --- .../app/models/OPNsense/Base/Menu/Menu.xml | 1 - .../OPNsense/Core/ACL_Legacy_Page_Map.json | 7 - src/www/shortcuts.inc | 1 - src/www/status_filter_reload.php | 3 - src/www/status_queues.php | 311 ------------------ 5 files changed, 323 deletions(-) delete mode 100644 src/www/status_queues.php diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml index b3a9fc51d..08dd158d2 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml @@ -155,7 +155,6 @@ - diff --git a/src/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json b/src/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json index f07015a1b..cfbadc415 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json +++ b/src/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json @@ -1286,13 +1286,6 @@ "ifstats.php*" ] }, - "page-status-trafficshaper-queues": { - "name": "WebCfg - Status: Traffic shaper: Queues page", - "descr": "Allow access to the 'Status: Traffic shaper: Queues' page.", - "match": [ - "status_queues.php*" - ] - }, "page-status-upnpstatus": { "name": "WebCfg - Status: UPnP Status page", "descr": "Allow access to the 'Status: UPnP Status' page.", diff --git a/src/www/shortcuts.inc b/src/www/shortcuts.inc index c49a3fdce..e44f48e62 100644 --- a/src/www/shortcuts.inc +++ b/src/www/shortcuts.inc @@ -212,7 +212,6 @@ $shortcuts['interfaces']['status'] = "status_interfaces.php"; $shortcuts['trafficshaper'] = array(); $shortcuts['trafficshaper']['main'] = "firewall_shaper.php"; -$shortcuts['trafficshaper']['status'] = "status_queues.php"; $shortcuts['forwarder'] = array(); $shortcuts['forwarder']['main'] = "services_dnsmasq.php"; diff --git a/src/www/status_filter_reload.php b/src/www/status_filter_reload.php index 5f4a69059..b2969bbbb 100644 --- a/src/www/status_filter_reload.php +++ b/src/www/status_filter_reload.php @@ -86,7 +86,6 @@ include("head.inc"); -

@@ -122,8 +121,6 @@ function update_data(obj) { } else if(result_text == "Done") { jQuery('#status').html('Done. The filter rules have been reloaded.'); jQuery('#reloadinfo').css("visibility","hidden"); - jQuery('#doneurl').css("visibility","visible"); - jQuery('#doneurl').html("

Queue Status<\/a><\/p>"); } window.setTimeout('update_status_thread()', 2500); } diff --git a/src/www/status_queues.php b/src/www/status_queues.php deleted file mode 100644 index 5eb775a1f..000000000 --- a/src/www/status_queues.php +++ /dev/null @@ -1,311 +0,0 @@ -pps) - $bigger_stat = $q->pps; - } - } - else - { - foreach($statistics as $q) { - if ($bigger_stat < $q->bandwidth) - $bigger_stat = $q->bandwidth; - } - } - $finscript = ""; - foreach($statistics as $q) { - if ($stat_type == "0") - $packet_s = round(150 * (1 - $q->pps / $bigger_stat), 0); - else - $packet_s = round(150 * (1 - $q->bandwidth / $bigger_stat), 0); - if ($packet_s < 0) {$packet_s = 0;} - $finscript .= "jQuery('#queue{$q->queuename}widthb').width('{$packet_s}');"; - $finscript .= "jQuery('#queue{$q->queuename}widtha').width('" . (150 - $packet_s) . "');"; - $finscript .= "jQuery('#queue{$q->queuename}pps').val('" . number_format($q->pps,1) . "');"; - $finscript .= "jQuery('#queue{$q->queuename}bps').val('" . format_bits($q->bandwidth) . "');"; - $finscript .= "jQuery('#queue{$q->queuename}borrows').val('{$q->borrows}');"; - $finscript .= "jQuery('#queue{$q->queuename}suspends').val('{$q->suspends}');"; - $finscript .= "jQuery('#queue{$q->queuename}drops').val('{$q->drops}');"; - $finscript .= "jQuery('#queue{$q->queuename}length').val('{$q->queuelength}');"; - } - unset($statistics, $altqstats); - header("Content-type: text/javascript"); - echo $finscript; - exit; -} -$pgtitle = array(gettext("Status"),gettext("Traffic shaper"),gettext("Queues")); -$shortcut_section = "trafficshaper"; -include("head.inc"); -?> - - - - -

- -
- - - - - - 250) $gray_value = 255; - $row_background = str_repeat(dechex($gray_value), 3); - $parent_name = $parent_name . " queuerow" . $altqstats['name'] . $altqstats['interface']; - $prev_if = $altqstats['interface']; - foreach ($altqstats['queue'] as $q) { - $if_name = ""; - foreach ($if_queue_list as $oif => $real_name) { - if ($oif == $q['interface']) { - $if_name = $real_name; - break; - } - } - if ($prev_if != $q['interface']) { - echo "Interface ". htmlspecialchars(convert_real_interface_to_friendly_descr($q['interface'])) . ""; - $prev_if = $q['interface']; - } - ?> - - - - Root queue"; - else - echo "" . htmlspecialchars($q['name']) . ""; - ?> - - - "; - echo ""; - echo "" . htmlspecialchars($q["; - echo "" . htmlspecialchars($q["; - echo " "; - if (is_array($q['queue'])) { - echo "+/- "; - } - echo " "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - ?> - - queuename = $xml['name'] . $xml['interface']; - $current->queuelength = $xml['qlength']; - $current->pps = $xml['measured']; - $current->bandwidth = $xml['measuredspeedint']; - $current->borrows = intval($xml['borrows']); - $current->suspends = intval($xml['suspends']); - $current->drops = intval($xml['droppedpkts']); - if (is_array($xml['queue'])) { - foreach($xml['queue'] as $q) { - $child = statsQueues($q); - $current->pps += $child->pps; - $current->bandwidth += $child->bandwidth; - $current->borrows += $child->borrows; - $current->suspends += $child->suspends; - $current->drops += $child->drops; - } - } - unset($child); - $statistics[] = $current; - return $current; -} -function format_bits($bits) { - if ($bits >= 1000000000) { - return sprintf("%.2f Gbps", $bits/1000000000); - } else if ($bits >= 1000000) { - return sprintf("%.2f Mbps", $bits/1000000); - } else if ($bits >= 1000) { - return sprintf("%.2f Kbps", $bits/1000); - } else { - return sprintf("%d bps", $bits); - } -}