From: Stefan Schantl Date: Wed, 30 Jan 2019 09:12:11 +0000 (+0100) Subject: ids.cgi: Show IDS setting area only if a ruleset is present. X-Git-Tag: suricata-rc1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf02bf2f7d23f9755a6e08383dd46fa9033d924b;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Show IDS setting area only if a ruleset is present. Signed-off-by: Stefan Schantl --- 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.