diff options
author | jim-p <jimp@pfsense.org> | 2011-06-27 13:11:41 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-27 13:11:41 -0400 |
commit | 39e268c4fd3c5e5da461dc24bc2445eceb28360c (patch) | |
tree | f49e6dce592fa653e8c28376a936cbf4892989fe | |
parent | d30afa6092c0abd129fd72aa59437b7673cfceb0 (diff) | |
download | pfsense-39e268c4fd3c5e5da461dc24bc2445eceb28360c.zip pfsense-39e268c4fd3c5e5da461dc24bc2445eceb28360c.tar.gz |
Add a button to reset the RRD data (rm's rrd files and reinitializes).
-rwxr-xr-x | usr/local/www/status_rrd_graph_settings.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php index a4b562e..85061ba 100755 --- a/usr/local/www/status_rrd_graph_settings.php +++ b/usr/local/www/status_rrd_graph_settings.php @@ -62,8 +62,11 @@ $periods = array("absolute" => gettext("Absolute Timespans"), "current" => gettext("Current Period"), "previous" => gettext("Previous Period")); -if ($_POST) { - +if ($_POST['ResetRRD']) { + mwexec('/bin/rm /var/db/rrd/*'); + $retval = enable_rrd_graphing(); + $savemsg = "RRD data has been cleared. New RRD files have been generated."; +} elseif ($_POST) { unset($input_errors); $pconfig = $_POST; @@ -223,6 +226,12 @@ include("head.inc"); </td> </tr> <tr> + <td width="22%" valign="top"> </td> + <td width="78%"> + <input name="ResetRRD" type="submit" class="formbtn" value="<?=gettext("Reset RRD Data");?>" onclick="return confirm('<?=gettext('Do you really want to reset the RRD graphs? This will erase all graph data.');?>')"> + </td> + </tr> + <tr> <td width="22%" height="53" valign="top"> </td> <td width="78%"><strong><span class="red"><?=gettext("Note:");?></span></strong><br> <?=gettext("Graphs will not be allowed to be recreated within a 1 minute interval, please " . |