diff options
Diffstat (limited to 'usr/local/www/status_rrd_graph_settings.php')
-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 " . |