2021-01-29 09:49:05 +00:00
{% extends 'base.html' %}
{% block content %}
2025-04-12 17:26:17 +00:00
{% from '_helpers.html' import render_field, render_checkbox_field, render_button, render_time_schedule_form, playwright_warning, only_playwright_type_watches_warning, render_conditions_fieldlist_of_formfields_as_table %}
2024-05-02 09:46:31 +00:00
{% from '_common_fields.html' import render_common_settings_form %}
2023-04-30 08:38:50 +00:00
< script src = "{{url_for('static_content', group='js', filename='tabs.js')}}" defer > < / script >
2023-11-28 13:01:15 +00:00
< script src = "{{url_for('static_content', group='js', filename='vis.js')}}" defer > < / script >
2024-09-06 12:33:06 +00:00
< script src = "{{url_for('static_content', group='js', filename='global-settings.js')}}" defer > < / script >
2024-12-03 11:45:28 +00:00
< script src = "{{url_for('static_content', group='js', filename='scheduler.js')}}" defer > < / script >
2025-03-17 18:20:24 +00:00
< script src = "{{url_for('static_content', group='js', filename='conditions.js')}}" defer > < / script >
2022-04-05 16:04:26 +00:00
< script >
2023-10-21 07:41:51 +00:00
const browser_steps_available_screenshots=JSON.parse('{{ watch.get_browsersteps_available_screenshots|tojson }}');
2022-11-24 19:53:01 +00:00
const browser_steps_config=JSON.parse('{{ browser_steps_config|tojson }}');
2024-04-03 14:15:33 +00:00
<!-- Should be _external so that firefox and others load it more reliably -->
const browser_steps_fetch_screenshot_image_url="{{url_for('browser_steps.browser_steps_fetch_screenshot_image', uuid=uuid, _external=True)}}";
2023-10-21 07:41:51 +00:00
const browser_steps_last_error_step={{ watch.browser_steps_last_error_step|tojson }};
2023-05-12 08:36:33 +00:00
const browser_steps_start_url="{{url_for('browser_steps.browsersteps_start_session', uuid=uuid)}}";
2022-11-24 19:53:01 +00:00
const browser_steps_sync_url="{{url_for('browser_steps.browsersteps_ui_update', uuid=uuid)}}";
2023-07-10 14:08:45 +00:00
{% if emailprefix %}
const email_notification_prefix=JSON.parse('{{ emailprefix|tojson }}');
{% endif %}
2025-03-18 09:40:22 +00:00
const notification_base_url="{{url_for('ui.ui_notification.ajax_callback_send_notification_test', watch_uuid=uuid)}}";
2024-07-12 15:09:42 +00:00
const playwright_enabled={% if playwright_enabled %}true{% else %}false{% endif %};
2023-07-10 14:08:45 +00:00
const recheck_proxy_start_url="{{url_for('check_proxies.start_check', uuid=uuid)}}";
const proxy_recheck_status_url="{{url_for('check_proxies.get_recheck_status', uuid=uuid)}}";
const screenshot_url="{{url_for('static_content', group='screenshot', filename=uuid)}}";
const watch_visual_selector_data_url="{{url_for('static_content', group='visual_selector_data', filename=uuid)}}";
2023-11-28 13:01:15 +00:00
const default_system_fetch_backend="{{ settings_application['fetch_backend'] }}";
2022-04-05 16:04:26 +00:00
< / script >
2024-10-05 14:32:28 +00:00
< script src = "{{url_for('static_content', group='js', filename='plugins.js')}}" defer > < / script >
2023-04-30 08:38:50 +00:00
< script src = "{{url_for('static_content', group='js', filename='watch-settings.js')}}" defer > < / script >
< script src = "{{url_for('static_content', group='js', filename='notifications.js')}}" defer > < / script >
< script src = "{{url_for('static_content', group='js', filename='visual-selector.js')}}" defer > < / script >
2022-11-24 19:53:01 +00:00
{% if playwright_enabled %}
2023-04-30 08:38:50 +00:00
< script src = "{{url_for('static_content', group='js', filename='browser-steps.js')}}" defer > < / script >
2022-11-24 19:53:01 +00:00
{% endif %}
2021-08-12 10:05:59 +00:00
2024-04-16 16:48:51 +00:00
{% set has_tag_filters_extra="WARNING: Watch has tag/groups set with special filters\n" if has_special_tag_options else '' %}
2023-07-10 14:08:45 +00:00
< script src = "{{url_for('static_content', group='js', filename='recheck-proxy.js')}}" defer > < / script >
2021-06-21 06:21:05 +00:00
< div class = "edit-form monospaced-textarea" >
2021-08-12 10:05:59 +00:00
2022-04-02 12:49:32 +00:00
< div class = "tabs collapsable" >
2021-08-12 10:05:59 +00:00
< ul >
2025-02-19 09:44:54 +00:00
< li class = "tab" > < a href = "#general" > General< / a > < / li >
2021-12-29 22:18:29 +00:00
< li class = "tab" > < a href = "#request" > Request< / a > < / li >
2024-07-12 15:09:42 +00:00
{% if extra_tab_content %}
< li class = "tab" > < a href = "#extras_tab" > {{ extra_tab_content }}< / a > < / li >
{% endif %}
2022-11-24 19:53:01 +00:00
< li class = "tab" > < a id = "browsersteps-tab" href = "#browser-steps" > Browser Steps< / a > < / li >
2025-02-09 23:36:35 +00:00
<!-- should goto extra forms? -->
2023-03-18 19:36:26 +00:00
{% if watch['processor'] == 'text_json_diff' %}
2022-07-10 10:51:12 +00:00
< li class = "tab" > < a id = "visualselector-tab" href = "#visualselector" > Visual Filter Selector< / a > < / li >
2024-09-28 08:40:26 +00:00
< li class = "tab" id = "filters-and-triggers-tab" > < a href = "#filters-and-triggers" > Filters & Triggers< / a > < / li >
2025-03-17 18:20:24 +00:00
< li class = "tab" id = "conditions-tab" > < a href = "#conditions" > Conditions< / a > < / li >
2023-03-18 19:36:26 +00:00
{% endif %}
2021-08-12 10:05:59 +00:00
< li class = "tab" > < a href = "#notifications" > Notifications< / a > < / li >
2023-10-20 09:49:12 +00:00
< li class = "tab" > < a href = "#stats" > Stats< / a > < / li >
2021-08-12 10:05:59 +00:00
< / ul >
< / div >
< div class = "box-wrap inner" >
< form class = "pure-form pure-form-stacked"
2025-03-18 09:40:22 +00:00
action="{{ url_for('ui.ui_edit.edit_page', uuid=uuid, next = request.args.get('next'), unpause_on_save = request.args.get('unpause_on_save'), tag = request.args.get('tag')) }}" method="POST">
2023-04-29 20:29:57 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2021-08-12 10:05:59 +00:00
< div class = "tab-pane-inner" id = "general" >
< fieldset >
< div class = "pure-control-group" >
{{ render_field(form.url, placeholder="https://...", required=true, class="m-d") }}
2024-10-28 14:46:05 +00:00
< div class = "pure-form-message" > Some sites use JavaScript to create the content, for this you should < a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Fetching-pages-with-WebDriver" > use the Chrome/WebDriver Fetcher< / a > < / div >
< div class = "pure-form-message" > Variables are supported in the URL (< a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Handling-variables-in-the-watched-URL" > help and examples here< / a > ).< / div >
2024-07-12 15:09:42 +00:00
< / div >
< div class = "pure-control-group inline-radio" >
{{ render_field(form.processor) }}
2021-08-12 10:05:59 +00:00
< / div >
< div class = "pure-control-group" >
{{ render_field(form.title, class="m-d") }}
< / div >
< div class = "pure-control-group" >
2023-06-19 21:29:13 +00:00
{{ render_field(form.tags) }}
2021-08-15 20:16:18 +00:00
< span class = "pure-form-message-inline" > Organisational tag/group name used in the main listing page< / span >
2021-08-12 10:05:59 +00:00
< / div >
2024-05-14 11:51:03 +00:00
< div class = "pure-control-group time-between-check border-fieldset" >
2024-12-03 11:45:28 +00:00
2024-05-14 11:51:03 +00:00
{{ render_checkbox_field(form.time_between_check_use_default, class="use-default-timecheck") }}
2024-12-03 11:45:28 +00:00
< br >
< div id = "time-check-widget-wrapper" >
{{ render_field(form.time_between_check, class="time-check-widget") }}
< span class = "pure-form-message-inline" >
The interval/amount of time between each check.
< / span >
< / div >
< div id = "time-between-check-schedule" >
<!-- Start Time and End Time -->
< div id = "limit-between-time" >
{{ render_time_schedule_form(form, available_timezones, timezone_default_config) }}
< / div >
< / div >
< br >
< / div >
2021-12-29 22:31:53 +00:00
< div class = "pure-control-group" >
2022-04-09 10:15:34 +00:00
{{ render_checkbox_field(form.extract_title_as_title) }}
2021-12-29 22:31:53 +00:00
< / div >
2022-07-23 15:15:27 +00:00
< div class = "pure-control-group" >
{{ render_checkbox_field(form.filter_failure_notification_send) }}
< span class = "pure-form-message-inline" >
Sends a notification when the filter can no longer be seen on the page, good for knowing when the page changed and your filter will not work anymore.
< / span >
< / div >
2021-12-29 22:31:53 +00:00
< / fieldset >
< / div >
< div class = "tab-pane-inner" id = "request" >
2022-05-08 18:35:36 +00:00
< div class = "pure-control-group inline-radio" >
2022-04-24 12:40:53 +00:00
{{ render_field(form.fetch_backend, class="fetch-backend") }}
2021-08-12 10:51:43 +00:00
< span class = "pure-form-message-inline" >
2021-12-29 22:37:04 +00:00
< p > Use the < strong > Basic< / strong > method (default) where your watched site doesn't need Javascript to render.< / p >
2021-10-06 07:27:41 +00:00
< p > The < strong > Chrome/Javascript< / strong > method requires a network connection to a running WebDriver+Chrome server, set by the ENV var 'WEBDRIVER_URL'. < / p >
2023-10-14 21:27:41 +00:00
Tip: < a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Proxy-configuration#brightdata-proxy-support" > Connect using Bright Data and Oxylabs Proxies, find out more here.< / a >
2021-08-12 10:51:43 +00:00
< / span >
< / div >
2022-05-08 18:35:36 +00:00
{% if form.proxy %}
< div class = "pure-control-group inline-radio" >
2023-07-10 14:08:45 +00:00
< div > {{ form.proxy.label }} < a href = "" id = "check-all-proxies" class = "pure-button button-secondary button-xsmall" > Check/Scan all< / a > < / div >
< div > {{ form.proxy(class="fetch-backend-proxy") }}< / div >
2022-05-08 18:35:36 +00:00
< span class = "pure-form-message-inline" >
Choose a proxy for this watch
< / span >
< / div >
{% endif %}
2023-11-28 13:01:15 +00:00
2023-11-28 16:31:08 +00:00
<!-- webdriver always -->
2023-11-30 18:20:30 +00:00
< fieldset data-visible-for = "fetch_backend=html_webdriver" style = "display: none;" >
2022-05-17 16:35:33 +00:00
< div class = "pure-control-group" >
{{ render_field(form.webdriver_delay) }}
2022-06-25 21:42:48 +00:00
< div class = "pure-form-message-inline" >
< strong > If you're having trouble waiting for the page to be fully rendered (text missing etc), try increasing the 'wait' time here.< / strong >
2023-03-12 16:05:34 +00:00
< br >
2022-06-25 21:42:48 +00:00
This will wait < i > n< / i > seconds before extracting the text.
2022-07-10 11:56:01 +00:00
{% if using_global_webdriver_wait %}
2023-03-12 16:05:34 +00:00
< br > < strong > Using the current global default settings< / strong >
2022-07-10 11:56:01 +00:00
{% endif %}
2022-06-25 21:42:48 +00:00
< / div >
2022-05-17 16:35:33 +00:00
< / div >
2022-07-10 11:56:01 +00:00
< div class = "pure-control-group" >
2023-11-28 16:31:08 +00:00
< a class = "pure-button button-secondary button-xsmall show-advanced" > Show advanced options< / a >
< / div >
< div class = "advanced-options" style = "display: none;" >
2022-07-10 11:56:01 +00:00
{{ render_field(form.webdriver_js_execute_code) }}
< div class = "pure-form-message-inline" >
2023-11-28 16:31:08 +00:00
Run this code before performing change detection, handy for filling in fields and other
actions < a
href="https://github.com/dgtlmoon/changedetection.io/wiki/Run-JavaScript-before-change-detection">More
help and examples here< / a >
2022-07-10 11:56:01 +00:00
< / div >
2022-05-17 16:35:33 +00:00
< / div >
< / fieldset >
2023-11-28 16:31:08 +00:00
<!-- html requests always -->
2023-11-30 18:20:30 +00:00
< fieldset data-visible-for = "fetch_backend=html_requests" >
2023-11-28 16:31:08 +00:00
< div class = "pure-control-group" >
< a class = "pure-button button-secondary button-xsmall show-advanced" > Show advanced options< / a >
< / div >
< div class = "advanced-options" style = "display: none;" >
2023-11-30 18:20:30 +00:00
< div class = "pure-control-group" id = "request-method" >
2023-11-28 16:31:08 +00:00
{{ render_field(form.method) }}
< / div >
2023-11-30 18:20:30 +00:00
< div id = "request-body" >
2024-10-28 14:46:05 +00:00
{{ render_field(form.body, rows=7, placeholder="Example
2023-11-28 16:31:08 +00:00
{
\"name\":\"John\",
\"age\":30,
2024-10-28 14:46:05 +00:00
\"car\":null,
\"year\":{% now 'Europe/Berlin', '%Y' %}
2023-11-28 16:31:08 +00:00
}") }}
2022-06-25 21:42:48 +00:00
< / div >
2024-10-28 14:46:05 +00:00
< div class = "pure-form-message" > Variables are supported in the request body (< a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Handling-variables-in-the-watched-URL" > help and examples here< / a > ).< / div >
2022-03-06 16:23:21 +00:00
< / div >
2023-11-28 16:31:08 +00:00
< / fieldset >
<!-- hmm -->
< div class = "pure-control-group advanced-options" style = "display: none;" >
2024-10-28 14:46:05 +00:00
{{ render_field(form.headers, rows=7, placeholder="Example
2021-12-29 22:18:29 +00:00
Cookie: foobar
2024-10-28 14:46:05 +00:00
User-Agent: wonderbra 1.0
Math: {{ 1 + 1 }}") }}
< div class = "pure-form-message" > Variables are supported in the request header values (< a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Handling-variables-in-the-watched-URL" > help and examples here< / a > ).< / div >
2023-05-22 15:19:52 +00:00
< div class = "pure-form-message-inline" >
{% if has_extra_headers_file %}
< strong > Alert! Extra headers file found and will be added to this watch!< / strong >
{% else %}
Headers can be also read from a file in your data-directory < a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Adding-headers-from-an-external-file" > Read more here< / a >
{% endif %}
2023-05-29 15:44:38 +00:00
< br >
(Not supported by Selenium browser)
2023-05-22 15:19:52 +00:00
< / div >
2022-03-06 16:23:21 +00:00
< / div >
2023-11-30 18:20:30 +00:00
< fieldset data-visible-for = "fetch_backend=html_requests fetch_backend=html_webdriver" >
< div class = "pure-control-group inline-radio advanced-options" style = "display: none;" >
2023-11-28 13:01:15 +00:00
{{ render_checkbox_field(form.ignore_status_codes) }}
2023-11-28 16:31:08 +00:00
< / div >
< / fieldset >
2021-12-29 22:18:29 +00:00
< / div >
2025-02-09 23:36:35 +00:00
2022-11-24 19:53:01 +00:00
< div class = "tab-pane-inner" id = "browser-steps" >
2025-04-12 17:26:17 +00:00
{% if watch_needs_selenium_or_playwright %}
{# Only works with playwright #}
{% if system_has_playwright_configured %}
2023-04-30 08:38:50 +00:00
< img class = "beta-logo" src = "{{url_for('static_content', group='images', filename='beta-logo.png')}}" alt = "New beta functionality" >
2022-11-24 19:53:01 +00:00
< fieldset >
< div class = "pure-control-group" >
<!--
Too hard right now, better to just send the events to the fetcher for now and leave it in the final screenshot
and/or report an error
< a id = "play-steps" class = "pure-button button-secondary button-xsmall" style = "font-size: 70%" > Play steps ▶< / a >
-->
<!-- - Do this later -->
< div class = "checkbox" style = "display: none;" >
< input type = checkbox id = "include_text_elements" > < label for = "include_text_elements" > Turn on text finder< / label >
< / div >
2022-11-27 10:41:41 +00:00
< div id = "loading-status-text" style = "display: none;" > Please wait, first browser step can take a little time to load..< div class = "spinner" > < / div > < / div >
2022-11-24 19:53:01 +00:00
< div class = "flex-wrapper" >
2024-09-18 09:26:10 +00:00
< div id = "browser-steps-ui" class = "noselect" >
2022-11-24 19:53:01 +00:00
< div class = "noselect" id = "browsersteps-selector-wrapper" style = "width: 100%" >
2022-11-30 18:40:15 +00:00
< span class = "loader" >
< span id = "browsersteps-click-start" >
< h2 > Click here to Start< / h2 >
2025-02-19 09:44:54 +00:00
< svg style = "height: 3.5rem;" version = "1.1" viewBox = "0 0 32 32" xml:space = "preserve" xmlns = "http://www.w3.org/2000/svg" xmlns:xlink = "http://www.w3.org/1999/xlink" > < g id = "start" / > < g id = "play_x5F_alt" > < path d = "M16,0C7.164,0,0,7.164,0,16s7.164,16,16,16s16-7.164,16-16S24.836,0,16,0z M10,24V8l16.008,8L10,24z" style = "fill: var(--color-grey-400);" / > < / g > < / svg > < br >
2023-05-11 14:34:50 +00:00
Please allow 10-15 seconds for the browser to connect.< br >
2022-11-30 18:40:15 +00:00
< / span >
< div class = "spinner" style = "display: none;" > < / div >
2022-11-24 19:53:01 +00:00
< / span >
2023-04-30 08:38:50 +00:00
< img class = "noselect" id = "browsersteps-img" src = "" style = "max-width: 100%; width: 100%;" >
2022-11-24 19:53:01 +00:00
< canvas class = "noselect" id = "browsersteps-selector-canvas" style = "max-width: 100%; width: 100%;" > < / canvas >
< / div >
< / div >
2024-09-18 09:26:10 +00:00
< div id = "browser-steps-fieldlist" >
2025-02-18 10:02:05 +00:00
< span id = "browser-seconds-remaining" > Loading< / span > < span style = "font-size: 80%;" > (< a target = "newwindow" href = "https://github.com/dgtlmoon/changedetection.io/pull/478/files#diff-1a79d924d1840c485238e66772391268a89c95b781d69091384cf1ea1ac146c9R4" > ?< / a > ) < / span >
2022-11-24 19:53:01 +00:00
{{ render_field(form.browser_steps) }}
< / div >
< / div >
< / div >
< / fieldset >
2025-02-09 23:36:35 +00:00
{% else %}
2025-04-12 17:26:17 +00:00
{# it's configured to use selenium or chrome but system says its not configured #}
{{ playwright_warning() }}
{% if system_has_webdriver_configured %}
< strong > Selenium/Webdriver cant be used here because it wont fetch screenshots reliably.< / strong >
{% endif %}
2025-02-09 23:36:35 +00:00
{% endif %}
2025-04-12 17:26:17 +00:00
{% else %}
{# "This functionality needs chrome.." #}
{{ only_playwright_type_watches_warning() }}
{% endif %}
2022-11-24 19:53:01 +00:00
< / div >
2025-02-09 23:36:35 +00:00
2021-12-29 22:18:29 +00:00
2021-09-17 16:37:26 +00:00
< div class = "tab-pane-inner" id = "notifications" >
2021-10-05 16:15:36 +00:00
< fieldset >
2022-08-31 13:49:13 +00:00
< div class = "pure-control-group inline-radio" >
2022-09-08 07:10:04 +00:00
{{ render_checkbox_field(form.notification_muted) }}
2022-08-31 13:49:13 +00:00
< / div >
2025-04-16 16:40:30 +00:00
{% if watch_needs_selenium_or_playwright %}
2022-11-20 15:04:26 +00:00
< div class = "pure-control-group inline-radio" >
2022-11-20 08:37:48 +00:00
{{ render_checkbox_field(form.notification_screenshot) }}
2022-11-20 13:40:41 +00:00
< span class = "pure-form-message-inline" >
< strong > Use with caution!< / strong > This will easily fill up your email storage quota or flood other storages.
< / span >
2022-11-20 08:37:48 +00:00
< / div >
2022-11-20 13:40:41 +00:00
{% endif %}
2022-08-31 13:49:13 +00:00
< div class = "field-group" id = "notification-field-group" >
2022-09-08 07:10:04 +00:00
{% if has_default_notification_urls %}
< div class = "inline-warning" >
2023-04-29 20:29:57 +00:00
< img class = "inline-warning-icon" src = "{{url_for('static_content', group='images', filename='notice.svg')}}" alt = "Look out!" title = "Lookout!" >
2025-03-18 09:40:22 +00:00
There are < a href = "{{ url_for('settings.settings_page')}}#notifications" > system-wide notification URLs enabled< / a > , this form will override notification settings for this watch only ‐ an empty Notification URL list here will still send notifications.
2022-09-08 07:10:04 +00:00
< / div >
{% endif %}
2022-09-10 13:19:18 +00:00
< a href = "#notifications" id = "notification-setting-reset-to-default" class = "pure-button button-xsmall" style = "right: 20px; top: 20px; position: absolute; background-color: #5f42dd; border-radius: 4px; font-size: 70%; color: #fff" > Use system defaults< / a >
2024-07-17 18:27:47 +00:00
{{ render_common_settings_form(form, emailprefix, settings_application, extra_notification_token_placeholder_info) }}
2021-10-05 16:15:36 +00:00
< / div >
< / fieldset >
2021-05-27 13:55:05 +00:00
< / div >
2021-09-17 16:37:26 +00:00
2023-03-18 19:36:26 +00:00
{% if watch['processor'] == 'text_json_diff' %}
2025-03-17 18:20:24 +00:00
< div class = "tab-pane-inner" id = "conditions" >
< script >
const verify_condition_rule_url="{{url_for('conditions.verify_condition_single_rule', watch_uuid=uuid)}}";
< / script >
< div class = "pure-control-group" >
{{ render_field(form.conditions_match_logic) }}
2025-04-02 16:06:39 +00:00
{{ render_conditions_fieldlist_of_formfields_as_table(form.conditions) }}
2025-03-17 18:20:24 +00:00
< div class = "pure-form-message-inline" >
2025-03-27 09:29:11 +00:00
< p id = "verify-state-text" > Use the verify (✓) button to test if a condition passes against the current snapshot.< / p >
2025-03-31 16:49:33 +00:00
Read a quick tutorial about < a href = "https://changedetection.io/tutorial/conditional-actions-web-page-changes" > using conditional web page changes here< / a > .< br >
2025-03-17 18:20:24 +00:00
< / div >
< / div >
< / div >
2021-12-29 22:37:04 +00:00
< div class = "tab-pane-inner" id = "filters-and-triggers" >
2024-09-28 08:40:26 +00:00
< span id = "activate-text-preview" class = "pure-button pure-button-primary button-xsmall" > Activate preview< / span >
< div >
< div id = "edit-text-filter" >
< div class = "pure-control-group" id = "pro-tips" >
2023-03-12 16:05:34 +00:00
< strong > Pro-tips:< / strong > < br >
2022-02-23 09:49:25 +00:00
< ul >
< li >
Use the preview page to see your filters and triggers highlighted.
< / li >
< li >
Some sites use JavaScript to create the content, for this you should < a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Fetching-pages-with-WebDriver" > use the Chrome/WebDriver Fetcher< / a >
< / li >
< / ul >
< / div >
2024-09-06 12:33:06 +00:00
2025-04-04 09:16:12 +00:00
{% include "edit/include_subtract.html" %}
2024-05-14 11:51:03 +00:00
< div class = "text-filtering border-fieldset" >
2023-03-20 19:16:57 +00:00
< fieldset class = "pure-group" id = "text-filtering-type-options" >
< h3 > Text filtering< / h3 >
Limit trigger/ignore/block/extract to;< br >
{{ render_checkbox_field(form.filter_text_added) }}
{{ render_checkbox_field(form.filter_text_replaced) }}
{{ render_checkbox_field(form.filter_text_removed) }}
2024-10-10 12:59:39 +00:00
< span class = "pure-form-message-inline" > Note: Depending on the length and similarity of the text on each line, the algorithm may consider an < strong > addition< / strong > instead of < strong > replacement< / strong > for example.< / span > < br >
< span class = "pure-form-message-inline" > So it's always better to select < strong > Added< / strong > +< strong > Replaced< / strong > when you're interested in new content.< / span > < br >
< span class = "pure-form-message-inline" > When content is merely moved in a list, it will also trigger an < strong > addition< / strong > , consider enabling < code > < strong > Only trigger when unique lines appear< / strong > < / code > < / span >
2023-03-20 19:16:57 +00:00
< / fieldset >
2024-09-18 13:45:44 +00:00
< fieldset class = "pure-control-group" >
{{ render_checkbox_field(form.check_unique_lines) }}
< span class = "pure-form-message-inline" > Good for websites that just move the content around, and you want to know when NEW content is added, compares new lines against all history for this watch.< / span >
< / fieldset >
< fieldset class = "pure-control-group" >
{{ render_checkbox_field(form.remove_duplicate_lines) }}
< span class = "pure-form-message-inline" > Remove duplicate lines of text< / span >
< / fieldset >
2024-02-02 10:36:58 +00:00
< fieldset class = "pure-control-group" >
{{ render_checkbox_field(form.sort_text_alphabetically) }}
< span class = "pure-form-message-inline" > Helps reduce changes detected caused by sites shuffling lines around, combine with < i > check unique lines< / i > below.< / span >
< / fieldset >
2024-09-18 13:45:44 +00:00
< fieldset class = "pure-control-group" >
{{ render_checkbox_field(form.trim_text_whitespace) }}
< span class = "pure-form-message-inline" > Remove any whitespace before and after each line of text< / span >
< / fieldset >
2025-04-04 09:16:12 +00:00
{% include "edit/text-options.html" %}
2023-03-20 19:16:57 +00:00
< / div >
2025-04-04 09:16:12 +00:00
< / div >
2024-09-28 08:40:26 +00:00
< div id = "text-preview" style = "display: none;" >
< script >
2025-03-18 09:40:22 +00:00
const preview_text_edit_filters_url="{{url_for('ui.ui_edit.watch_get_preview_rendered', uuid=uuid)}}";
2024-09-28 08:40:26 +00:00
< / script >
2024-10-05 14:32:28 +00:00
< br >
2024-09-28 08:40:26 +00:00
{#< div id = "text-preview-controls" > < span id = "text-preview-refresh" class = "pure-button button-xsmall" > Refresh< / span > < / div > #}
2024-10-05 14:32:28 +00:00
< div class = "minitabs-wrapper" >
2024-10-08 06:59:10 +00:00
< div class = "minitabs-content" >
< div id = "text-preview-inner" class = "monospace-preview" >
< p > Loading...< / p >
< / div >
< div id = "text-preview-before-inner" style = "display: none;" class = "monospace-preview" >
< p > Loading...< / p >
< / div >
< / div >
2024-10-05 14:32:28 +00:00
< / div >
2024-09-28 08:40:26 +00:00
< / div >
< / div >
< / div >
2024-10-05 14:32:28 +00:00
2024-09-28 08:40:26 +00:00
{% endif %}
2024-07-12 15:09:42 +00:00
{# rendered sub Template #}
{% if extra_form_content %}
< div class = "tab-pane-inner" id = "extras_tab" >
{{ extra_form_content|safe }}
2023-03-18 19:36:26 +00:00
< / div >
2024-07-12 15:09:42 +00:00
{% endif %}
2023-03-18 19:36:26 +00:00
{% if watch['processor'] == 'text_json_diff' %}
2022-05-23 21:44:51 +00:00
< div class = "tab-pane-inner visual-selector-ui" id = "visualselector" >
2023-04-30 08:38:50 +00:00
< img class = "beta-logo" src = "{{url_for('static_content', group='images', filename='beta-logo.png')}}" alt = "New beta functionality" >
2022-11-24 19:53:01 +00:00
2022-05-23 21:44:51 +00:00
< fieldset >
< div class = "pure-control-group" >
2025-04-12 17:26:17 +00:00
{% if watch_needs_selenium_or_playwright %}
{% if system_has_playwright_configured %}
2024-07-05 18:43:26 +00:00
< span class = "pure-form-message-inline" id = "visual-selector-heading" >
The Visual Selector tool lets you select the < i > text< / i > elements that will be used for the change detection. It automatically fills-in the filters in the "CSS/JSONPath/JQ/XPath Filters" box of the < a href = "#filters-and-triggers" > Filters & Triggers< / a > tab. Use < strong > Shift+Click< / strong > to select multiple items.
2022-05-23 21:44:51 +00:00
< / span >
2022-11-24 19:53:01 +00:00
< div id = "selector-header" >
< a id = "clear-selector" class = "pure-button button-secondary button-xsmall" style = "font-size: 70%" > Clear selection< / a >
2025-04-18 08:31:43 +00:00
<!-- visual selector IMG will try to load, it will either replace this or on error replace it with some handy text -->
2022-11-24 19:53:01 +00:00
< i class = "fetching-update-notice" style = "font-size: 80%;" > One moment, fetching screenshot and element information..< / i >
< / div >
< div id = "selector-wrapper" style = "display: none" >
<!-- request the screenshot and get the element offset info ready -->
<!-- use img src ready load to know everything is ready to map out -->
<!-- @todo: maybe something interesting like a field to select 'elements that contain text... and their parents n' -->
2023-04-29 20:29:57 +00:00
< img id = "selector-background" >
2022-11-24 19:53:01 +00:00
< canvas id = "selector-canvas" > < / canvas >
< / div >
< div id = "selector-current-xpath" style = "overflow-x: hidden" > < strong > Currently:< / strong > < span class = "text" > Loading...< / span > < / div >
2025-04-12 17:26:17 +00:00
{% else %}
{# The watch needed chrome but system says that playwright is not ready #}
{{ playwright_warning() }}
2022-05-23 21:44:51 +00:00
{% endif %}
2025-04-12 17:26:17 +00:00
{% if system_has_webdriver_configured %}
< strong > Selenium/Webdriver cant be used here because it wont fetch screenshots reliably.< / strong >
{% endif %}
{% else %}
{# "This functionality needs chrome.." #}
{{ only_playwright_type_watches_warning() }}
{% endif %}
2022-05-23 21:44:51 +00:00
< / div >
< / fieldset >
< / div >
2023-03-18 19:36:26 +00:00
{% endif %}
2023-10-20 09:49:12 +00:00
< div class = "tab-pane-inner" id = "stats" >
< div class = "pure-control-group" >
< style >
#stats-table tr > td:first-child {
font-weight: bold;
}
< / style >
< table class = "pure-table" id = "stats-table" >
< tbody >
< tr >
< td > Check count< / td >
2023-10-29 18:13:15 +00:00
< td > {{ "{:,}".format( watch.check_count) }}< / td >
2023-10-20 09:49:12 +00:00
< / tr >
< tr >
< td > Consecutive filter failures< / td >
2023-10-29 18:13:15 +00:00
< td > {{ "{:,}".format( watch.consecutive_filter_failures) }}< / td >
2023-10-20 09:49:12 +00:00
< / tr >
< tr >
< td > History length< / td >
2023-10-29 18:13:15 +00:00
< td > {{ "{:,}".format(watch.history|length) }}< / td >
2023-10-20 09:49:12 +00:00
< / tr >
< tr >
2024-05-07 13:23:42 +00:00
< td > Last fetch duration< / td >
2023-10-20 09:49:12 +00:00
< td > {{ watch.fetch_time }}s< / td >
< / tr >
2024-02-02 08:12:44 +00:00
< tr >
< td > Notification alert count< / td >
< td > {{ watch.notification_alert_count }}< / td >
< / tr >
2024-05-07 13:23:42 +00:00
< tr >
< td > Server type reply< / td >
< td > {{ watch.get('remote_server_reply') }}< / td >
< / tr >
2023-10-20 09:49:12 +00:00
< / tbody >
< / table >
2024-07-21 16:17:34 +00:00
{% if watch.history_n %}
< p >
2025-03-18 09:40:22 +00:00
< a href = "{{url_for('ui.ui_edit.watch_get_latest_html', uuid=uuid)}}" class = "pure-button button-small" > Download latest HTML snapshot< / a >
2024-07-21 16:17:34 +00:00
< / p >
{% endif %}
2023-10-20 09:49:12 +00:00
< / div >
< / div >
2021-08-12 10:05:59 +00:00
< div id = "actions" >
< div class = "pure-control-group" >
2022-08-01 12:47:00 +00:00
{{ render_button(form.save_button) }}
2025-03-18 09:40:22 +00:00
< a href = "{{url_for('ui.form_delete', uuid=uuid)}}"
2021-08-12 10:05:59 +00:00
class="pure-button button-small button-error ">Delete< / a >
2025-03-27 10:24:42 +00:00
{% if watch.history_n %}< a href = "{{url_for('ui.clear_watch_history', uuid=uuid)}}"
class="pure-button button-small button-error ">Clear History< / a > {% endif %}
2025-03-18 09:40:22 +00:00
< a href = "{{url_for('ui.form_clone', uuid=uuid)}}"
2025-03-27 10:24:42 +00:00
class="pure-button button-small ">Clone & Edit< / a >
2021-08-12 10:05:59 +00:00
< / div >
2021-05-08 01:29:41 +00:00
< / div >
2021-08-12 10:05:59 +00:00
< / form >
< / div >
2021-01-29 09:49:05 +00:00
< / div >
{% endblock %}