mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-09-29 08:46:45 +00:00
fixed backend test failure - had to remove grammar formatting replacement for flash message in api_watch_checknow.
This commit is contained in:
@@ -663,7 +663,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|||||||
uuids = request.form.get('uuids')
|
uuids = request.form.get('uuids')
|
||||||
|
|
||||||
if uuids == '' :
|
if uuids == '' :
|
||||||
flash("No watches selected.")
|
flash("No watches selected.", "notice")
|
||||||
|
|
||||||
else :
|
else :
|
||||||
|
|
||||||
@@ -684,8 +684,9 @@ def changedetection_app(config=None, datastore_o=None):
|
|||||||
except KeyError :
|
except KeyError :
|
||||||
pass
|
pass
|
||||||
|
|
||||||
flash("{0} watch{1} {2} rechecking.".format(i, "" if i == 1 else "es", "is" if i == 1 else "are"))
|
flash("{} watch{} {} rechecking.".format(i, "" if (i == 1) else "es", "is" if (i == 1) else "are"), "notice")
|
||||||
|
#flash("{} watches are rechecking.".format(i))
|
||||||
|
|
||||||
# Clear selected statuses, so we do not see the 'unviewed' class
|
# Clear selected statuses, so we do not see the 'unviewed' class
|
||||||
elif func == 'mark_selected_viewed' :
|
elif func == 'mark_selected_viewed' :
|
||||||
|
|
||||||
@@ -754,14 +755,15 @@ def changedetection_app(config=None, datastore_o=None):
|
|||||||
|
|
||||||
datastore.needs_write = True
|
datastore.needs_write = True
|
||||||
|
|
||||||
flash("{0} {1} deleted.".format(i, "watch was" if (i) == 1 else "watches were"))
|
flash("{} {} deleted.".format(i, "watch was" if (i) == 1 else "watches were"), "notice")
|
||||||
|
|
||||||
else :
|
else :
|
||||||
|
|
||||||
flash("Invalid parameter received.")
|
flash("Invalid parameter received.", "error")
|
||||||
|
|
||||||
render_template(url_for('index'), tag = limit_tag)
|
render_template(url_for('index'), tag = limit_tag)
|
||||||
|
return index()
|
||||||
|
|
||||||
@app.route("/diff/<string:uuid>", methods=['GET'])
|
@app.route("/diff/<string:uuid>", methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def diff_history_page(uuid):
|
def diff_history_page(uuid):
|
||||||
@@ -937,7 +939,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|||||||
if add_paused :
|
if add_paused :
|
||||||
datastore.data['watching'][new_uuid]['paused'] = True
|
datastore.data['watching'][new_uuid]['paused'] = True
|
||||||
datastore.needs_write = True
|
datastore.needs_write = True
|
||||||
flash("Watch added in a paused state.")
|
flash("Watch added in a paused state.", "notice")
|
||||||
|
|
||||||
else : # watch now
|
else : # watch now
|
||||||
# Straight into the queue.
|
# Straight into the queue.
|
||||||
@@ -1003,11 +1005,12 @@ def changedetection_app(config=None, datastore_o=None):
|
|||||||
else:
|
else:
|
||||||
# No tag, no uuid, add everything.
|
# No tag, no uuid, add everything.
|
||||||
for watch_uuid, watch in datastore.data['watching'].items():
|
for watch_uuid, watch in datastore.data['watching'].items():
|
||||||
|
|
||||||
if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']:
|
if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']:
|
||||||
update_q.put(watch_uuid)
|
update_q.put(watch_uuid)
|
||||||
i += 1
|
i += 1
|
||||||
flash("{0} watch{1} {2} rechecking.".format(i, "" if i == 1 else "es", "is" if i == 1 else "are"))
|
|
||||||
|
#flash("{} watch{} {} rechecking.".format(i, "" if (i == 1) else "es", "is" if (i == 1) else "are"), "notice")
|
||||||
|
flash("{} watches are rechecking.".format(i))
|
||||||
return redirect(url_for('index', tag=tag))
|
return redirect(url_for('index', tag=tag))
|
||||||
|
|
||||||
# @todo handle ctrl break
|
# @todo handle ctrl break
|
||||||
@@ -1021,7 +1024,6 @@ def changedetection_app(config=None, datastore_o=None):
|
|||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
# Check for new version and anonymous stats
|
# Check for new version and anonymous stats
|
||||||
def check_for_new_version():
|
def check_for_new_version():
|
||||||
import requests
|
import requests
|
||||||
|
|||||||
Reference in New Issue
Block a user