From 5cd816973569e1e49e499910e3dba2fbbdf2aa60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 27 Sep 2022 11:33:36 +0200 Subject: [PATCH] chg: Avoid captures without url(s) or document --- bin/archiver.py | 6 ++++-- website/web/templates/capture.html | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/bin/archiver.py b/bin/archiver.py index 31039264..dbb157c1 100755 --- a/bin/archiver.py +++ b/bin/archiver.py @@ -77,16 +77,18 @@ class Archiver(AbstractManager): def _update_all_capture_indexes(self): '''Run that after the captures are in the proper directories''' # Recent captures + self.logger.info('Update recent indexes') directories_to_index = {capture_dir.parent.parent for capture_dir in get_captures_dir().rglob('uuid')} for directory_to_index in directories_to_index: - self.logger.info(f'Updating index for {directory_to_index}') + self.logger.debug(f'Updating index for {directory_to_index}') self._update_index(directory_to_index) self.logger.info('Recent indexes updated') # Archived captures + self.logger.info('Update archives indexes') directories_to_index = {capture_dir.parent.parent for capture_dir in self.archived_captures_dir.rglob('uuid')} for directory_to_index in directories_to_index: - self.logger.info(f'Updating index for {directory_to_index}') + self.logger.debug(f'Updating index for {directory_to_index}') self._update_index(directory_to_index) self.logger.info('Archived indexes updated') diff --git a/website/web/templates/capture.html b/website/web/templates/capture.html index 9ee19967..7ffe5cba 100644 --- a/website/web/templates/capture.html +++ b/website/web/templates/capture.html @@ -53,7 +53,7 @@
+ placeholder="URL to capture" value="{{predefined_url_to_capture}}" required> @@ -298,17 +298,35 @@ +