2021-01-29 09:49:05 +00:00
{% extends 'base.html' %}
{% block content %}
2021-06-21 06:21:05 +00:00
{% from '_helpers.jinja' import render_field %}
2022-02-23 09:49:25 +00:00
{% from '_helpers.jinja' import render_button %}
2021-12-04 14:23:23 +00:00
{% from '_common_fields.jinja' import render_common_settings_form %}
2021-08-12 10:05:59 +00:00
< script type = "text/javascript" src = "{{url_for('static_content', group='js', filename='tabs.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
< div class = "tabs" >
< ul >
< li class = "tab" id = "default-tab" > < a href = "#general" > General< / a > < / li >
2021-12-29 22:18:29 +00:00
< li class = "tab" > < a href = "#request" > Request< / a > < / li >
2021-12-29 22:37:04 +00:00
< li class = "tab" > < a href = "#filters-and-triggers" > Filters & Triggers< / a > < / li >
2021-08-12 10:05:59 +00:00
< li class = "tab" > < a href = "#notifications" > Notifications< / a > < / li >
< / ul >
< / div >
< div class = "box-wrap inner" >
< form class = "pure-form pure-form-stacked"
action="{{ url_for('edit_page', uuid=uuid, next = request.args.get('next') ) }}" method="POST">
< div class = "tab-pane-inner" id = "general" >
< fieldset >
< div class = "pure-control-group" >
{{ render_field(form.url, placeholder="https://...", required=true, class="m-d") }}
2022-01-12 17:18:40 +00:00
< span class = "pure-form-message-inline" > 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 > < / span >
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" >
{{ render_field(form.tag) }}
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 >
< div class = "pure-control-group" >
{{ render_field(form.minutes_between_check) }}
{% if using_default_minutes %}
< 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 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 >
2021-12-29 22:31:53 +00:00
< div class = "pure-control-group" >
{{ render_field(form.extract_title_as_title) }}
< / div >
< / fieldset >
< / div >
< div class = "tab-pane-inner" id = "request" >
2021-08-12 10:51:43 +00:00
< div class = "pure-control-group" >
{{ render_field(form.fetch_backend) }}
< 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 >
2021-08-12 10:51:43 +00:00
< / span >
< / div >
2021-08-12 10:05:59 +00:00
2021-12-29 22:18:29 +00:00
< fieldset class = "pure-group" >
2021-12-29 22:37:04 +00:00
< div class = "pure-control-group" >
{{ render_field(form.method) }}
< / div >
< strong > Note: < i > Request Headers and Body settings are ONLY used by Basic fast Plaintext/HTTP Client fetch method.< / i > < / strong >
2021-12-29 22:18:29 +00:00
{{ render_field(form.headers, rows=5, placeholder="Example
Cookie: foobar
User-Agent: wonderbra 1.0") }}
< / fieldset >
< div class = "pure-control-group" >
{{ render_field(form.body, rows=5, placeholder="Example
{
\"name\":\"John\",
\"age\":30,
\"car\":null
}") }}
< / div >
2021-12-29 22:37:04 +00:00
2021-12-29 22:18:29 +00:00
< / div >
2021-09-17 16:37:26 +00:00
< div class = "tab-pane-inner" id = "notifications" >
2022-01-10 16:38:04 +00:00
< strong > Note: < i > These settings override the global settings for this watch.< / i > < / strong >
2021-10-05 16:15:36 +00:00
< fieldset >
< div class = "field-group" >
2021-12-04 14:23:23 +00:00
{{ render_common_settings_form(form, current_base_url) }}
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
2021-12-29 22:37:04 +00:00
< div class = "tab-pane-inner" id = "filters-and-triggers" >
2021-08-12 10:05:59 +00:00
< fieldset >
2022-02-23 09:49:25 +00:00
< div class = "pure-control-group" >
< strong > Pro-tips:< / strong > < br / >
< 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 >
2021-08-12 10:05:59 +00:00
< div class = "pure-control-group" >
{{ render_field(form.css_filter, placeholder=".class-name or #some-id, or other CSS selector rule.",
class="m-d") }}
< span class = "pure-form-message-inline" >
2021-07-11 12:07:39 +00:00
< ul >
< li > CSS - Limit text to this CSS rule, only text matching this CSS rule is included.< / li >
2021-08-12 10:05:59 +00:00
< li > JSON - Limit text to this JSON rule, using < a href = "https://pypi.org/project/jsonpath-ng/" > JSONPath< / a > , prefix with < b > "json:"< / b > , < a
href="https://jsonpath.com/" target="new">test your JSONPath here< / a > < / li >
2022-01-05 16:58:07 +00:00
< li > XPATH - Limit text to this XPath rule, simply start with a forward-slash, example < b > //*[contains(@class, 'sametext')]< / b > , < a
href="http://xpather.com/" target="new">test your XPath here< / a > < / li >
2021-07-11 12:07:39 +00:00
< / ul >
2022-01-05 16:58:07 +00:00
Please be sure that you thoroughly understand how to write CSS or JSONPath, XPath selector rules before filing an issue on GitHub! < a
2021-08-12 10:05:59 +00:00
href="https://github.com/dgtlmoon/changedetection.io/wiki/CSS-Selector-help">here for more CSS selector help< / a > .< br / >
2021-06-15 04:13:01 +00:00
< / span >
2021-08-12 10:05:59 +00:00
< / div >
< / fieldset >
< fieldset class = "pure-group" >
{{ render_field(form.ignore_text, rows=5, placeholder="Some text to ignore in a line
/some.regex\d{2}/ for case-INsensitive regex
") }}
< span class = "pure-form-message-inline" >
2022-01-05 19:42:45 +00:00
< ul >
< li > Each line processed separately, any line matching will be ignored (removed before creating the checksum)< / li >
< li > Regular Expression support, wrap the line in forward slash < b > /regex/< / b > < / li >
< li > Changing this will affect the comparison checksum which may trigger an alert< / li >
2022-02-23 09:49:25 +00:00
< li > Use the preview/show current tab to see ignores< / li >
2022-01-05 19:42:45 +00:00
< / ul >
2021-06-21 07:17:22 +00:00
< / span >
2021-02-26 19:07:26 +00:00
< / fieldset >
2021-08-16 11:13:17 +00:00
< fieldset >
< div class = "pure-control-group" >
{{ render_field(form.trigger_text, rows=5, placeholder="Some text to wait for in a line
/some.regex\d{2}/ for case-INsensitive regex
2022-01-09 13:36:07 +00:00
") }}
< span class = "pure-form-message-inline" >
< ul >
< li > Text to wait for before triggering a change/notification, all text and regex are tested < i > case-insensitive< / i > .< / li >
< li > Trigger text is processed from the result-text that comes out of any CSS/JSON Filters for this watch< / li >
< li > Each line is process separately (think of each line as "OR")< / li >
< li > Note: Wrap in forward slash / to use regex example: < span style = "font-family: monospace; background: #eee" > /foo\d/< / span > < / li >
< / ul >
< / span >
2021-08-16 11:13:17 +00:00
< / div >
< / fieldset >
2021-06-21 06:21:05 +00:00
< / div >
2021-12-29 22:37:04 +00:00
2021-08-12 10:05:59 +00:00
< div id = "actions" >
< div class = "pure-control-group" >
2021-02-26 19:07:26 +00:00
2022-02-23 09:49:25 +00:00
{{ render_button(form.save_button) }} {{ render_button(form.save_and_preview_button) }}
2021-08-12 10:05:59 +00:00
< a href = "{{url_for('api_delete', uuid=uuid)}}"
class="pure-button button-small button-error ">Delete< / a >
2021-08-26 20:10:17 +00:00
< a href = "{{url_for('api_clone', uuid=uuid)}}"
class="pure-button button-small ">Create Copy< / 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 %}