From 06921d973e7d056080450e48971e2d5703498390 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 7 May 2023 14:19:30 +0200 Subject: [PATCH] UI - Adding shortcut list select button for "clear/reset history" --- changedetectionio/__init__.py | 7 +++++++ changedetectionio/templates/watch-overview.html | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index aeb6f555..1afddfd1 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1313,6 +1313,13 @@ def changedetection_app(config=None, datastore_o=None): update_q.put(queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': uuid, 'skip_when_checksum_same': False})) flash("{} watches queued for rechecking".format(len(uuids))) + elif (op == 'clear-history'): + for uuid in uuids: + uuid = uuid.strip() + if datastore.data['watching'].get(uuid): + datastore.clear_watch_history(uuid) + flash("{} watches cleared/reset.".format(len(uuids))) + elif (op == 'notification-default'): from changedetectionio.notification import ( default_notification_format_for_watch diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index b7adcaf4..4a10cd04 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -38,7 +38,8 @@ - + + {% if watches|length >= pagination.per_page %} {{ pagination.info }}