{%- extends 'base.html' -%} {%- block content -%} {%- from '_helpers.html' import render_simple_field, render_field, render_nolabel_field, sort_by_title -%}
Add a new web page change detection watch
{{ render_nolabel_field(form.url, placeholder="https://...", required=true) }} {{ render_nolabel_field(form.watch_submit_button, title="Watch this URL!" ) }} {{ render_nolabel_field(form.edit_and_watch_submit_button, title="Edit first then Watch") }}
{{ render_field(form.tags, value=active_tag.title if active_tag_uuid else '', placeholder="Watch group / tag", class="transparent-field") }}
{{ render_simple_field(form.processor) }}
Create a shareable link Tip: You can also add 'shared' watches. More info
{%- if watches|length >= pagination.per_page -%} {{ pagination.info }} {%- endif -%} {%- if search_q -%}
Searching "{{search_q}}"
{%- endif -%}
All {%- for uuid, tag in tags -%} {%- if tag != "" -%} {{ tag.title }} {%- endif -%} {%- endfor -%}
{%- set sort_order = sort_order or 'asc' -%} {%- set sort_attribute = sort_attribute or 'last_changed' -%} {%- set pagination_page = request.args.get('page', 0) -%} {%- set cols_required = 6 -%} {%- set any_has_restock_price_processor = datastore.any_watches_have_processor_by_name("restock_diff") -%} {%- if any_has_restock_price_processor -%} {%- set cols_required = cols_required + 1 -%} {%- endif -%}
{%- set link_order = "desc" if sort_order == 'asc' else "asc" -%} {%- set arrow_span = "" -%} {%- if any_has_restock_price_processor -%} {%- endif -%} {%- if not watches|length -%} {%- endif -%} {%- for watch in (watches|sort(attribute=sort_attribute, reverse=sort_order == 'asc'))|pagination_slice(skip=pagination.skip) -%} {%- set checking_now = is_checking_now(watch) -%} {%- set history_n = watch.history_n -%} {%- set has_favicon = watch.get_favicon_filename() -%} {# Mirror in changedetectionio/static/js/realtime.js for the frontend #} {%- set row_classes = [ loop.cycle('pure-table-odd', 'pure-table-even'), 'processor-' ~ watch['processor'], 'has-error' if watch.compile_error_texts()|length > 2 else '', 'paused' if watch.paused is defined and watch.paused != False else '', 'unviewed' if watch.has_unviewed else '', 'has-restock-info' if watch.has_restock_info else 'no-restock-info', 'has-favicon' if has_favicon else '', 'in-stock' if watch.has_restock_info and watch['restock']['in_stock'] else '', 'not-in-stock' if watch.has_restock_info and not watch['restock']['in_stock'] else '', 'queued' if watch.uuid in queued_uuids else '', 'checking-now' if checking_now else '', 'notification_muted' if watch.notification_muted else '', 'single-history' if history_n == 1 else '', 'multiple-history' if history_n >= 2 else '', ] -%} {%- if any_has_restock_price_processor -%} {%- endif -%} {#last_checked becomes fetch-start-time#} {%- endfor -%}
#   Website Restock & PriceLast Checked Last Changed
No website watches configured, please add a URL in the box above, or import a list.
{{ loop.index+pagination.skip }}
Pause checks Mute notification
{# A page might have hundreds of these images, set IMG options for lazy loading, don't set SRC if we dont have it so it doesnt fetch the placeholder' #}
{{watch.title if watch.title is not none and watch.title|length > 0 else watch.url}}   {%- if watch['processor'] == 'text_json_diff' -%} {%- if watch['has_ldjson_price_data'] and not watch['track_ldjson_price_data'] -%}
Switch to Restock & Price watch mode? Yes No
{%- endif -%} {%- endif -%} {%- if watch['processor'] == 'restock_diff' -%} Price {%- endif -%} {%- for watch_tag_uuid, watch_tag in datastore.get_all_tags_for_watch(watch['uuid']).items() -%} {{ watch_tag.title }} {%- endfor -%}
{%- if watch.get_fetch_backend == "html_webdriver" or ( watch.get_fetch_backend == "system" and system_default_fetcher == 'html_webdriver' ) or "extra_browser_" in watch.get_fetch_backend -%} Using a Chrome browser {%- endif -%} {%- if watch.is_pdf -%}Converting PDF to text{%- endif -%} {%- if watch.has_browser_steps -%}Browser Steps is enabled{%- endif -%}
{%- if watch['processor'] == 'restock_diff' -%} {%- if watch.has_restock_info -%} {%- if watch['restock']['in_stock']-%} In stock {%- else-%} Not in stock {%- endif -%} {%- endif -%} {%- if watch.get('restock') and watch['restock']['price'] != None -%} {%- if watch['restock']['price'] != None -%} {{ watch['restock']['price']|format_number_locale }} {{ watch['restock']['currency'] }} {%- endif -%} {%- elif not watch.has_restock_info -%} No information {%- endif -%} {%- endif -%} {{watch|format_last_checked_time|safe}} {%- if watch.history_n >=2 and watch.last_changed >0 -%} {{watch.last_changed|format_timestamp_timeago}} {%- else -%} Not yet {%- endif -%}
{%- set target_attr = ' target="' ~ watch.uuid ~ '"' if datastore.data['settings']['application']['ui'].get('open_diff_in_new_tab') else '' -%} Recheck Edit
{{ pagination.links }}
{%- endblock -%}