From 798556ec29207d5131a7600d5489f1ee92a7b87a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 23 Jun 2025 17:16:57 +0000 Subject: [PATCH] fwhosts.cgi: Move the tooltip into the usage counter This will clutter the page less as we don't have any good icon sets. Signed-off-by: Michael Tremer Tested-by: Adolf Belka Signed-off-by: Michael Tremer --- html/cgi-bin/fwhosts.cgi | 42 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 69970a840..953f81e5f 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1932,7 +1932,7 @@ sub viewtablenet }else{ print< - $Lang::tr{'name'}$Lang::tr{'fwhost netaddress'}$Lang::tr{'remark'}$Lang::tr{'used'} + $Lang::tr{'name'}$Lang::tr{'fwhost netaddress'}$Lang::tr{'remark'}$Lang::tr{'used'} END } my $count=0; @@ -1953,11 +1953,7 @@ END my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]); my $netcount=&getnetcount($customnetwork{$key}[0]); my $netusedin=&getusedin($customnetwork{$key}[0]); - my $htmlparttouse=""; - if ($netusedin) { - $htmlparttouse = ""; - } - print"
$customnetwork{$key}[0]".&getcolor($colnet)."$customnetwork{$key}[3]$netcount x$htmlparttouse"; + print"$customnetwork{$key}[0]".&getcolor($colnet)."$customnetwork{$key}[3]$netcount x"; print< @@ -2091,7 +2087,7 @@ sub viewtablehost }else{ print< - $Lang::tr{'name'}$Lang::tr{'fwhost ip_mac'}$Lang::tr{'remark'}$Lang::tr{'used'} + $Lang::tr{'name'}$Lang::tr{'fwhost ip_mac'}$Lang::tr{'remark'}$Lang::tr{'used'} END } my $count=0; @@ -2112,12 +2108,9 @@ END my $hostcount=0; $hostcount=&gethostcount($customhost{$key}[0]); my $hostusedin=&getusedin($customhost{$key}[0]); - my $htmlparttouse=""; - if ($hostusedin) { - $htmlparttouse = ""; - } - print"$customhost{$key}[0]".&getcolor($ip)."$customhost{$key}[3]$hostcount x$htmlparttouse"; - print<$customhost{$key}[0]$color$customhost{$key}[3]$hostcount x @@ -2192,11 +2185,8 @@ sub viewtablegrp print "
$grpname   "; print " $Lang::tr{'remark'}:  $remark   " if ($remark ne ''); my $netgrpcount=&getnetcount($grpname); - print "$Lang::tr{'used'}: $netgrpcount x "; my $groupusedin=&getusedin($grpname); - if ($groupusedin) { - print ""; - } + print "$Lang::tr{'used'}: $netgrpcount x"; if($netgrpcount == '0') { print""; @@ -2335,10 +2325,7 @@ sub viewtablelocationgrp # Get group count. my $locationgrpcount=&getlocationcount($grpname); my $locationusedin=&getlocusedin($grpname); - print "$Lang::tr{'used'}: $locationgrpcount x "; - if ($locationusedin) { - print ""; - } + print "$Lang::tr{'used'}: $locationgrpcount x"; # Only display delete icon, if the group is not used by a firewall rule. if($locationgrpcount == '0') { print"
\n"; @@ -2459,7 +2446,7 @@ sub viewtableservice &General::readhasharray("$fwconfigout", \%fwout); print< - $Lang::tr{'fwhost srv_name'}$Lang::tr{'fwhost prot'}$Lang::tr{'fwhost port'}ICMP$Lang::tr{'fwhost used'} + $Lang::tr{'fwhost srv_name'}$Lang::tr{'fwhost prot'}$Lang::tr{'fwhost port'}ICMP$Lang::tr{'fwhost used'} END my $col=''; foreach my $key (sort { ncmp($customservice{$a}[0],$customservice{$b}[0])} keys %customservice) @@ -2481,14 +2468,10 @@ END #Neuer count $srvcount=&getsrvcount($customservice{$key}[0]); my $serviceusedin=&getsrvusedin($customservice{$key}[0]); - my $htmlparttouse=""; - if ($serviceusedin) { - $htmlparttouse=""; - } if($customservice{$key}[3] eq 'All ICMP-Types'){print $Lang::tr{'fwdfw all icmp'};} elsif($customservice{$key}[3] ne 'BLANK'){print $customservice{$key}[3];} print<$srvcount x$htmlparttouse + $srvcount x @@ -2560,11 +2543,8 @@ sub viewtableservicegrp if($count >0){print"";$count=1;} print "
$grpname    "; print "$Lang::tr{'remark'}:  $remark " if ($remark ne ''); - print "  $Lang::tr{'used'}: $grpcount x "; my $srvgrpusedin=&getsrvusedin($customservicegrp{$key}[0]); - if ($srvgrpusedin) { - print ""; - } + print "  $Lang::tr{'used'}: $grpcount x"; if($grpcount == '0') { print""; -- 2.47.3