Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
4032bc53
Commit
4032bc53
authored
Nov 11, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logs: move last entries away from status section
parent
fba56a9a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
14 deletions
+31
-14
Menu.xml
src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml
+5
-7
diag_logs_dhcp.php
src/www/diag_logs_dhcp.php
+12
-2
diag_logs_ppp.php
src/www/diag_logs_ppp.php
+14
-5
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml
View file @
4032bc53
...
...
@@ -51,6 +51,11 @@
<Routing
url=
"/diag_logs_routing.php"
/>
<Resolver
url=
"/diag_logs_resolver.php"
/>
<Wireless
url=
"/diag_logs_wireless.php"
/>
<DHCP
url=
"/diag_logs_dhcp.php"
/>
<PPP
url=
"/diag_logs_ppp.php"
/>
<VPN
url=
"/diag_logs_vpn.php?vpntype=pptp"
>
<Type
url=
"/diag_logs_vpn.php*"
/>
</VPN>
</LogFiles>
<Settings
cssClass=
"fa fa-cogs"
>
<General
url=
"/system_general.php"
/>
...
...
@@ -311,13 +316,6 @@
<DHCPv6Leases
VisibleName=
"DHCP IPv6 Leases"
url=
"/status_dhcpv6_leases.php"
>
<DHCPv6LeasesDetails
url=
"/status_dhcpv6_leases.php?*"
/>
</DHCPv6Leases>
<LogFiles
VisibleName=
"Log Files"
cssClass=
"fa fa-eye"
>
<DHCP
url=
"/diag_logs_dhcp.php"
/>
<PPP
url=
"/diag_logs_ppp.php"
/>
<VPN
url=
"/diag_logs_vpn.php?vpntype=pptp"
>
<Type
url=
"/diag_logs_vpn.php*"
/>
</VPN>
</LogFiles>
</Status>
<Help
order=
"8"
cssClass=
"glyphicon glyphicon-question-sign"
>
<AboutThisPage
VisibleName=
"About this Page"
url=
"/help.php"
IsExternal=
"Y"
/>
...
...
src/www/diag_logs_dhcp.php
View file @
4032bc53
...
...
@@ -34,6 +34,7 @@ require_once("system.inc");
require_once
(
"interfaces.inc"
);
$dhcpd_logfile
=
'/var/log/dhcpd.log'
;
$filtertext
=
''
;
$nentries
=
50
;
if
(
isset
(
$config
[
'syslog'
][
'nentries'
]))
{
...
...
@@ -46,6 +47,10 @@ if ($_POST['clear']) {
services_dhcpd_configure
();
}
if
(
isset
(
$_POST
[
'filtertext'
]))
{
$filtertext
=
htmlspecialchars
(
$_POST
[
'filtertext'
]);
}
$pgtitle
=
array
(
gettext
(
"Status"
),
gettext
(
"System logs"
),
gettext
(
"DHCP"
));
$shortcut_section
=
"dhcp"
;
include
(
"head.inc"
);
...
...
@@ -66,8 +71,13 @@ include("head.inc");
<div
class=
"tab-content content-box col-xs-12"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-sort"
>
<tr><td
colspan=
"2"
>
<?=
sprintf
(
gettext
(
'Last %s DHCP service log entries'
),
$nentries
);
?>
</strong></td><tr>
<?php
dump_clog
(
$dhcpd_logfile
,
$nentries
);
?>
<tr><td
colspan=
"2"
>
<form
id=
"clearform"
name=
"clearform"
action=
"diag_logs_dhcp.php"
method=
"post"
class=
"__mt"
>
<input
id=
"filtertext"
name=
"filtertext"
value=
"
<?=
$filtertext
;
?>
"
/>
<input
id=
"filtersubmit"
name=
"filtersubmit"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
"Filter"
);
?>
"
/>
</form>
</td></tr>
<?php
dump_clog
(
$dhcpd_logfile
,
$nentries
,
$filtertext
);
?>
<tr><td
colspan=
"2"
>
<form
action=
"diag_logs_dhcp.php"
method=
"post"
>
<input
name=
"clear"
type=
"submit"
class=
"btn"
value=
"
<?=
gettext
(
"Clear log"
);
?>
"
/>
...
...
src/www/diag_logs_ppp.php
View file @
4032bc53
...
...
@@ -33,10 +33,10 @@ require_once("system.inc");
require_once
(
"interfaces.inc"
);
$ppps_logfile
=
'/var/log/ppps.log'
;
$filtertext
=
''
;
$nentries
=
50
;
if
(
empty
(
$config
[
'syslog'
][
'nentries'
]))
{
$nentries
=
50
;
}
else
{
if
(
isset
(
$config
[
'syslog'
][
'nentries'
]))
{
$nentries
=
$config
[
'syslog'
][
'nentries'
];
}
...
...
@@ -44,6 +44,10 @@ if ($_POST['clear']) {
clear_clog
(
$ppps_logfile
);
}
if
(
isset
(
$_POST
[
'filtertext'
]))
{
$filtertext
=
htmlspecialchars
(
$_POST
[
'filtertext'
]);
}
$pgtitle
=
array
(
gettext
(
"Status"
),
gettext
(
"System logs"
),
gettext
(
"PPP"
));
include
(
"head.inc"
);
...
...
@@ -64,8 +68,13 @@ include("head.inc");
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-sort"
>
<tr><td
colspan=
"2"
>
<?=
sprintf
(
gettext
(
"Last %s PPP log entries"
),
$nentries
);
?>
</strong></td></tr>
<?php
dump_clog
(
$ppps_logfile
,
$nentries
);
?>
<tr><td
colspan=
"2"
>
<form
id=
"clearform"
name=
"clearform"
action=
"diag_logs_ppp.php"
method=
"post"
class=
"__mt"
>
<input
id=
"filtertext"
name=
"filtertext"
value=
"
<?=
$filtertext
;
?>
"
/>
<input
id=
"filtersubmit"
name=
"filtersubmit"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
"Filter"
);
?>
"
/>
</form>
</td></tr>
<?php
dump_clog
(
$ppps_logfile
,
$nentries
,
$filtertext
);
?>
<tr><td
colspan=
"2"
>
<form
action=
"diag_logs_ppp.php"
method=
"post"
>
<input
name=
"clear"
type=
"submit"
class=
"btn"
value=
"
<?=
gettext
(
"Clear log"
);
?>
"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment