Page 1 of 1

Firewall Configuration Menu

Posted: 27 Jan 2011, 20:03
by Namworld
Quick note about the configuration menu.

There's no need to have a table row for each line and one row to split paragraphs. When the nicer design is more lightweight and simpler to write, I don't see why not. Just an aesthetic suggestions for future versions. Those tables are getting a bit awkward.

Might take a few hours to convert the tags from table rows merged into paragraphs and adding split lines (almost 1500 lines). I don't mind doing it. Here's my suggestion:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It currently looks like this:

Code: Select all

<tr><td># This User Process Tracking option sends an alert if any cPanel user process</td></tr>
<tr><td># exceeds the memory usage set (MB). To ignore specific processes or users use</td></tr>
<tr><td># csf.pignore</td></tr>
<tr><td>#</td></tr>
<tr><td># Set to 0 to disable this feature</td></tr>
<tr><td style="font-family: Courier New,Courier; font-size: 12px;" bgcolor="#f4f4ea"><b>PT_USERMEM </b> = <input name="PT_USERMEM_" value="200" size="7" type="text"> Default: 100</td></tr>
...
Which generate something like this:
# This User Process Tracking option sends an alert if any cPanel user process
# exceeds the memory usage set (MB). To ignore specific processes or users use
# csf.pignore
#
# Set to 0 to disable this feature
PT_USERMEM = Default: 100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It would probable be ten times as elegant and pleasant to browse and edit if it was changed to (not counting it take less markup):

Code: Select all

<hr />
<p>This User Process Tracking option sends an alert if any cPanel user process exceeds the memory usage set (MB). To ignore specific processes or users use csf.pignore</p>
<p>Set to 0 to disable this feature</p>
<tr><td style="font-family: Courier New,Courier; font-size: 12px;" bgcolor="#f4f4ea"><b>PT_USERMEM </b> = <input name="PT_USERMEM_" value="100" size="7" type="text"> Default: 100</span>
<hr />
...
Which generate something like this:
__________________________________________________________________________
This User Process Tracking option sends an alert if any cPanel user process exceeds the memory usage set (MB). To ignore specific processes or users use csf.pignore

Set to 0 to disable this feature
PT_USERMEM = Default: 100
__________________________________________________________________________

Re: Firewall Configuration Menu

Posted: 28 Jan 2011, 04:53
by ken_hk
It may be a little bit difficult because currently the configuration page is directly converted from the config file csf.conf. It seems that the logic is:

- One table row per line
- Every line start with # is printed directly
- Lines with no # as the first character is a option; string before '=' is printed with <b>, value after '=' will be replaced by '<input type="text">'
- Add default values after that, if any
- Lines with values not using default will have background color changed to light grey, and if the value exceed a pre-defined range the background is red

I think your suggestion is possible (and good) but takes time to fine tune.

Ken