From 58c7cbeac789e92206e1b911b4c557ac75d021c0 Mon Sep 17 00:00:00 2001 From: jtagcat Date: Thu, 5 Jan 2023 20:12:02 +0000 Subject: [PATCH] UI: Updating queued success message (#1285) --- changedetectionio/__init__.py | 5 ++--- changedetectionio/tests/test_backend.py | 2 +- changedetectionio/tests/test_source.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 3fdc4ae0..a789e2c4 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1218,7 +1218,7 @@ def changedetection_app(config=None, datastore_o=None): if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']: update_q.put(queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': watch_uuid, 'skip_when_checksum_same': False})) i += 1 - flash("{} watches are queued for rechecking.".format(i)) + flash("{} watches queued for rechecking.".format(i)) return redirect(url_for('index', tag=tag)) @app.route("/form/checkbox-operations", methods=['POST']) @@ -1239,7 +1239,6 @@ def changedetection_app(config=None, datastore_o=None): uuid = uuid.strip() if datastore.data['watching'].get(uuid): datastore.data['watching'][uuid.strip()]['paused'] = True - flash("{} watches paused".format(len(uuids))) elif (op == 'unpause'): @@ -1269,8 +1268,8 @@ def changedetection_app(config=None, datastore_o=None): if datastore.data['watching'].get(uuid): # Recheck and require a full reprocessing update_q.put(queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': uuid, 'skip_when_checksum_same': False})) + flash("{} watches queued for rechecking".format(len(uuids))) - flash("{} watches un-muted".format(len(uuids))) elif (op == 'notification-default'): from changedetectionio.notification import ( default_notification_format_for_watch diff --git a/changedetectionio/tests/test_backend.py b/changedetectionio/tests/test_backend.py index d0cd6b09..7def3966 100644 --- a/changedetectionio/tests/test_backend.py +++ b/changedetectionio/tests/test_backend.py @@ -67,7 +67,7 @@ def test_check_basic_change_detection_functionality(client, live_server): # Force recheck res = client.get(url_for("form_watch_checknow"), follow_redirects=True) - assert b'1 watches are queued for rechecking.' in res.data + assert b'1 watches queued for rechecking.' in res.data wait_for_all_checks(client) diff --git a/changedetectionio/tests/test_source.py b/changedetectionio/tests/test_source.py index 4956f007..695418c9 100644 --- a/changedetectionio/tests/test_source.py +++ b/changedetectionio/tests/test_source.py @@ -40,7 +40,7 @@ def test_check_basic_change_detection_functionality_source(client, live_server): # Force recheck res = client.get(url_for("form_watch_checknow"), follow_redirects=True) - assert b'1 watches are queued for rechecking.' in res.data + assert b'1 watches queued for rechecking.' in res.data time.sleep(5) @@ -90,4 +90,4 @@ def test_check_ignore_elements(client, live_server): ) assert b'foobar-detection' not in res.data assert b'<br' not in res.data - assert b'<p' in res.data \ No newline at end of file + assert b'<p' in res.data