firewalllogcountry.dat: Do not show 'Details' button for unkonw location.
Message ID | 1445167412-3298-1-git-send-email-stefan.schantl@ipfire.org |
---|---|
State | Accepted |
Commit | 953ff6edb3e4f14b08a5accad9f80a319476fabe |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.tremer.info [172.28.1.200]) by septima.ipfire.org (Postfix) with ESMTP id 85A09613AC for <patchwork@ipfire.org>; Sun, 18 Oct 2015 13:23:39 +0200 (CEST) Received: from hedwig.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 4E136D85; Sun, 18 Oct 2015 13:23:39 +0200 (CEST) Received: from tuxedo.stevee (host228-133-28-81.hiway.at [81.28.133.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id F2C4AD33; Sun, 18 Oct 2015 13:23:36 +0200 (CEST) From: Stefan Schantl <stefan.schantl@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] firewalllogcountry.dat: Do not show 'Details' button for unkonw location. Date: Sun, 18 Oct 2015 13:23:32 +0200 Message-Id: <1445167412-3298-1-git-send-email-stefan.schantl@ipfire.org> X-Mailer: git-send-email 2.4.3 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <http://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <http://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Message
Stefan Schantl
Oct. 18, 2015, 10:23 p.m. UTC
The CGI offers the posibility to get more details for a certain locations
by clicking on a button.
This feature cannot be used for the category "unknown". To prevent users
from beeing confused about non show-able details, I added some code to hide
this button for this category.
Fixes #10726.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
html/cgi-bin/logs.cgi/firewalllogcountry.dat | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Comments
Hello Stefan, thanks for caring about this issue. As far as I can tell, the patch looks good. However, there is still one issue: Anonymous Proxies are located in the section "A1", and firewall hits coming from internal networks show up in "green0", "blue0" or something similar. What causes the "unknown" firewall hits? The squid proxy? Pseudo traffic coming from the loop device? This is just one thing I am a bit confused about. Best regards, Timmothy Wilson Stefan Schantl: > The CGI offers the posibility to get more details for a certain locations > by clicking on a button. > > This feature cannot be used for the category "unknown". To prevent users > from beeing confused about non show-able details, I added some code to hide > this button for this category. > > Fixes #10726. > > Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> > --- > html/cgi-bin/logs.cgi/firewalllogcountry.dat | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/html/cgi-bin/logs.cgi/firewalllogcountry.dat b/html/cgi-bin/logs.cgi/firewalllogcountry.dat > index 29c0842..f998a62 100644 > --- a/html/cgi-bin/logs.cgi/firewalllogcountry.dat > +++ b/html/cgi-bin/logs.cgi/firewalllogcountry.dat > @@ -456,7 +456,17 @@ for($s=0;$s<$lines;$s++) > $color++; > print "<tr>"; > > - print "<td align='center' $col><form method='post' action='showrequestfromcountry.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='country' value='$key[$s]'> <input type='submit' value='details'></form></td>"; > + print "<td align='center' $col>"; > + > + # Dont show details button for "unknown" location. > + if ($key[$s] ne 'unknown') { > + print"<form method='post' action='showrequestfromcountry.dat'>"; > + print"<input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'>"; > + print"<input type='hidden' name='DAY' value='$cgiparams{'DAY'}'>"; > + print"<input type='hidden' name='country' value='$key[$s]'>"; > + print"<input type='submit' value='details'></form>"; > + } > + > if($key[$s] eq 'blue0' || $key[$s] eq 'green0' || $key[$s] eq 'orange0') { > print "<td align='center' $col>$key[$s]</td>"; > } >
Merged. On Sun, 2015-10-18 at 13:23 +0200, Stefan Schantl wrote: > The CGI offers the posibility to get more details for a certain > locations > by clicking on a button. > > This feature cannot be used for the category "unknown". To prevent > users > from beeing confused about non show-able details, I added some code > to hide > this button for this category. > > Fixes #10726. > > Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> > --- > html/cgi-bin/logs.cgi/firewalllogcountry.dat | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/html/cgi-bin/logs.cgi/firewalllogcountry.dat b/html/cgi > -bin/logs.cgi/firewalllogcountry.dat > index 29c0842..f998a62 100644 > --- a/html/cgi-bin/logs.cgi/firewalllogcountry.dat > +++ b/html/cgi-bin/logs.cgi/firewalllogcountry.dat > @@ -456,7 +456,17 @@ for($s=0;$s<$lines;$s++) > $color++; > print "<tr>"; > > - print "<td align='center' $col><form method='post' > action='showrequestfromcountry.dat'><input type='hidden' name='MONTH' > value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' > value='$cgiparams{'DAY'}'> <input type='hidden' name='country' > value='$key[$s]'> <input type='submit' value='details'></form></td>"; > + print "<td align='center' $col>"; > + > + # Dont show details button for "unknown" location. > + if ($key[$s] ne 'unknown') { > + print"<form method='post' > action='showrequestfromcountry.dat'>"; > + print"<input type='hidden' name='MONTH' > value='$cgiparams{'MONTH'}'>"; > + print"<input type='hidden' name='DAY' > value='$cgiparams{'DAY'}'>"; > + print"<input type='hidden' name='country' > value='$key[$s]'>"; > + print"<input type='submit' value='details'></form>"; > + } > + > if($key[$s] eq 'blue0' || $key[$s] eq 'green0' || $key[$s] eq > 'orange0') { > print "<td align='center' $col>$key[$s]</td>"; > }