From 32d110b92f65a510f93bbcf0a3949c50aabacd62 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 22 Mar 2025 22:48:01 +0100 Subject: [PATCH] Template tidyup & UI Fixes (#3044) --- .../blueprint/imports/templates/import.html | 20 +- .../settings/templates/settings.html | 2 +- .../templates/clear_all_history.html | 49 --- changedetectionio/templates/import.html | 125 ------- .../templates/notification-log.html | 19 -- changedetectionio/templates/settings.html | 310 ------------------ 6 files changed, 10 insertions(+), 515 deletions(-) delete mode 100644 changedetectionio/templates/clear_all_history.html delete mode 100644 changedetectionio/templates/import.html delete mode 100644 changedetectionio/templates/notification-log.html delete mode 100644 changedetectionio/templates/settings.html diff --git a/changedetectionio/blueprint/imports/templates/import.html b/changedetectionio/blueprint/imports/templates/import.html index 42080885..fbd7a4b6 100644 --- a/changedetectionio/blueprint/imports/templates/import.html +++ b/changedetectionio/blueprint/imports/templates/import.html @@ -16,26 +16,24 @@
- +
Enter one URL per line, and optionally add tags for each URL after a space, delineated by comma (,):
- https://example.com tag1, tag2, last tag -
+

Example: https://example.com tag1, tag2, last tag

URLs which do not pass validation will stay in the textarea. - +
{{ render_field(form.processor, class="processor") }} - + +
- -
- -
+
+
@@ -43,7 +41,7 @@ - +
Copy and Paste your Distill.io watch 'export' file, this should be a JSON file.
This is experimental, supported fields are name, uri, tags, config:selections, the rest (including schedule) are ignored.
@@ -51,7 +49,7 @@ How to export? https://distill.io/docs/web-monitor/how-export-and-import-monitors/
Be sure to set your default fetcher to Chrome if required.

- +
- -
- -
- - - -
- - - - - Copy and Paste your Distill.io watch 'export' file, this should be a JSON file.
- This is experimental, supported fields are name, uri, tags, config:selections, the rest (including schedule) are ignored. -
-

- How to export? https://distill.io/docs/web-monitor/how-export-and-import-monitors/
- Be sure to set your default fetcher to Chrome if required.
-

-
- - - - -
-
-
-
- {{ render_field(form.xlsx_file, class="processor") }} -
-
- {{ render_field(form.file_mapping, class="processor") }} -
-
-
- - Table of custom column and data types mapping for the Custom mapping File mapping type. - - - - - {% for n in range(4) %} - - {% endfor %} - - - - {% for n in range(4) %} - - {% endfor %} - -
Column #
Type
-
-
- - - - - - -{% endblock %} diff --git a/changedetectionio/templates/notification-log.html b/changedetectionio/templates/notification-log.html deleted file mode 100644 index ee76e259..00000000 --- a/changedetectionio/templates/notification-log.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} -
-
- -

Notification debug log

-
-
    - {% for log in logs|reverse %} -
  • {{log}}
  • - {% endfor %} -
-
- -
-
- -{% endblock %} diff --git a/changedetectionio/templates/settings.html b/changedetectionio/templates/settings.html deleted file mode 100644 index 2e651a01..00000000 --- a/changedetectionio/templates/settings.html +++ /dev/null @@ -1,310 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} -{% from '_helpers.html' import render_field, render_checkbox_field, render_button, render_time_schedule_form %} -{% from '_common_fields.html' import render_common_settings_form %} - - - - - - - -
- -
-
- -
-
-
- {{ render_field(form.requests.form.time_between_check, class="time-check-widget") }} - Default recheck time for all watches, current system minimum is {{min_system_recheck_seconds}} seconds (more info). -
- -
- {{ render_time_schedule_form(form.requests, available_timezones, timezone_default_config) }} -
-
-
-
- {{ render_field(form.requests.form.jitter_seconds, class="jitter_seconds") }} - Example - 3 seconds random jitter could trigger up to 3 seconds earlier or up to 3 seconds later -
-
- {{ render_field(form.application.form.filter_failure_notification_threshold_attempts, class="filter_failure_notification_threshold_attempts") }} - After this many consecutive times that the CSS/xPath filter is missing, send a notification -
- Set to 0 to disable -
-
-
- {% if not hide_remove_pass %} - {% if current_user.is_authenticated %} - {{ render_button(form.application.form.removepassword_button) }} - {% else %} - {{ render_field(form.application.form.password) }} - Password protection for your changedetection.io application. - {% endif %} - {% else %} - Password is locked. - {% endif %} -
- -
- {{ render_checkbox_field(form.application.form.shared_diff_access, class="shared_diff_access") }} - Allow access to view watch diff page when password is enabled (Good for sharing the diff page) - -
-
- {{ render_checkbox_field(form.application.form.rss_hide_muted_watches) }} -
-
- {{ render_field(form.application.form.pager_size) }} - Number of items per page in the watch overview list, 0 to disable. -
- -
- {{ render_checkbox_field(form.application.form.extract_title_as_title) }} - Note: This will automatically apply to all existing watches. -
-
- {{ render_checkbox_field(form.application.form.empty_pages_are_a_change) }} - When a request returns no content, or the HTML does not contain any text, is this considered a change? -
- {% if form.requests.proxy %} -
- {{ render_field(form.requests.form.proxy, class="fetch-backend-proxy") }} - - Choose a default proxy for all watches - -
- {% endif %} -
-
- -
-
-
- {{ render_common_settings_form(form.application.form, emailprefix, settings_application, extra_notification_token_placeholder_info) }} -
-
-
- {{ render_field(form.application.form.base_url, class="m-d") }} - - Base URL used for the {{ '{{ base_url }}' }} token in notification links.
- Default value is the system environment variable 'BASE_URL' - read more here. -
-
-
- -
-
- {{ render_field(form.application.form.fetch_backend, class="fetch-backend") }} - -

