summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/wizards
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-12-22 10:19:17 -0500
committerjim-p <jimp@pfsense.org>2016-12-22 10:20:29 -0500
commitaa64bb6565db2f788846eee9a62bccde280a605a (patch)
tree01e13f88272ea15e9d9dcc6c19e6fb839e6b0183 /src/usr/local/www/wizards
parent5e866e1280c42f6b62abd48cab8099763e80c448 (diff)
downloadpfsense-aa64bb6565db2f788846eee9a62bccde280a605a.zip
pfsense-aa64bb6565db2f788846eee9a62bccde280a605a.tar.gz
Be more forthcoming with errors about ALTQ interfaces in relevant areas of the GUI. In particular, note when there are no capable interfaces assigned. Implements #7032
Diffstat (limited to 'src/usr/local/www/wizards')
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc8
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml2
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc15
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml4
4 files changed, 20 insertions, 9 deletions
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
index f5c0448..6bd7a05 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
@@ -38,8 +38,12 @@ function step1_stepbeforeformdisplay() {
}
foreach ($fields as &$field)
- if ($field['name'] == 'numberofconnections')
+ if ($field['name'] == 'numberofconnections') {
$field['value'] = ($wans < $lans ? $wans : $lans);
+ if (($wans == 0) && ($lans == 0)) {
+ $field['description'] .= sprint_info_box(gettext("This firewall does not have any interfaces assigned that are capable of using ALTQ traffic shaping."), 'danger', false);
+ }
+ }
}
function step1_submitphpaction() {
@@ -76,7 +80,7 @@ function step2_stepbeforeformdisplay() {
}
$numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']);
if ($numberofconnections > ($wans < $lans ? $wans : $lans)) {
- $savemsg=gettext("There are less interfaces than number of connections!");
+ $savemsg=gettext("The specified number of connections is greater than the number of ALTQ-capable assigned interfaces!");
$stepid--;
return;
}
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml
index ce74605..edaa98d 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml
@@ -40,7 +40,7 @@
<name>numberofconnections</name>
<type>input</type>
<validate>^[0-9]+$</validate>
- <description>Number of connections the system has</description>
+ <description>Number of WAN-type connections (Gateway selected on their interface settings, or dynamic assignment.)</description>
<bindstofield>ezshaper->step1->numberofconnections</bindstofield>
</field>
<field>
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
index 81e8ac1..e14bc18 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -39,10 +39,17 @@ function step1_stepbeforeformdisplay() {
}
foreach ($fields as &$field) {
- if ($field['name'] == 'numberofconnections')
+ if ($field['name'] == 'numberofconnections') {
$field['value'] = $wans;
- else if ($field['name'] == 'numberoflocalinterfaces')
+ if ($wans == 0) {
+ $field['description'] .= sprint_info_box(gettext("This firewall does not have any WAN-type interfaces assigned that are capable of using ALTQ traffic shaping."), 'danger', false);
+ }
+ } else if ($field['name'] == 'numberoflocalinterfaces') {
$field['value'] = $lans;
+ if ($lans == 0) {
+ $field['description'] .= sprint_info_box(gettext("This firewall does not have any LAN-type interfaces assigned that are capable of using ALTQ traffic shaping."), 'danger', false);
+ }
+ }
}
}
@@ -96,14 +103,14 @@ function step2_stepbeforeformdisplay() {
}
$numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']);
if ($numberofconnections > $wans) {
- $savemsg=gettext("There are less interfaces than number of connections!");
+ $savemsg=gettext("The specified number of connections is greater than the number of ALTQ-capable assigned interfaces!");
$stepid--;
return;
}
$numberoflocalinterfaces = intval($config['ezshaper']['step1']['numberoflocalinterfaces']);
if ($numberoflocalinterfaces > $lans) {
- $savemsg=gettext("There are less interfaces than number of connections!");
+ $savemsg=gettext("The specified number of connections is greater than the number of ALTQ-capable assigned interfaces!");
$stepid--;
return;
}
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml
index e0a5850..64a42c7 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml
@@ -40,7 +40,7 @@
<name>numberofconnections</name>
<type>input</type>
<validate>^[0-9]+$</validate>
- <description>Number of connections the system has</description>
+ <description>Number of WAN-type connections (Gateway selected on their interface settings, or dynamic assignment.)</description>
<bindstofield>ezshaper->step1->numberofconnections</bindstofield>
</field>
<field>
@@ -48,7 +48,7 @@
<name>numberoflocalinterfaces</name>
<type>input</type>
<validate>^[0-9]+$</validate>
- <description>Number of local interfaces the system has</description>
+ <description>Number of local connections (No gateway selected on their interface settings.)</description>
<bindstofield>ezshaper->step1->numberoflocalinterfaces</bindstofield>
</field>
<field>
OpenPOWER on IntegriCloud