summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-11-16 17:49:21 +0000
committerErmal Luçi <eri@pfsense.org>2008-11-16 17:49:21 +0000
commit057399e49d7287b2b17bf8c868808174f6c71141 (patch)
tree0b64da35409995e52c78d4130884505aae025a29 /etc
parent9d5b21c6b89344991c4bc2c48ecbe09477670985 (diff)
downloadpfsense-057399e49d7287b2b17bf8c868808174f6c71141.zip
pfsense-057399e49d7287b2b17bf8c868808174f6c71141.tar.gz
Change backend part to show friendly interface names on shaper.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/shaper.inc19
1 files changed, 10 insertions, 9 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index e84475b..63a14ff 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -378,7 +378,7 @@ class altq_root_queue {
function &get_queue_list($q = null) {
$qlist = array();
-
+
$qlist[$this->GetQname()] = & $this;
if (is_array($this->queues)) {
foreach ($this->queues as $queue)
@@ -472,8 +472,10 @@ class altq_root_queue {
}
function build_tree() {
+ global $shaperIFlist;
+
$tree = " <li><a href=\"firewall_shaper.php?interface=".$this->GetInterface()."&queue=". $this->GetInterface()."&action=show";
- $tree .= "\">" . $this->GetInterface() . "</a>";
+ $tree .= "\">" . $shaperIFlist[$this->GetInterface()] . "</a>";
if (is_array($this->queues)) {
$tree .= "<ul>";
foreach ($this->queues as $q) {
@@ -3217,17 +3219,16 @@ function read_dummynet_config() {
function get_interface_list_to_show() {
global $altq_list_queues, $config;
-
+ global $shaperIFlist;
+
$tree = "";
- foreach ($config['interfaces'] as $if => $ifdesc) {
- if ($altq_list_queues[$if]) {
+ foreach ($shaperIFlist as $shif => $shDescr) {
+ if ($altq_list_queues[$shif]) {
continue;
} else {
- if (!is_altq_capable($ifdesc['if']))
- continue;
- if (!isset($ifdesc['enable']) && $if != "lan" && $if != "wan")
+ if (!is_altq_capable(get_real_interface($shif)))
continue;
- $tree .= " <li><a href=\"firewall_shaper.php?interface=".$if."&action=add\">".$if."</a></li>";
+ $tree .= " <li><a href=\"firewall_shaper.php?interface=".$if."&action=add\">".$shDescr."</a></li>";
}
}
OpenPOWER on IntegriCloud