summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2015-12-08 23:16:59 -0800
committerStephen Beaver <sbeaver@netgate.com>2015-12-11 16:48:55 -0500
commit95acc8906156871623c0d371accb875e97651bc4 (patch)
tree026a925220100f6e5a74b885f253cb398c9a2f6d /src/usr
parent3e08116120a4accbe22c2cb83258e79260b6c189 (diff)
downloadpfsense-95acc8906156871623c0d371accb875e97651bc4.zip
pfsense-95acc8906156871623c0d371accb875e97651bc4.tar.gz
Add few comments for clarity
Include table header titles in raw mode (time and message). In raw mode give all horizontal space not being consumed by the time field to the message filed. Provides more space so fewer entires to consume multiple vertical line space. Change table message field header title form "Log Message" to "Message" Include a write_config description.
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/local/www/diag_logs.php56
1 files changed, 38 insertions, 18 deletions
diff --git a/src/usr/local/www/diag_logs.php b/src/usr/local/www/diag_logs.php
index a8a2ebd..2102b46 100755
--- a/src/usr/local/www/diag_logs.php
+++ b/src/usr/local/www/diag_logs.php
@@ -153,25 +153,33 @@ if ($filterlogentries_submit) {
$specific_log = basename($logfile) . '_settings';
+# All
$pconfig['cronorder'] = $config['syslog'][$specific_log]['cronorder'];
$pconfig['nentries'] = $config['syslog'][$specific_log]['nentries'];
$pconfig['logfilesize'] = $config['syslog'][$specific_log]['logfilesize'];
$pconfig['format'] = $config['syslog'][$specific_log]['format'];
+
+# System General (main) Specific
$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']);
$save_settings = getGETPOSTsettingvalue('save_settings', null);
if ($save_settings) {
+
+ # All
$cronorder = getGETPOSTsettingvalue('cronorder', null);
$nentries = getGETPOSTsettingvalue('nentries', null);
$logfilesize = getGETPOSTsettingvalue('logfilesize', null);
$format = getGETPOSTsettingvalue('format', null);
+
+ # System General (main) Specific
$loglighttpd = getGETPOSTsettingvalue('loglighttpd', null);
unset($input_errors);
$pconfig = $_POST;
/* input validation */
+ # All
if (isset($nentries) && (strlen($nentries) > 0)) {
if (!is_numeric($nentries) || ($nentries < 5) || ($nentries > 2000)) {
$input_errors[] = gettext("Number of log entries to show must be between 5 and 2000.");
@@ -189,6 +197,7 @@ if ($save_settings) {
# Clear out the specific log settings and leave only the applied settings to override the general logging options (global) settings.
unset($config['syslog'][$specific_log]);
+ # All
if ($cronorder != '') { # if not using the general logging options setting (global)
$config['syslog'][$specific_log]['cronorder'] = $cronorder;
}
@@ -205,22 +214,27 @@ if ($save_settings) {
$config['syslog'][$specific_log]['format'] = $format;
}
- $oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
+ # System General (main) Specific
if ($logfile == 'system') {
+ $oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
$config['syslog']['nologlighttpd'] = $loglighttpd ? false : true;
}
- write_config();
+
+ write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]));
$retval = 0;
$savemsg = get_std_save_message($retval);
- if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) {
- ob_flush();
- flush();
- log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
- send_event("service restart webgui");
- $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) {
+ ob_flush();
+ flush();
+ log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
+ send_event("service restart webgui");
+ $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
+ }
}
}
}
@@ -427,7 +441,7 @@ if (!$rawfilter) {
<th><?=gettext("Time")?></th>
<th><?=gettext("Process")?></th>
<th><?=gettext("PID")?></th>
- <th style="width:100%"><?=gettext("Log Message")?></th>
+ <th style="width:100%"><?=gettext("Message")?></th>
</tr>
<?php
foreach ($filterlog as $filterent) {
@@ -468,8 +482,8 @@ else
<table class="table table-striped table-hover">
<thead>
<tr>
- <th class="col-sm-2"></th>
- <th></th>
+ <th><?=gettext("Time")?></th>
+ <th style="width:100%"><?=gettext("Message")?></th>
</tr>
</thead>
<tbody>
@@ -518,6 +532,8 @@ $section->addInput(new Form_StaticText(
'These settings override the "General Logging Options" settings.'
));
+
+# All
$group = new Form_Group('Forward/Reverse Display');
$group->add(new Form_Checkbox(
@@ -605,6 +621,8 @@ $group->add(new Form_Checkbox(
$group->setHelp('Show the log entries as formatted or raw output as generated by the service. The raw output will reveal more detailed information, but it is more difficult to read.');
$section->add($group);
+
+# System General (main) Specific
if ($logfile == 'system') {
$section->addInput(new Form_Checkbox(
'loglighttpd',
@@ -614,6 +632,9 @@ if ($logfile == 'system') {
))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the system log.');
}
+
+$group = new Form_Group('Action');
+
$btnsavesettings = new Form_Button(
'save_settings',
gettext('Save'),
@@ -622,6 +643,12 @@ $btnsavesettings = new Form_Button(
$btnsavesettings->addClass('btn-sm');
+$group->add(new Form_StaticText(
+ '',
+ $btnsavesettings
+))->setHelp('Saves changed settings.');
+
+
$btnclear = new Form_Button(
'clear',
' ' . gettext('Clear log'),
@@ -631,13 +658,6 @@ $btnclear = new Form_Button(
$btnclear->removeClass('btn-primary')->addClass('btn-danger')->addClass('btn-sm');
-$group = new Form_Group('Action');
-
-$group->add(new Form_StaticText(
- '',
- $btnsavesettings
-))->setHelp('Saves changed settings.');
-
$group->add(new Form_StaticText(
'',
$btnclear
OpenPOWER on IntegriCloud