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