From 6c474eb8d35075d314ba56c5bb004ff1227ce127 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Thu, 2 Sep 2010 22:19:54 +0200 Subject: Remove redundant 'Show Bogons' link and added Bogons list to Diagnostics -> Tables while preserving the same download functionality. --- usr/local/www/diag_tables.php | 25 +++++++++++++++++++++++-- usr/local/www/fbegin.inc | 1 - 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/diag_tables.php b/usr/local/www/diag_tables.php index 9551e51..ea76577 100644 --- a/usr/local/www/diag_tables.php +++ b/usr/local/www/diag_tables.php @@ -69,6 +69,23 @@ if($_REQUEST['deleteall']) { } } +if(($tablename == "bogons") && ($_POST['Download'])) { + mwexec_bg("/etc/rc.update_bogons.sh now"); + $maxtimetowait = 0; + $loading = true; + while($loading == true) { + $isrunning = `/bin/ps awwwux | /usr/bin/grep -v grep | /usr/bin/grep bogons`; + if($isrunning == "") + $loading = false; + $maxtimetowait++; + if($maxtimetowait > 89) + $loading = false; + sleep(1); + } + if($maxtimetowait < 90) + $savemsg = gettext("The bogons database has been updated."); +} + exec("/sbin/pfctl -t $tablename -T show", $entries); exec("/sbin/pfctl -sT", $tables); @@ -118,8 +135,10 @@ include("fbegin.inc"); + + @@ -133,8 +152,10 @@ include("fbegin.inc"); 0) - echo "

" . gettext("Delete") . " " . gettext("all") . " " . gettext("entries in this table."); - + if($tablename == "bogons") + echo " " . gettext(" the latest bogon data."); + else + echo "

" . gettext("Delete") . " " . gettext("all") . " " . gettext("entries in this table."); ?> diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc index 48cbe83..47ff2ed 100755 --- a/usr/local/www/fbegin.inc +++ b/usr/local/www/fbegin.inc @@ -191,7 +191,6 @@ $diagnostics_menu[] = array("Ping", "/diag_ping.php"); $diagnostics_menu[] = array("pfTOP", "/diag_system_pftop.php"); $diagnostics_menu[] = array("Reboot", "/reboot.php"); $diagnostics_menu[] = array("Routes", "/diag_routes.php"); -$diagnostics_menu[] = array("Show Bogons", "/diag_showbogons.php"); $diagnostics_menu[] = array("SMART Status", "/diag_smart.php"); $diagnostics_menu[] = array("States", "/diag_dump_states.php"); $diagnostics_menu[] = array("States Summary", "/diag_states_summary.php"); -- cgit v1.1