Project

General

Profile

Actions

Bug #14262

open

IPv6 firewall log entries do not wrap and force the table width past the width of the page

Added by Louis B over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Dashboard
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Plus-Next
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
All

Description

IPV6-addresses are much wider than IPV4. That is not properly handled in the GUI. Extreme example is the Firewall log, where important information is cut of / not visible at all.

I am using 2.7 latest build, but I expect that the problem affect all versions.

See picture below / attached picture


Files

Actions #1

Updated by Jim Pingle over 1 year ago

  • Subject changed from IPV6 firewall log layout not workable :( to IPv6 firewall log entries do not wrap and force the table width past the width of the page
  • Target version set to 2.7.0
  • Plus Target Version set to 23.05

We solved this in the widget in #5332 by adding <wbr> tags after each : in an IPv6 address but it looks like that didn't get carried over into the main log. See 4861e219f930ee759d75cdfffc1413e3e5d21707 for how that was done.

As a short term workaround you can use the option to move the firewall descriptions into a new row rather than a column since those take up a fair amount of space as well.

Actions #2

Updated by Jim Pingle over 1 year ago

  • Assignee set to Jim Pingle
Actions #3

Updated by Jim Pingle over 1 year ago

  • Assignee deleted (Jim Pingle)
  • Target version changed from 2.7.0 to CE-Next
  • Plus Target Version changed from 23.05 to Plus-Next

There is much more to it than the wbr tags. The src/dst cells are locked at nowrap, as it the row itself. The description is set to wrap, which works OK. But once you allow the src/dst cells to wrap, the rule description doesn't wrap, the src/dst cells do and they look awful.

So it's going to take a bit more work by someone who is more familiar with the relevant CSS than I am to figure out the best way to accommodate these different scenarios.

For the time being, if this bothers you, move the rule description to a second row or turn it off.

Actions #4

Updated by Jim Pingle over 1 year ago

If someone else wants to experiment, this is what I started with to insert the wbr and change the wrapping:

diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php
index 599105f5f2..a33c6f8b55 100644
--- a/src/usr/local/www/status_logs_filter.php
+++ b/src/usr/local/www/status_logs_filter.php
@@ -228,25 +228,27 @@ if (!$rawfilter) {
                        $ipproto = "inet";
                }

-               $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
+               /* Putting <wbr> tags after each ':'  allows the string to word-wrap at that point
+                * https://redmine.pfsense.org/issues/14262 */
+               $srcstr = str_replace(':', ':<wbr>', $filterent['srcip']) . get_port_with_service($filterent['srcport'], $proto);
                $src_htmlclass = str_replace(array('.', ':'), '-', $rawsrcip);
-               $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
+               $dststr = str_replace(':', ':<wbr>', $filterent['dstip']) . get_port_with_service($filterent['dstport'], $proto);
                $dst_htmlclass = str_replace(array('.', ':'), '-', $rawdstip);
 ?>
-                                       <td class="text-nowrap">
+                                       <td style="white-space:normal;">
                                                <i class="fa fa-info icon-pointer icon-primary" onclick="javascript:resolve_with_ajax('<?="{$rawsrcip}"; ?>');" title="<?=gettext("Click to resolve")?>">
                                                </i>

-                                               <a class="fa fa-minus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=block&amp;int={$int}&amp;src={$filterent['srcip']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("EasyRule: Add to Block List")?>">
+                                               <a class="fa fa-minus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=block&amp;int={$int}&amp;src={$filterent['rawsrcip']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("EasyRule: Add to Block List")?>">
                                                </a>

                                                <?=$srcstr . '<span class="RESOLVE-' . $src_htmlclass . '"></span>'?>
                                        </td>
-                                       <td class="text-nowrap">
+                                       <td style="white-space:normal;">
                                                <i class="fa fa-info icon-pointer icon-primary; ICON-<?= $dst_htmlclass; ?>" onclick="javascript:resolve_with_ajax('<?="{$rawdstip}"; ?>');" title="<?=gettext("Click to resolve")?>">
                                                </i>

-                                               <a class="fa fa-plus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=pass&amp;int={$int}&amp;proto={$proto}&amp;src={$filterent['srcip']}&amp;dst={$filterent['dstip']}&amp;dstport={$filterent['dstport']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("EasyRule: Pass this traffic")?>">
+                                               <a class="fa fa-plus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=pass&amp;int={$int}&amp;proto={$proto}&amp;src={$filterent['rawsrcip']}&amp;dst={$filterent['dstip']}&amp;dstport={$filterent['dstport']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("EasyRule: Pass this traffic")?>">
                                                </a>
                                                <?=$dststr . '<span class="RESOLVE-' . $dst_htmlclass . '"></span>'?>
                                        </td>

Actions

Also available in: Atom PDF