Project

General

Profile

Actions

Bug #7154

closed

firewall_nat_edit JS function check_for_aliases()

Added by Phillip Davis almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Web Interface
Target version:
-
Start date:
01/22/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:

Description

The code in this function seems to be ineffective. e.g. it has sequences like:

if ($('#dstbeginport_cust').val() == customarray[i]) {
$('#dstendport_cust').val(customarray[i]);
$('#localbeginport_cust').val(customarray[i]);
disableInput('dstendport_cust', true);
disableInput('localbeginport', true);
disableInput('localbeginport_cust', true);
disableInput('dstendport_cust', false);
disableInput('localbeginport', false);
disableInput('localbeginport_cust', false);
}

which disables various input fields then enables them again.

Needs to:
1) Define the requirement
2) Implement whatever is required

Actions #1

Updated by Phillip Davis almost 9 years ago

I suspect the requirement might be:

If the user enters a port alias in any of destination from/to (dest begin, dest end) or redirect target port (local port) custom fields then:
- copy that port alias to the other 2 cust fields so all 3 are the same
- make sure all 3 selectors (dest begin, dest end, local port) are set to "Other"
- disable dest end and local port fields (leaving just dest begin fields

If the user changes "dest begin" to some other selection, or changes the port alias to a real port number, then
- re-enable the dest end and local port fields
- blank out the port alias that was copied to those fields
- do whatever else would normally be done in reaction to a non-port-alias entry

Actions #2

Updated by Jim Thompson almost 9 years ago

  • Assignee set to Anonymous
Actions #3

Updated by Anonymous almost 9 years ago

  • Status changed from New to Feedback

Looks like that duplication (several times over) goes back to at least 2.0!

https://github.com/pfsense/pfsense/blob/RELENG_2_0/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js

Now removed. Page still functions as intended

Actions #4

Updated by Anonymous almost 9 years ago

  • % Done changed from 0 to 100
Actions #5

Updated by Phillip Davis almost 9 years ago

Yes, the code did nothing effective. I guess that someone had started thinking about what smarts to put in it, had "temporarily" put the reverse bits at the end of each section and then never got around to sorting it all out.

Actions #6

Updated by Anonymous over 8 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF