Project

General

Profile

Bug #10892

Large number of VLAN/LANs make floating rules are to read

Added by Joe Slent 7 months ago. Updated 2 months ago.

Status:
New
Priority:
Low
Assignee:
Jared Dillard
Category:
Rules / NAT
Target version:
Start date:
09/12/2020
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.5-p1
Affected Architecture:
All
Release Notes:
Default

Description

Since the following commit for 2.4.5, the interface column was introduced for floating rules: https://redmine.pfsense.org/projects/pfsense/repository/revisions/bf83fb9ab93435e605d28b67e0352d32ce63ba2d/diff/src/usr/local/www/firewall_rules.php

However this has dramatically decreased the usability of the WebGUI when analyzing floating rules in case of many interfaces being assigned to the rules due to the way they are listed:

echo implode('<br/>', $selected_descs);

I.e. If I assign a couple of rules to 10 interfaces each, I have eaten away my whole screen estate.

This issue is to enhance that, and we could do it in a couple of ways:
1. very easily, change the implode to comma separate the list, instead of using <br>, e.g. implode(', ', $selected_descs); This is my favourite. It compresses the raws without decreasing readability and it's a very safe change to make.
2. keep the <br>, but hide if more than 1 lines. Example https://css-tricks.com/almanac/properties/l/line-clamp/ (this should retain the page text-searchable).
3. any other css/display things with some link to show/hide

floating-rules.png (84.1 KB) floating-rules.png Example of 3 rules in floating with many interfaces assigned Joe Slent, 09/12/2020 03:04 AM
10892rules.png (5.77 KB) 10892rules.png Max Leighton, 09/20/2020 04:03 PM
notgood.png (21.7 KB) notgood.png Joe Slent, 12/13/2020 03:49 PM
good.png (32 KB) good.png Joe Slent, 12/13/2020 04:20 PM
with_all.PNG (8.22 KB) with_all.PNG ALL if all interfaces selected Dan Mackie, 12/17/2020 12:35 AM
without_all.PNG (10.1 KB) without_all.PNG Individual if not all interfaces selected Dan Mackie, 12/17/2020 12:37 AM

Associated revisions

Revision 03c0fd1e (diff)
Added by Viktor Gurov 7 months ago

Floating rules with large number of interfaces fix. Issue #10892

History

#2 Updated by Joe Slent 7 months ago

Note there is a typo in the title -- meant to write "hard to read".

#4 Updated by Jim Pingle 7 months ago

  • Status changed from New to Pull Request Review
  • Target version set to 2.5.0

#5 Updated by Renato Botelho 7 months ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

#6 Updated by Max Leighton 7 months ago

Tested in

2.5.0-DEVELOPMENT (amd64)
built on Sun Sep 20 06:59:15 EDT 2020
FreeBSD 12.2-PRERELEASE

and patch in

2.4.5-RELEASE-p1 (amd64)
built on Tue Jun 02 17:51:17 EDT 2020
FreeBSD 11.3-STABLE

Interfaces now appear as a comma separated imploded list as expected. Marking the ticket resolved.

#7 Updated by Jim Pingle 5 months ago

  • Category changed from Web Interface to Rules / NAT

#8 Updated by Joe Slent 4 months ago

Hello all,

for me this fix doesn't really solve the problem. It sometimes saves one or two lines but most of the times it still breaks to a new line for each interface. See attached image from a live-in-production system with LAN names edited but retaining the same numbers of chars. These aren't really long names.

I think I prefer my solution of simply using implode(', ', $selected_descs); (and if you want setting a style="max-width: 400px;" on the column listing the interfaces). This is not an elegant solution but at least I'm able to better see the rules (see below, same rule as above..much clearer).
I have also increased the width of this page (something like: <style>@media (min-width:1200px){.container{width:95%}}</style>). Maybe this can also be considered to make up for the space that was lost due to the addition of this column.

Also, an idea worth considering could be to display something like "All" if all interfaces are selected. Would save a lot of screen estate.

Thank you!

#9 Updated by Jim Pingle 4 months ago

  • Status changed from Resolved to New
  • Assignee deleted (Renato Botelho)

#11 Updated by Joe Slent 4 months ago

Hello Dan,

I think that is a very good idea! I would advise though to make it something like "All interfaces" as opposed to "ALL" to avoid conflict with someone who might have an interface called ALL.

I would also advise to pursue this ticket (10892) though irrespective of the "ALL" enhancement given that we would still have the issue if all but one interface are selected (like maybe a dozen LANs but not the WAN..). For this scenario I still think the implode+max-width+bigger-container-width combo might be good to consider (or a better solution if it can be found).

Thanks!

#12 Updated by Scott Long 3 months ago

  • Assignee set to Jared Dillard
  • Priority changed from Normal to Low

#13 Updated by Steve Beaver 2 months ago

  • Target version changed from 2.5.0 to CE-Next

Also available in: Atom PDF