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
acc319f3
Commit
acc319f3
authored
Oct 06, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rrd: restructure settings POST a little
parent
0e101efe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
status_rrd_graph_settings.php
src/www/status_rrd_graph_settings.php
+11
-18
No files found.
src/www/status_rrd_graph_settings.php
View file @
acc319f3
...
...
@@ -33,26 +33,20 @@ require_once("interfaces.inc");
$pconfig
[
'enable'
]
=
isset
(
$config
[
'rrd'
][
'enable'
]);
if
(
$_POST
[
'ResetRRD'
])
{
mwexec
(
'/bin/rm /var/db/rrd/*'
);
enable_rrd_graphing
();
setup_gateways_monitor
();
$savemsg
=
"RRD data has been cleared. New RRD files have been generated."
;
}
elseif
(
$_POST
)
{
unset
(
$input_errors
);
if
(
$_POST
)
{
$pconfig
=
$_POST
;
/* input validation */
/* none */
if
(
!
$input_errors
)
{
$config
[
'rrd'
][
'enable'
]
=
$_POST
[
'enable'
]
?
true
:
false
;
write_config
();
$retval
=
0
;
$retval
=
enable_rrd_graphing
();
$savemsg
=
get_std_save_message
();
if
(
isset
(
$pconfig
[
'ResetRRD'
]))
{
$savemsg
=
gettext
(
'RRD data has been cleared.'
);
mwexec
(
'/bin/rm /var/db/rrd/*'
);
}
else
{
$config
[
'rrd'
][
'enable'
]
=
$_POST
[
'enable'
]
?
true
:
false
;
$savemsg
=
get_std_save_message
();
write_config
();
}
enable_rrd_graphing
();
setup_gateways_monitor
();
}
$pgtitle
=
array
(
gettext
(
'System'
),
gettext
(
'Settings'
),
gettext
(
'RRD Graphs'
));
...
...
@@ -68,7 +62,6 @@ include("head.inc");
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<?php
if
(
isset
(
$savemsg
))
print_info_box
(
$savemsg
);
?>
<section
class=
"col-xs-12"
>
...
...
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