diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml index 69264f80e..acca9777e 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml @@ -264,7 +264,9 @@ - + + + diff --git a/src/www/diag_logs_pills.inc b/src/www/diag_logs_pills.inc index d4826f0d6..3759c11a9 100644 --- a/src/www/diag_logs_pills.inc +++ b/src/www/diag_logs_pills.inc @@ -26,41 +26,24 @@ POSSIBILITY OF SUCH DAMAGE. */ -$tab_group = isset($tab_group) ? $tab_group : 'system'; -$tab_array = array(); +$tab_group = isset($tab_group) ? $tab_group : 'system'; +$tab_array = array(); if ($tab_group == 'vpn') { - - $tab_array[] = array(gettext("PPTP Logins"), - (($vpntype == "pptp") && ($mode != "raw")), - "/diag_logs_vpn.php?vpntype=pptp"); - $tab_array[] = array(gettext("PPTP Raw"), - (($vpntype == "pptp") && ($mode == "raw")), - "/diag_logs_vpn.php?vpntype=pptp&mode=raw"); - $tab_array[] = array(gettext("PPPoE Logins"), - (($vpntype == "poes") && ($mode != "raw")), - "/diag_logs_vpn.php?vpntype=poes"); - $tab_array[] = array(gettext("PPPoE Raw"), - (($vpntype == "poes") && ($mode == "raw")), - "/diag_logs_vpn.php?vpntype=poes&mode=raw"); - $tab_array[] = array(gettext("L2TP Logins"), - (($vpntype == "l2tp") && ($mode != "raw")), - "/diag_logs_vpn.php?vpntype=l2tp"); - $tab_array[] = array(gettext("L2TP Raw"), - (($vpntype == "l2tp") && ($mode == "raw")), - "/diag_logs_vpn.php?vpntype=l2tp&mode=raw"); - -} - -else if ($tab_group == 'firewall') { - + $tab_array[] = array(gettext("PPTP Logins"), (($vpntype == "pptp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=pptp"); + $tab_array[] = array(gettext("PPTP Raw"), (($vpntype == "pptp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=pptp&mode=raw"); + $tab_array[] = array(gettext("PPPoE Logins"), (($vpntype == "poes") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=poes"); + $tab_array[] = array(gettext("PPPoE Raw"), (($vpntype == "poes") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=poes&mode=raw"); + $tab_array[] = array(gettext("L2TP Logins"), (($vpntype == "l2tp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=l2tp"); + $tab_array[] = array(gettext("L2TP Raw"), (($vpntype == "l2tp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=l2tp&mode=raw"); +} elseif ($tab_group == 'firewall') { $tab_array[] = array(gettext("Normal View"), true, "/diag_logs_filter.php"); $tab_array[] = array(gettext("Dynamic View"), false, "/diag_logs_filter_dynamic.php"); $tab_array[] = array(gettext("Summary View"), false, "/diag_logs_filter_summary.php"); - -} - -else { +} elseif ($tab_group == 'proxy') { + $tab_array[] = array(gettext('Cache'), true, '/diag_logs_proxy.php?type=cache'); + $tab_array[] = array(gettext('Access'), false, '/diag_logs_proxy.php?type=access'); +} else { $tab_array[] = array(gettext("General"), true, "/diag_logs.php"); $tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php"); $tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php"); @@ -68,8 +51,8 @@ else { $tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php"); } -?> - - diff --git a/src/www/diag_logs_proxy.php b/src/www/diag_logs_proxy.php index df55c25d6..12e15bf20 100644 --- a/src/www/diag_logs_proxy.php +++ b/src/www/diag_logs_proxy.php @@ -29,15 +29,20 @@ require_once("guiconfig.inc"); require_once("system.inc"); -$logfile = '/var/log/squid/cache.log'; - if (empty($config['syslog']['nentries'])) { $nentries = 50; } else { $nentries = $config['syslog']['nentries']; } -if ($_POST['clear']) { +$type = 'cache'; +if (isset($_GET['type']) && $_GET['type'] === 'access') { + $type = $_GET['type']; +} + +$logfile = "/var/log/squid/{$type}.log"; + +if (isset($_GET['clear'])) { clear_log($logfile); } @@ -53,17 +58,19 @@ include("head.inc");
- +
+

-
+ " /> +
diff --git a/src/www/diag_logs_tabs.inc b/src/www/diag_logs_tabs.inc index e2772bb2a..87dd71701 100644 --- a/src/www/diag_logs_tabs.inc +++ b/src/www/diag_logs_tabs.inc @@ -38,6 +38,6 @@ $tab_array[] = array(gettext("VPN"), $active_tab == "/diag_logs_vpn.php", "diag_ $tab_array[] = array(gettext("Load Balancer"), $active_tab == "/diag_logs_relayd.php", "diag_logs_relayd.php"); $tab_array[] = array(gettext("OpenVPN"), $active_tab == "/diag_logs_openvpn.php", "diag_logs_openvpn.php"); $tab_array[] = array(gettext("NTP"), $active_tab == "/diag_logs_ntpd.php", "diag_logs_ntpd.php"); -$tab_array[] = array(gettext("Proxy"), $active_tab == "/diag_logs_proxy.php", "diag_logs_proxy.php"); +$tab_array[] = array(gettext("Proxy"), $active_tab == "/diag_logs_proxy.php", "diag_logs_proxy.php?type=cache"); $tab_array[] = array(gettext("Settings"), $active_tab == "/diag_logs_settings.php", "diag_logs_settings.php"); display_top_tabs($tab_array);