Snort Suppress List Edit in 2.3
-
I use the Suppress List feature and the edit control in pfSense 2.3 GUI has become much narrower and has become confusing to make edits due to word wrapping most of the lines in my list. I can get by with a few lines word wrapped but it seems a bit daft to have such a narrow edit control when the title bar for that control is so wide. Any chance of putting back a nice sensible width for editing the suppress list files?
-
I use the Suppress List feature and the edit control in pfSense 2.3 GUI has become much narrower and has become confusing to make edits due to word wrapping most of the lines in my list. I can get by with a few lines word wrapped but it seems a bit daft to have such a narrow edit control when the title bar for that control is so wide. Any chance of putting back a nice sensible width for editing the suppress list files?
Yeah, I can probably widen the control a bit and turn off line wrapping. Those are Bootstrap conversion artifacts. I will add this to the next Snort update. In the meantime, if you want to experiment with some settings and are somewhat competent in Bootstrap, the code file is located at /usr/local/www/snort/snort_interfaces_suppress_edit.php
Bill
-
Thanks for pointing me in the right direction.
-
I am unfamiliar with bootstrap, but I think this is a style sheet issue. I have had a quick look but run out of time today to actually start experimenting with changes.
In pfSense.css it look like this style dictates the width
.col-sm-10 .form-control { width: calc(50% - 15px); }
I will try and get back to this later in the week.
-
I am unfamiliar with bootstrap, but I think this is a style sheet issue. I have had a quick look but run out of time today to actually start experimenting with changes.
In pfSense.css it look like this style dictates the width
.col-sm-10 .form-control { width: calc(50% - 15px); }
I will try and get back to this later in the week.
You are correct it can be fixed by modifying the CSS, but it would not be good behavior for a package to do that. You can override the Bootstrap default style for any object (HTML element, actually) by adding the appropriate attribute on the page. I've done that in other places within the GUI for Snort and Suricata for textarea controls. I will do the same for this control.
If you want to experiment (and maybe learn a little about Bootstrap), here is an example of adding the additional attributes to the textarea control –
$modal->addInput(new Form_Textarea ( 'logtext', '', '...Loading...' ))->removeClass('form-control')->addClass('row-fluid col-sm-10')->setAttribute('rows', '10')->setAttribute('wrap', 'off');
In Bootstrap, the class "col-sm-10" sets the width of an element relative to Bootstrap's 12-column grid. It assumes the display device's screen is evenly divided into 12 columns. So the widget above is set to be 10 columns wide. Ignore the use of $modal. In the file we are discussing for editing a Suppress List, the variable name is $section.
Bill