From cf02bf2f7d23f9755a6e08383dd46fa9033d924b Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 30 Jan 2019 10:12:11 +0100 Subject: [PATCH] ids.cgi: Show IDS setting area only if a ruleset is present. Signed-off-by: Stefan Schantl --- html/cgi-bin/ids.cgi | 107 ++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 51 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index c32df7e78b..604d216c89 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -742,79 +742,84 @@ if ( -f "$IDS::rulestarball"){ $rulesdate = localtime($Info[9]); } -print <

$Lang::tr{'settings'}

+ print < - - - +

$Lang::tr{'settings'}

- +
- $Lang::tr{'ids activate'} $Lang::tr{'intrusion detection system'} - - $Lang::tr{'ids monitor traffic only'} +
+ + + + + - + - - - - - - + + + + + + - - - + + + - + END ; -# Loop through the array of available networks and print config options. -foreach my $zone (@network_zones) { - my $checked_input; - my $checked_forward; + # Loop through the array of available networks and print config options. + foreach my $zone (@network_zones) { + my $checked_input; + my $checked_forward; - # Convert current zone name to upper case. - my $zone_upper = uc($zone); + # Convert current zone name to upper case. + my $zone_upper = uc($zone); - # Set zone name. - my $zone_name = $zone; + # Set zone name. + my $zone_name = $zone; - # Dirty hack to get the correct language string for the red zone. - if ($zone eq "red") { - $zone_name = "red1"; - } + # Dirty hack to get the correct language string for the red zone. + if ($zone eq "red") { + $zone_name = "red1"; + } - # Grab checkbox status from settings hash. - if ($idssettings{"ENABLE_IDS_$zone_upper"} eq "on") { - $checked_input = "checked = 'checked'"; - } + # Grab checkbox status from settings hash. + if ($idssettings{"ENABLE_IDS_$zone_upper"} eq "on") { + $checked_input = "checked = 'checked'"; + } - print "\n"; -} + print "\n"; + } print < -
+ $Lang::tr{'ids activate'} $Lang::tr{'intrusion detection system'} + + $Lang::tr{'ids monitor traffic only'}
















$Lang::tr{'ids monitored interfaces'}
$Lang::tr{'ids monitored interfaces'}
\n"; - print "\n"; - print " $Lang::tr{'enabled on'} $Lang::tr{$zone_name}\n"; - print "\n"; + print "\n"; + print " $Lang::tr{'enabled on'} $Lang::tr{$zone_name}\n"; + print "
+
-

+

- - - - -
- + + + + +
+ END ; +} + &Header::closebox(); # Draw elements for ruleset configuration. -- 2.39.2