Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysutils/pfSense-Status_Monitoring: Add reason to write_config() calls #404

Merged
merged 3 commits into from
Oct 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sysutils/pfSense-Status_Monitoring/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-Status_Monitoring
PORTVERSION= 1.7.2
PORTVERSION= 1.7.3
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,18 @@ function createSlug($string) {

}

$changedesc = gettext("Status: Monitoring:") . " ";
if($_POST['enable']) {
if(($_POST['enable'] === 'false')) {
unset($config['rrd']['enable']);
$savemsg = "RRD graphing has been disabled.";
$changedesc .= gettext($savemsg);
} else {
$config['rrd']['enable'] = true;
$savemsg = "RRD graphing has been enabled.";
$changedesc .= gettext($savemsg);
}
write_config();
write_config($changedesc);

enable_rrd_graphing();
}
Expand All @@ -86,7 +89,7 @@ function createSlug($string) {
//old config that needs to be updated
if(strpos($config['rrd']['category'], '&resolution') === false) {
$config['rrd']['category'] = "left=system-processor&right=&resolution=300&timePeriod=-1d&startDate=&endDate=&startTime=0&endTime=0&graphtype=line&invert=true&refresh-interval=0";
write_config();
write_config(gettext("Status: Monitoring: updated old configuration."));
}

//save settings for current view
Expand Down