summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-08-26 18:58:56 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-08-26 18:58:56 -0400
commit77134809c3e9c33132ec832927cdbfb73d4ac1da (patch)
tree3b8012901decb8ff14843ca37eea3ca4c2cd5338
parent838e2206600f4ce0e1823345a87fadf556b13a95 (diff)
downloadpfsense-77134809c3e9c33132ec832927cdbfb73d4ac1da.zip
pfsense-77134809c3e9c33132ec832927cdbfb73d4ac1da.tar.gz
Fixed #5020
-rw-r--r--src/usr/local/www/firewall_rules_edit.php42
-rw-r--r--src/usr/local/www/system_advanced_firewall.php40
2 files changed, 72 insertions, 10 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 1f6c1d1..8688012 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1501,12 +1501,13 @@ $section->addInput(new Form_Select(
'State type',
$pconfig['statetype'],
array(
- 'keep state' => 'Keep: works with all IP protocols',
- 'sloppy state' => 'Sloppy: works with all IP protocols',
- 'synproxy state' => 'Synproxy: proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined',
- 'none' => 'None: Do not use state mechanisms to keep track. This is only useful if you\'re doing advanced queueing in certain situations',
+ 'keep state' => 'Keep',
+ 'sloppy state' => 'Sloppy',
+ 'synproxy state' => 'Synproxy',
+ 'none' => 'None',
)
-))->setHelp('Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.');
+))->setHelp('Select which type of state tracking mechanism you would like to use. If in doubt, use keep state' . '<br />' .
+ '<span></span>');
$section->addInput(new Form_Checkbox(
'nosync',
@@ -1940,7 +1941,36 @@ events.push(function(){
$('.table-flags').addClass('hidden');
else
$('.table-flags').removeClass('hidden');
- });
+ });
+
+ // Change help text based on the selector value
+ function setHelpText(id, text) {
+ $('#' + id).parent().parent('div').find('span').find('span').html(text);
+ }
+
+ function setOptText(target, val) {
+ var dispstr = '<font color="green">';
+
+ if(val == 'keep state')
+ dispstr += 'Keep: works with all IP protocols</font>';
+ else if (val == 'sloppy state')
+ dispstr += 'Sloppy: works with all IP protocols';
+ else if (val == 'synproxy state')
+ dispstr += 'Synproxy: proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined';
+ else if (val == 'none')
+ dispstr += 'None: Do not use state mechanisms to keep track. This is only useful if you\'re doing advanced queueing in certain situations';
+
+ dispstr += '</font>';
+ setHelpText(target, dispstr);
+ }
+
+ // On click . .
+ $('#statetype').on('change', function() {
+ setOptText('statetype', this.value);
+ });
+
+ // At page load . .
+ setOptText('statetype', $('#statetype').val())
});
//]]>
</script>
diff --git a/src/usr/local/www/system_advanced_firewall.php b/src/usr/local/www/system_advanced_firewall.php
index a31bfab..3b41965 100644
--- a/src/usr/local/www/system_advanced_firewall.php
+++ b/src/usr/local/www/system_advanced_firewall.php
@@ -426,10 +426,10 @@ $section->addInput($input = new Form_Select(
'Firewall Optimization Options',
$config['system']['optimization'],
array(
- 'normal' => 'normal: the default optimization algorithm',
- 'high-latency' => 'high-latency: used for eg. satellite links. Expires idle connections later than default',
- 'aggressive' => 'aggressive: expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections',
- 'conservative' => 'conservative: tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization.',
+ 'normal' => 'Normal',
+ 'high-latency' => 'High-latency',
+ 'aggressive' => 'Aggressive',
+ 'conservative' => 'Conservative',
)
))->setHelp('Select the type of state table optimization to use');
@@ -711,4 +711,36 @@ foreach ($udpTimeouts as $name)
$section->add($group);
print $form;
+
+?>
+<script>
+//<![CDATA[
+events.push(function(){
+ // Change help text based on the selector value
+ function setHelpText(id, text) {
+ $('#' + id).parent().parent('div').find('span').text(text);
+ }
+
+ function setOptText(val) {
+ if(val == 'normal')
+ setHelpText('firewall-optimization-options', 'The default optimization algorithm');
+ else if (val == 'high-latency')
+ setHelpText('firewall-optimization-options', 'Used for eg. satellite links. Expires idle connections later than default');
+ else if (val == 'aggressive')
+ setHelpText('firewall-optimization-options', 'Expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections');
+ else if (val == 'conservative')
+ setHelpText('firewall-optimization-options', 'Tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization');
+ }
+
+ // On click . .
+ $('#firewall-optimization-options').on('change', function() {
+ setOptText(this.value);
+ });
+
+ // At page load . .
+ setOptText($('#firewall-optimization-options').val())
+});
+//]]>
+</script>
+<?php
include("foot.inc"); \ No newline at end of file
OpenPOWER on IntegriCloud