From 0ffb59264ee9e7a511b5453a76c8f746f468aad7 Mon Sep 17 00:00:00 2001 From: smos Date: Fri, 30 Mar 2012 22:40:58 +0200 Subject: Add the new pages for the relocated logfiles and messages. Ticket #2321 --- usr/local/www/diag_logs_gateways.php | 137 +++++++++++++++++++++++++++++++++++ usr/local/www/diag_logs_resolver.php | 137 +++++++++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100755 usr/local/www/diag_logs_gateways.php create mode 100755 usr/local/www/diag_logs_resolver.php (limited to 'usr/local') diff --git a/usr/local/www/diag_logs_gateways.php b/usr/local/www/diag_logs_gateways.php new file mode 100755 index 0000000..fe2e74b --- /dev/null +++ b/usr/local/www/diag_logs_gateways.php @@ -0,0 +1,137 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-gateways +##|*NAME=Diagnostics: Logs: System: Gateways page +##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Gateways' page. +##|*MATCH=diag_logs_gateways.php* +##|-PRIV + +require("guiconfig.inc"); + +$system_logfile = "{$g['varlog_path']}/gateways.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) + $nentries = 50; + +if ($_POST['clear']) + clear_log_file($system_logfile); + +if ($_GET['filtertext']) + $filtertext = htmlspecialchars($_GET['filtertext']); + +if ($_POST['filtertext']) + $filtertext = htmlspecialchars($_POST['filtertext']); + +if ($filtertext) + $filtertextmeta="?filtertext=$filtertext"; + +$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Gateways")); +include("head.inc"); + +?> + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + +
+
+ " /> +
+
+
+ + " /> +
+
+
+
+ + + diff --git a/usr/local/www/diag_logs_resolver.php b/usr/local/www/diag_logs_resolver.php new file mode 100755 index 0000000..cc69052 --- /dev/null +++ b/usr/local/www/diag_logs_resolver.php @@ -0,0 +1,137 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-resolver +##|*NAME=Diagnostics: Logs: System: Resolver page +##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Resolver' page. +##|*MATCH=diag_logs_resolver.php* +##|-PRIV + +require("guiconfig.inc"); + +$system_logfile = "{$g['varlog_path']}/resolver.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) + $nentries = 50; + +if ($_POST['clear']) + clear_log_file($system_logfile); + +if ($_GET['filtertext']) + $filtertext = htmlspecialchars($_GET['filtertext']); + +if ($_POST['filtertext']) + $filtertext = htmlspecialchars($_POST['filtertext']); + +if ($filtertext) + $filtertextmeta="?filtertext=$filtertext"; + +$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Resolver")); +include("head.inc"); + +?> + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + +
+
+ " /> +
+
+
+ + " /> +
+
+
+
+ + + -- cgit v1.1