Project

General

Profile

Actions

Bug #7889

closed

The dropdown tabs replacement fallback needs to be limited to certain pages

Added by Kill Bill over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Start date:
09/23/2017
Due date:
% Done:

100%

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

Description

AFAICT, this was designed to aid systems with lots of interfaces, and intended for places such as Firewall - Rules. Instead, you can hit it anywhere (have seen it e.g. with Suricata XMLRPC Sync tab). With translations coming, this is a major problem, you cannot just be translating things to fix a hardcoded combined limit of characters.

Example of this breaking Status - System Logs page with Vietnamese translation @ https://forum.pfsense.org/index.php?topic=137004.0

Actions #1

Updated by Bill Meeks over 6 years ago

To add another note to the conversation. There is a parameter in the display_top_tabs() function that is supposed to prevent the creation of the drop-down at all. However, that parameter is commented out as always "false" in the current code, so using a call like this --

   display_top_tabs($tab_array, true);

which is supposed to prevent the drop-down display and instead force tabs is ignored.

Bill

Actions #2

Updated by Anonymous over 6 years ago

Thanks Bill. I will try to determine why that change was made.

Actions #3

Updated by Anonymous over 6 years ago

Which line are the comments on? I don't see any.

Actions #4

Updated by Bill Meeks over 6 years ago

Found it. Had to go back and think about it a minute. It's in the pkg_edit.php file in this code near the bottom of the file --


if (isset($tab_array)) {
    foreach ($tab_array as $tabid => $tab) {
        display_top_tabs($tab); //, $no_drop_down, $tabid);
    }
}

So this only happens when using XML templates as the GUI page file. I was wrong, it's not in the actual display_top_tabs() function. It is instead in the pkg_edit.php code.

Bill

Actions #5

Updated by Anonymous over 6 years ago

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

Updated by Kill Bill over 6 years ago

That works (for the pkg.php/pkg_edit.php as well) provided the limit stays high-enough.

Should the no-op no_drop_down code perhaps be nuked from those two pkg*.php files altogether? Apparently only used in Suricata and Snort and not really needed any more, plus never worked - seems like the functionality has been killed at the very beginning of the bootstrap conversion: https://github.com/pfsense/pfsense/commit/23f6cdd72757350d8c25cf9536c7d7dafc6fca16

Actions #7

Updated by Anonymous over 6 years ago

Yes; it should be nuked. I'd like to wait until after the 2.4 release before doing that, however.

Actions #8

Updated by Anonymous over 6 years ago

  • Status changed from Feedback to Resolved
Actions #9

Updated by Kill Bill over 6 years ago

Steve Beaver wrote:

Yes; it should be nuked. I'd like to wait until after the 2.4 release before doing that, however.

Ok, https://github.com/pfsense/pfsense/pull/3838 after release.

Actions #10

Updated by Bill Meeks over 6 years ago

Pull requests have been submitted for removing the use of the <no_drop_down> tag on the SYNC tab in both the Snort and Suricata packages.

Snort update: https://github.com/pfsense/FreeBSD-ports/pull/425
Suricata update: https://github.com/pfsense/FreeBSD-ports/pull/426

Bill

Actions

Also available in: Atom PDF