Use the Basic method (default) where your watched sites don't need Javascript to render.

-

The Chrome/Javascript method requires a network connection to a running WebDriver+Chrome server, set by the ENV var 'WEBDRIVER_URL'.

-
-
-
-
- If you're having trouble waiting for the page to be fully rendered (text missing etc), try increasing the 'wait' time here. -
- This will wait n seconds before extracting the text. -
-
- {{ render_field(form.application.form.webdriver_delay) }} -
-
-
- {{ render_field(form.requests.form.default_ua) }} - - Applied to all requests.

- Note: Simply changing the User-Agent often does not defeat anti-robot technologies, it's important to consider all of the ways that the browser is detected. -
-
- -
- -
- -
- {{ render_checkbox_field(form.application.form.ignore_whitespace) }} - Ignore whitespace, tabs and new-lines/line-feeds when considering if a change was detected.
- Note: Changing this will change the status of your existing watches, possibly trigger alerts etc. -
-
-
- {{ render_checkbox_field(form.application.form.render_anchor_tag_content) }} - Render anchor tag content, default disabled, when enabled renders links as (link text)[https://somesite.com] -
- Note: Changing this could affect the content of your existing watches, possibly trigger alerts etc. -
-
-
- {{ render_field(form.application.form.global_subtractive_selectors, rows=5, placeholder="header -footer -nav -.stockticker -//*[contains(text(), 'Advertisement')]") }} - -
    -
  • Remove HTML element(s) by CSS and XPath selectors before text conversion.
  • -
  • Don't paste HTML here, use only CSS and XPath selectors
  • -
  • Add multiple elements, CSS or XPath selectors per line to ignore multiple parts of the HTML.
  • -
-
-
-
- {{ render_field(form.application.form.global_ignore_text, rows=5, placeholder="Some text to ignore in a line -/some.regex\d{2}/ for case-INsensitive regex - ") }} - Note: This is applied globally in addition to the per-watch rules.
- -
    -
  • Matching text will be ignored in the text snapshot (you can still see it but it wont trigger a change)
  • -
  • Note: This is applied globally in addition to the per-watch rules.
  • -
  • Each line processed separately, any line matching will be ignored (removed before creating the checksum)
  • -
  • Regular Expression support, wrap the entire line in forward slash /regex/
  • -
  • Changing this will affect the comparison checksum which may trigger an alert
  • -
-
-
-
- -
-

API Access

-

Drive your changedetection.io via API, More about API access here

- -
- {{ render_checkbox_field(form.application.form.api_access_token_enabled) }} -
Restrict API access limit by using x-api-key header - required for the Chrome Extension to work

-

API Key {{api_key}} - -
-
- -
-

Chrome Extension

-

Easily add any web-page to your changedetection.io installation from within Chrome.

- Step 1 Install the extension, Step 2 Navigate to this page, - Step 3 Open the extension from the toolbar and click "Sync API Access" -

- - Chrome store icon - Chrome Webstore - -

-
-
-
-
- Ensure the settings below are correct, they are used to manage the time schedule for checking your web page watches. -
-
-

UTC Time & Date from Server: {{ utc_time }}

-

Local Time & Date in Browser:

-

- {{ render_field(form.application.form.timezone) }} - -

-
-
-
- - -

Tip: "Residential" and "Mobile" proxy type can be more successfull than "Data Center" for blocked websites. - -

- {{ render_field(form.requests.form.extra_proxies) }} - "Name" will be used for selecting the proxy in the Watch Edit settings
- SOCKS5 proxies with authentication are only supported with 'plain requests' fetcher, for other fetchers you should whitelist the IP access instead -
-
-

- Extra Browsers can be attached to further defeat CAPTCHA's on websites that are particularly hard to scrape.
- Simply paste the connection address into the box, More instructions and examples here -

- {{ render_field(form.requests.form.extra_browsers) }} -
-
-
-
- {{ render_button(form.save_button) }} - Back - Clear Snapshot History -
-
-
-
-
- -{% endblock %}