From: Stefan Schantl Date: Sun, 10 Dec 2017 09:07:41 +0000 (+0100) Subject: ids.cgi: Rework code for displaying the single rules X-Git-Tag: suricata-beta3~33^2~39^2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=177266446a3c9a9c63dbd4bd1af032339003ab3d;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Rework code for displaying the single rules The complete ruleset will be grouped as categories by it's corresponding rulefile and printed in hidden tables. They easiely can be displayed by klicking on the show link and vice-versa. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index ccde15a22c..c31280fbd0 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -204,7 +204,18 @@ $selected{'RULES'}{$snortsettings{'RULES'}} = "selected='selected'"; &Header::openpage($Lang::tr{'intrusion detection system'}, 1, ''); -print ""; +### Java Script ### +print < + // Tiny java script function to show/hide the rules + // of a given category. + function showhide(tblname) { + \$("#" + tblname).toggle(); + } + +END +; + print < - END ; &Header::closebox();