diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/lcdproc-dev/lcdproc.inc | 5 | ||||
-rw-r--r-- | config/lcdproc-dev/lcdproc_client.php | 6 | ||||
-rw-r--r-- | config/mailreport/mail_reports.inc | 17 | ||||
-rw-r--r-- | config/mailreport/mailreport.xml | 2 | ||||
-rw-r--r-- | config/mailreport/status_mail_report_add_graph.php | 7 | ||||
-rwxr-xr-x | config/sarg/sarg_about.php | 4 |
6 files changed, 28 insertions, 13 deletions
diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index 00768cd7..73827721 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -308,7 +308,8 @@ $config_text .= "[{$lcdproc_config['driver']}]\n"; $config_text .= "driverpath=/usr/local/lib/lcdproc/\n"; $config_text .= "ConnectionType={$lcdproc_config['connection_type']}\n"; - $config_text .= "Device={$realport}\n"; + if($lcdproc_config['comport'] != "none") + $config_text .= "Device={$realport}\n"; $config_text .= "Port=0x378\n"; $config_text .= "Speed=0\n"; $config_text .= "Keypad=yes\n"; @@ -502,7 +503,7 @@ EOD; restart_service(LCDPROC_SERVICE_NAME); } } - if((! $lcdproc_config['driver']) || ($lcdproc_config['comport'] == "none")) { + if((! $lcdproc_config['driver']) || (! $lcdproc_config['comport'])) { /* no parameters user does not want lcdproc running */ /* lets stop the service and remove the rc file */ if(file_exists(LCDPROC_RCFILE)) { diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php index 5306c903..922ed14e 100644 --- a/config/lcdproc-dev/lcdproc_client.php +++ b/config/lcdproc-dev/lcdproc_client.php @@ -554,11 +554,11 @@ /* format speed in bits/sec, input: bytes/sec Code from: graph.php ported to PHP*/ if ($speed < 125000) - {return sprintf("%3d.1 Kbps", $speed / 125);} + {return sprintf("%5.1f Kbps", $speed / 125);} if ($speed < 125000000) - {return sprintf("%3d.1 Mbps", $speed / 125000);} + {return sprintf("%5.1f Mbps", $speed / 125000);} // else - return sprintf("%3d.1 Gbps", $speed / 125000000); + return sprintf("%5.1f Gbps", $speed / 125000000); } function add_summary_declaration(&$lcd_cmds, $name) { diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc index 0119457a..6dddf7cd 100644 --- a/config/mailreport/mail_reports.inc +++ b/config/mailreport/mail_reports.inc @@ -35,13 +35,13 @@ require_once("filter.inc"); require_once("rrd.inc"); $graph_length = array( - "8hour" => 28800, + "eighthour" => 28800, "day" => 86400, "week" => 604800, "month" => 2764800, "quarter" => 8035200, "year" => 31622400, - "4year" => 126489600); + "fouryear" => 126489600); $logfile_friendly = array( "dhcpd" => "DHCP", @@ -88,6 +88,7 @@ function get_dates($curperiod, $graph) { $offset = 0; } switch($graph) { + case "eighthour": case "8hour": if($curhour < 24) $starthour = 16; @@ -142,6 +143,7 @@ function get_dates($curperiod, $graph) { if($offset != 0) $end = mktime(0, 0, 0, 1, 0, (($curyear + $offset) +1)); break; + case "fouryear": case "4year": $start = mktime(0, 0, 0, 1, 0, (($curyear - 3) + $offset)); if($offset != 0) @@ -1263,4 +1265,15 @@ function get_friendly_log_name($logfile) { return $friendly; } +function fixup_graph_timespan($timespan) { + switch ($timespan) { + case "8hour": + return "eighthour"; + case "4year": + return "fouryear"; + default: + return $timespan; + } +} + ?> diff --git a/config/mailreport/mailreport.xml b/config/mailreport/mailreport.xml index 9239f82e..803e205b 100644 --- a/config/mailreport/mailreport.xml +++ b/config/mailreport/mailreport.xml @@ -37,7 +37,7 @@ ]]> </copyright> <name>mailreport</name> - <version>2.0.12</version> + <version>2.1</version> <title>Status: Email Reports</title> <additional_files_needed> <prefix>/usr/local/bin/</prefix> diff --git a/config/mailreport/status_mail_report_add_graph.php b/config/mailreport/status_mail_report_add_graph.php index 3f629d56..d6f0d362 100644 --- a/config/mailreport/status_mail_report_add_graph.php +++ b/config/mailreport/status_mail_report_add_graph.php @@ -130,16 +130,16 @@ $custom_databases = array_merge($dbheader_custom, $databases); $styles = array('inverse' => gettext('Inverse'), 'absolute' => gettext('Absolute')); -$graphs = array("8hour", "day", "week", "month", "quarter", "year", "4year"); +$graphs = array("eighthour", "day", "week", "month", "quarter", "year", "fouryear"); $periods = array("absolute" => gettext("Absolute Timespans"), "current" => gettext("Current Period"), "previous" => gettext("Previous Period")); $graph_length = array( - "8hour" => 28800, + "eighthour" => 28800, "day" => 86400, "week" => 604800, "month" => 2764800, "quarter" => 8035200, "year" => 31622400, - "4year" => 126489600); + "fouryear" => 126489600); if ($_POST) { unset($_POST['__csrf_magic']); @@ -219,6 +219,7 @@ include("head.inc"); <select name="timespan" class="formselect" style="z-index: -10;"> <?php foreach (array_keys($graph_length) as $timespan) { + $pconfig['timespan'] = fixup_graph_timespan($pconfig['timespan']); echo "<option value=\"$timespan\""; if ($timespan == $pconfig['timespan']) echo " selected"; echo ">" . htmlspecialchars(ucwords($timespan)) . "</option>\n"; diff --git a/config/sarg/sarg_about.php b/config/sarg/sarg_about.php index 573dc5ee..fba456b2 100755 --- a/config/sarg/sarg_about.php +++ b/config/sarg/sarg_about.php @@ -73,7 +73,7 @@ include("head.inc"); </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Sarg Site");?></td> - <td width="78%" class="vtable"><?=gettext("<a target=_new href='http://sarg.sourceforge.net/welcome.php'>Squid Analysis Report Generator</a><br><br>");?> + <td width="78%" class="vtable"><?=gettext("<a target=_new href='http://sarg.sourceforge.net/'>Squid Analysis Report Generator</a><br><br>");?> </tr> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("About sarg package"); ?></td> @@ -83,7 +83,7 @@ include("head.inc"); <td width="78%" class="vtable"><?=gettext("Package Created by <a target=_new href='https://forum.pfsense.org/index.php?action=profile;u=4710'>Marcello Coutinho</a><br><br>");?></td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Donatios ");?></td> + <td width="22%" valign="top" class="vncell"><?=gettext("Donations ");?></td> <td width="78%" class="vtable"><?=gettext("If you like this package, please <a target=_new href='https://www.pfsense.org/index.php?option=com_content&task=view&id=47&Itemid=77'>donate to pfSense project</a>.<br><br> If you want that your donation goes to this package developer, make a note on donation forwarding it to me.<br><br>");?></td> </tr> |