From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alf =?utf-8?q?H=C3=B8gemark?= To: development@lists.ipfire.org Subject: Re: Feedback wanted on feature to show blocked IPs per country Date: Mon, 17 Feb 2014 20:18:38 +0100 Message-ID: <5302608E.5060401@i100.no> In-Reply-To: <1392654576.30526.44.camel@rice-oxley.tremer.info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4111356516771873323==" List-Id: --===============4111356516771873323== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Hi It was the cache file for the language file at /var/ipfire/langs that was playing me a trick. I removed it, and then the menu option was available. I've now made a pull request for this https://github.com/ipfire/ipfire-2.x/pull/12 The code is very much based on firewalllogip.dat and showrequestfromip.dat. Those two files does not look too nice, and therefore my files does not look too nice. I was thinking about doing some major restructuringing, by having one "showrequestfrom.dat" file which could handle taking a contraint on source ip, source ip country or destination port, but it would require some major work, especially since it seems the code is using "comma separated query string" when handling a HTTP GET, instead of individual URL parameters. So since I understand that the major web GUI code overhaul will happen in 3.x, I decided to not do any major changes now. Regards Alf On 02/17/2014 05:29 PM, Michael Tremer wrote: > Hi, > > On Sun, 2014-02-16 at 07:24 +0100, alf(a)i100.no wrote: >> Hi >> >> I preliminary version is available at : >> https://github.com/alfh/ipfire-2.x/tree/feature_firewalllogcountry >> >> Currently I am struggling at getting the new functionality available >> in the menu, so I am asking if anyone has a tip on how to do that ? >> I've tried to edit the file : >> --- a/config/menu/70-log.menu >> +++ b/config/menu/70-log.menu >> @@ -33,6 +33,11 @@ >> 'title' => "$Lang::tr{'firewall logs >> port'}", >> 'enabled' => 1 >> }; >> + $sublogs->{'43.firewallcountry'} = {'caption' => >> $Lang::tr{'firewall logs country'}, >> + 'uri' => >> '/cgi-bin/logs.cgi/firewalllogcountry.dat', >> + 'title' => "$Lang::tr{'firewall logs >> country'}", >> + 'enabled' => 1 >> + }; >> >> but that does not seem to be enough. > Basically, that's it. > > The CGI script must be there and be executable and you are fine. > > -Michael --===============4111356516771873323==--