From 177266446a3c9a9c63dbd4bd1af032339003ab3d Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sun, 10 Dec 2017 10:07:41 +0100 Subject: [PATCH] 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 --- html/cgi-bin/ids.cgi | 191 +++++++++++++++++-------------------------- 1 file changed, 77 insertions(+), 114 deletions(-) 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(); -- 2.39.2