diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 78966ad0c..45073440f 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -458,6 +458,19 @@ def changedetection_app(config=None, datastore_o=None): return 'OK' + + @app.route("/scrub/", methods=['GET']) + @login_required + def scrub_watch(uuid): + try: + datastore.scrub_watch(uuid) + except KeyError: + flash('Watch not found', 'error') + else: + flash("Cleared snapshot history for watch {}".format(uuid)) + #@todo gives 'Not enough saved change detection snapshots to produce a report.' after scrub.. interesting + return redirect(url_for('index')) + @app.route("/scrub", methods=['GET', 'POST']) @login_required def scrub_page(): diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index e39c082b9..009f6ad01 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -259,6 +259,8 @@ nav Delete + Scrub Create Copy