Revision 6c474eb8
Added by Warren Baker almost 15 years ago
usr/local/www/diag_tables.php | ||
---|---|---|
69 | 69 |
} |
70 | 70 |
} |
71 | 71 |
|
72 |
if(($tablename == "bogons") && ($_POST['Download'])) { |
|
73 |
mwexec_bg("/etc/rc.update_bogons.sh now"); |
|
74 |
$maxtimetowait = 0; |
|
75 |
$loading = true; |
|
76 |
while($loading == true) { |
|
77 |
$isrunning = `/bin/ps awwwux | /usr/bin/grep -v grep | /usr/bin/grep bogons`; |
|
78 |
if($isrunning == "") |
|
79 |
$loading = false; |
|
80 |
$maxtimetowait++; |
|
81 |
if($maxtimetowait > 89) |
|
82 |
$loading = false; |
|
83 |
sleep(1); |
|
84 |
} |
|
85 |
if($maxtimetowait < 90) |
|
86 |
$savemsg = gettext("The bogons database has been updated."); |
|
87 |
} |
|
88 |
|
|
72 | 89 |
exec("/sbin/pfctl -t $tablename -T show", $entries); |
73 | 90 |
exec("/sbin/pfctl -sT", $tables); |
74 | 91 |
|
... | ... | |
118 | 135 |
<?php echo $entry; ?> |
119 | 136 |
</td> |
120 | 137 |
<td> |
138 |
<?php if ($tablename != "bogons") { ?> |
|
121 | 139 |
<a onClick='del_entry("<?=$entry?>");'> |
122 | 140 |
<img img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif"> |
141 |
<?php } ?> |
|
123 | 142 |
</a> |
124 | 143 |
</td> |
125 | 144 |
</tr> |
... | ... | |
133 | 152 |
|
134 | 153 |
<?php |
135 | 154 |
if($count > 0) |
136 |
echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&type={$tablename}'>" . gettext("all") . "</a> " . gettext("entries in this table."); |
|
137 |
|
|
155 |
if($tablename == "bogons") |
|
156 |
echo "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "'> " . gettext(" the latest bogon data."); |
|
157 |
else |
|
158 |
echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&type={$tablename}'>" . gettext("all") . "</a> " . gettext("entries in this table."); |
|
138 | 159 |
?> |
139 | 160 |
|
140 | 161 |
<?php include("fend.inc"); ?> |
usr/local/www/fbegin.inc | ||
---|---|---|
191 | 191 |
$diagnostics_menu[] = array("pfTOP", "/diag_system_pftop.php"); |
192 | 192 |
$diagnostics_menu[] = array("Reboot", "/reboot.php"); |
193 | 193 |
$diagnostics_menu[] = array("Routes", "/diag_routes.php"); |
194 |
$diagnostics_menu[] = array("Show Bogons", "/diag_showbogons.php"); |
|
195 | 194 |
$diagnostics_menu[] = array("SMART Status", "/diag_smart.php"); |
196 | 195 |
$diagnostics_menu[] = array("States", "/diag_dump_states.php"); |
197 | 196 |
$diagnostics_menu[] = array("States Summary", "/diag_states_summary.php"); |
Also available in: Unified diff
Remove redundant 'Show Bogons' link and added Bogons list to Diagnostics -> Tables while preserving the same download functionality.