mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-11 18:45:34 +00:00
fixed test failure
This commit is contained in:
@@ -268,9 +268,23 @@ def changedetection_app(config=None, datastore_o=None):
|
||||
# @todo In the future make this a configurable link back (see work on BASE_URL https://github.com/dgtlmoon/changedetection.io/pull/228)
|
||||
guid = "{}/{}".format(watch['uuid'], watch['last_changed'])
|
||||
fe = fg.add_entry()
|
||||
fe.title(watch['url'])
|
||||
fe.link(href=watch['url'])
|
||||
fe.description(watch['url'])
|
||||
|
||||
|
||||
# Include a link to the diff page, they will have to login here to see if password protection is enabled.
|
||||
# Description is the page you watch, link takes you to the diff JS UI page
|
||||
base_url = datastore.data['settings']['application']['base_url']
|
||||
if base_url == '':
|
||||
base_url = "<base-url-env-var-not-set>"
|
||||
|
||||
diff_link = {'href': "{}{}".format(base_url, url_for('diff_history_page', uuid=watch['uuid']))}
|
||||
|
||||
# @todo use title if it exists
|
||||
fe.link(link=diff_link)
|
||||
fe.title(title=watch['url'])
|
||||
|
||||
# @todo in the future <description><![CDATA[<html><body>Any code html is valid.</body></html>]]></description>
|
||||
fe.description(description=watch['url'])
|
||||
|
||||
fe.guid(guid, permalink=False)
|
||||
dt = datetime.datetime.fromtimestamp(int(watch['newest_history_key']))
|
||||
dt = dt.replace(tzinfo=pytz.UTC)
|
||||
@@ -283,7 +297,6 @@ def changedetection_app(config=None, datastore_o=None):
|
||||
@app.route("/", methods=['GET'])
|
||||
@login_required
|
||||
def index():
|
||||
import uuid
|
||||
|
||||
limit_tag = request.args.get('tag')
|
||||
pause_uuid = request.args.get('pause')
|
||||
@@ -455,11 +468,11 @@ def changedetection_app(config=None, datastore_o=None):
|
||||
|
||||
update_obj = {'url': form.url.data.strip(),
|
||||
'minutes_between_check': form.minutes_between_check.data,
|
||||
'seconds_between_check': form.seconds_between_check.data,
|
||||
'minutes_or_seconds': form.minutes_or_seconds.data,
|
||||
'tag': form.tag.data.strip(),
|
||||
'title': form.title.data.strip(),
|
||||
'headers': form.headers.data,
|
||||
'body': form.body.data,
|
||||
'method': form.method.data,
|
||||
'fetch_backend': form.fetch_backend.data,
|
||||
'trigger_text': form.trigger_text.data,
|
||||
'notification_title': form.notification_title.data,
|
||||
|
||||
@@ -48,39 +48,3 @@ function focus_error_tab() {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function use_seconds_change() {
|
||||
// var isChecked = document.querySelectorAll('input[id="use_seconds"]:checked').length
|
||||
// var labelIntegerField = document.querySelector("label[for=minutes_between_check]");
|
||||
// var msgDefault = document.getElementById("minutes-message-default");
|
||||
// var msgNonDefault = document.getElementById("minutes-message-non-default");
|
||||
// var msgWarning = document.getElementById("seconds-warning");
|
||||
// if (isChecked) {
|
||||
// labelIntegerField.innerHTML = "Maximum time in seconds until recheck";
|
||||
// try {
|
||||
// msgDefault.style.display = "none";
|
||||
// } catch(error) {
|
||||
//continue, won't be present if not default interval
|
||||
// }
|
||||
// try {
|
||||
// msgNonDefault.style.display = "none";
|
||||
// } catch(error) {
|
||||
//continue, won't be present if not default interval
|
||||
// }
|
||||
// msgWarning.style.display = "";
|
||||
// }
|
||||
// else {
|
||||
// labelIntegerField.innerHTML = "Maximum time in minutes until recheck";
|
||||
// try {
|
||||
// msgDefault.style.display = "";
|
||||
// } catch(error) {
|
||||
//continue, won't be present if not default interval
|
||||
// }
|
||||
// try {
|
||||
// msgNonDefault.style.display = "";
|
||||
// } catch(error) {
|
||||
//continue, won't be present if not default interval
|
||||
// }
|
||||
// msgWarning.style.display = "none";
|
||||
// }
|
||||
}
|
||||
@@ -399,7 +399,7 @@ function getSort() {
|
||||
function closeGridDisplay() {
|
||||
document.getElementsByName("showhide")[0].checked = false;
|
||||
var checkboxes = document.getElementsByName('check');
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
for (i = 0; i < checkboxes.length; i++) {
|
||||
checkboxes[i].checked = false;
|
||||
}
|
||||
document.getElementById("checkbox-functions").style.display = "none";
|
||||
|
||||
@@ -32,22 +32,17 @@
|
||||
<span class="pure-form-message-inline">Organisational tag/group name used in the main listing page</span>
|
||||
</div>
|
||||
<div class="pure-control-group">
|
||||
<span id="duration">
|
||||
{{ render_field(form.minutes_between_check) }}
|
||||
</span>
|
||||
{{ render_field(form.minutes_between_check) }}
|
||||
{% if using_default_minutes %}
|
||||
<span id="minutes-message-default" class="pure-form-message-inline">Currently using the <a
|
||||
<span class="pure-form-message-inline">Currently using the <a
|
||||
href="{{ url_for('settings_page', uuid=uuid) }}">default global settings</a>, change to another value if you want to be specific.</span>
|
||||
{% else %}
|
||||
<span id="minutes-message-non-default" class="pure-form-message-inline">Set to blank to use the <a
|
||||
<span class="pure-form-message-inline">Set to blank to use the <a
|
||||
href="{{ url_for('settings_page', uuid=uuid) }}">default global settings</a>.</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="pure-control-group">
|
||||
|
||||
<!-- <span id="seconds-warning" class="pure-form-message-inline" style="display:{{'' if watch.use_seconds == True else 'none'}};">Warning: Setting the recheck duration too short can overload the queue and lead to
|
||||
unstable performance and application crashes. Test and adjust the duration to ensure
|
||||
it allows sufficent time to check the target website before queing the watch again.</span> -->
|
||||
{{ render_field(form.extract_title_as_title) }}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user