Project

General

Profile

Actions

Bug #3376

closed

Alias Edit does not display correctly

Added by Phillip Davis about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
12/29/2013
Due date:
% Done:

100%

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

Description

I had a 2.1-RELEASE system and GitSync'd to the 2.1 release branch. I was using Alias Bulk Import, but then also realised this problem is with displaying any Network Alias in firewall_aliases_edit.php
I added a test bulk alias, as in screen shot 1
After saving, the alias looks OK in screen shot 2.
But when I try to edit it (screen shot 3) the CIDR shows as 32 for all the entries.
If I edit and then save, all those entries also get saved as "/32".
If I edit and save any of my network aliases they become "/32" unless I manually change them to the required values again before saving.
When editing a URL Table alias, the Update Freq column is left blank (and the config actually has a number of days).
Using any version of firewall_aliases_edit.php after commit https://github.com/pfsense/pfsense/commit/53523624259f97fb7148d80ae581fa09291e0c55 has this problem. Any version prior to that is OK. Something in the new code there that does jQuery stuff has a problem setting/enabling the CIDR/Update Freq column.


Files

BulkAlias-01-Import.png (18.2 KB) BulkAlias-01-Import.png Phillip Davis, 12/29/2013 07:54 AM
BulkAlias-02-Alias-OK.png (8.79 KB) BulkAlias-02-Alias-OK.png Phillip Davis, 12/29/2013 07:54 AM
BulkAlias-03-Alias-Edit-32.png (27.8 KB) BulkAlias-03-Alias-Edit-32.png Phillip Davis, 12/29/2013 07:54 AM
Actions #1

Updated by Phillip Davis about 10 years ago

I have no idea what I am doing with the jQuery stuff, but I pulled out some "^" marks in pull request https://github.com/pfsense/pfsense/pull/867 and now the display is correct. Someone who knows what the "^" were intended to do should look at it and decide what is the real/correct/best fix.

Actions #2

Updated by Phillip Davis about 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by Grischa Zengel about 10 years ago

With this patch the subnet field won't be disabled like before.
The form uses <select name="address_subnet0" class="ipv4v6" id="address_subnet0" size="1"> with numbered ids.

jQuery("select[id^='address_subnet']") will match "address_subnet.*". http://api.jquery.com/attribute-equals-selector/

jQuery("select[id='address_subnet']") will only match "address_subnet". http://api.jquery.com/attribute-starts-with-selector/

Actions #5

Updated by Grischa Zengel about 10 years ago

The error is the semicolon after
if (set_value == true);

Actions #6

Updated by Phillip Davis about 10 years ago

Thanks for spotting that semi-colon - I spent a while trying to work out what going on, and obviously didn't stare hard enough at every char.
I made another pull request: https://github.com/pfsense/pfsense/pull/896

Actions #8

Updated by Anonymous about 10 years ago

Actions #10

Updated by Renato Botelho about 10 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF