From e51ee7ab5578f37a16c286f4c9b33d5a58397517 Mon Sep 17 00:00:00 2001 From: terrtia Date: Tue, 12 Dec 2023 10:35:33 +0100 Subject: [PATCH] chg: [crawlers] add endpoints to reset captures --- var/www/blueprints/crawler_splash.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/www/blueprints/crawler_splash.py b/var/www/blueprints/crawler_splash.py index 1b7f4454..6fa53577 100644 --- a/var/www/blueprints/crawler_splash.py +++ b/var/www/blueprints/crawler_splash.py @@ -83,6 +83,13 @@ def crawler_dashboard_json(): return jsonify({'crawlers_status': crawlers_status, 'stats': crawlers_latest_stats}) +@crawler_splash.route("/crawlers/dashboard/captures/delete", methods=['GET']) +@login_required +@login_admin +def crawlers_dashboard(): + crawlers.delete_captures() + return redirect(url_for('crawler_splash.crawlers_dashboard')) + @crawler_splash.route("/crawlers/manual", methods=['GET']) @login_required