From af768a7e80bb8fb3b25bfd8f13a4a0561927f9e2 Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Fri, 22 Feb 2013 13:04:30 +0100 Subject: [PATCH 1/1] Forward Firewall: removed cellspacing and black lines between rules in ruletable --- html/cgi-bin/forwardfw.cgi | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index 377654252..694409fae 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -1832,6 +1832,7 @@ sub viewtablenew my $title1=shift; my $go=''; &General::get_aliases(\%aliases); + &General::readhasharray("$confighost", \%customhost); &General::readhasharray("$config", $hash); if( ! -z $config){ if ($title1 eq $Lang::tr{'external access'} || $title1 eq 'Outgoing'){print"

";} @@ -1844,7 +1845,7 @@ sub viewtablenew my @tmpsrc=(); my $coloryellow=''; print"$title1
"; - print""; + print"
"; print""; foreach my $key (sort {$a <=> $b} keys %$hash){ $tdcolor=''; @@ -1916,7 +1917,7 @@ END $rulecolor=$color{'color16'}; } print""; - &getcolor($$hash{$key}[3],$$hash{$key}[4]); + &getcolor($$hash{$key}[3],$$hash{$key}[4],\%customhost); print" END - &getcolor($$hash{$key}[5],$$hash{$key}[6]); + &getcolor($$hash{$key}[5],$$hash{$key}[6],\%customhost); print< END @@ -2039,7 +2040,7 @@ END } #REMARK if ($optionsfw{'SHOWREMARK'} eq 'on'){ - print""; } } @@ -2052,7 +2053,9 @@ sub getcolor { my $nettype=shift; my $val=shift; + my $hash=shift; if($optionsfw{'SHOWCOLORS'} eq 'on'){ + #VPN networks if ($nettype eq 'ovpn_n2n_src' || $nettype eq 'ovpn_n2n_tgt' || $nettype eq 'ovpn_net_src' || $nettype eq 'ovpn_net_tgt'|| $nettype eq 'ovpn_host_src' || $nettype eq 'ovpn_host_tgt'){ $tdcolor="style='border: 2px solid $Header::colourovpn;'"; return; @@ -2061,6 +2064,15 @@ sub getcolor $tdcolor="style='border: 2px solid $Header::colourvpn;'"; return; } + #custom Hosts + if ($nettype eq 'cust_host_src' || $nettype eq 'cust_host_tgt'){ + foreach my $key (sort keys %$hash){ + if ($$hash{$key}[0] eq $val){ + $val=$$hash{$key}[2]; + } + } + } + #ALIASE foreach my $alias (sort keys %aliases) { if ($val eq $alias){ @@ -2068,6 +2080,7 @@ sub getcolor return; } } + #standard networks if ($val eq 'GREEN'){ $tdcolor="style='border: 2px solid $Header::colourgreen;'"; }elsif ($val eq 'ORANGE'){ -- 2.39.2
#$Lang::tr{'fwdfw source'}Log$Lang::tr{'fwdfw target'}$Lang::tr{'protocol'}$Lang::tr{'fwdfw time'}$Lang::tr{'fwdfw action'}
$ruletype"; if ($$hash{$key}[3] eq 'std_net_src'){ print &get_name($$hash{$key}[4]); @@ -1939,7 +1940,7 @@ END
"; + print"
"; print"$Lang::tr{'remark'}: $$hash{$key}[16]