|
|
|
@ -452,6 +452,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
update_q.put(uuid)
|
|
|
|
|
|
|
|
|
|
if form.trigger_check.data:
|
|
|
|
|
if len(form.notification_urls.data):
|
|
|
|
|
n_object = {'watch_url': form.url.data.strip(),
|
|
|
|
|
'notification_urls': form.notification_urls.data,
|
|
|
|
|
'notification_title': form.notification_title.data,
|
|
|
|
@ -459,8 +460,10 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
'notification_format': form.notification_format.data,
|
|
|
|
|
}
|
|
|
|
|
notification_q.put(n_object)
|
|
|
|
|
flash('Test notification queued.')
|
|
|
|
|
else:
|
|
|
|
|
flash('No notification URLs set, cannot send test.', 'error')
|
|
|
|
|
|
|
|
|
|
flash('Notifications queued.')
|
|
|
|
|
|
|
|
|
|
# Diff page [edit] link should go back to diff page
|
|
|
|
|
if request.args.get("next") and request.args.get("next") == 'diff':
|
|
|
|
@ -527,7 +530,8 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
datastore.data['settings']['application']['notification_urls'] = form.notification_urls.data
|
|
|
|
|
datastore.data['settings']['application']['base_url'] = form.base_url.data
|
|
|
|
|
|
|
|
|
|
if form.trigger_check.data and len(form.notification_urls.data):
|
|
|
|
|
if form.trigger_check.data:
|
|
|
|
|
if len(form.notification_urls.data):
|
|
|
|
|
n_object = {'watch_url': "Test from changedetection.io!",
|
|
|
|
|
'notification_urls': form.notification_urls.data,
|
|
|
|
|
'notification_title': form.notification_title.data,
|
|
|
|
@ -535,7 +539,9 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
'notification_format': form.notification_format.data,
|
|
|
|
|
}
|
|
|
|
|
notification_q.put(n_object)
|
|
|
|
|
flash('Notifications queued.')
|
|
|
|
|
flash('Test notification queued.')
|
|
|
|
|
else:
|
|
|
|
|
flash('No notification URLs set, cannot send test.', 'error')
|
|
|
|
|
|
|
|
|
|
if form.password.encrypted_password:
|
|
|
|
|
datastore.data['settings']['application']['password'] = form.password.encrypted_password
|
|
|
|
|