From e4fb5ab4da4d1236d8a5b0f8341c7194d14d85dd Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 23 Dec 2022 22:26:24 +0100 Subject: [PATCH] UI - Suggest adding proxy for watch when 403 access denied is reached (#1260) --- changedetectionio/__init__.py | 17 ++++++++++------- changedetectionio/templates/watch-overview.html | 11 ++++++++++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index fee7a8bc..09f2d9a1 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -406,17 +406,20 @@ def changedetection_app(config=None, datastore_o=None): existing_tags = datastore.get_all_tags() form = forms.quickWatchForm(request.form) - output = render_template("watch-overview.html", - form=form, - watches=sorted_watches, - tags=existing_tags, + output = render_template( + "watch-overview.html", + # Don't link to hosting when we're on the hosting environment active_tag=limit_tag, app_rss_token=datastore.data['settings']['application']['rss_access_token'], + form=form, + guid=datastore.data['app_guid'], + has_proxies=datastore.proxy_list, has_unviewed=datastore.has_unviewed, - # Don't link to hosting when we're on the hosting environment hosted_sticky=os.getenv("SALTED_PASS", False) == False, - guid=datastore.data['app_guid'], - queued_uuids=[q_uuid.item['uuid'] for q_uuid in update_q.queue]) + queued_uuids=[q_uuid.item['uuid'] for q_uuid in update_q.queue], + tags=existing_tags, + watches=sorted_watches + ) if session.get('share-link'): diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 77fe7cf5..d5f987d4 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -94,7 +94,16 @@ {%if watch.get_fetch_backend == "html_webdriver" %}{% endif %} {%if watch.is_pdf %}{% endif %} {% if watch.last_error is defined and watch.last_error != False %} -
{{ watch.last_error }}
+
{{ watch.last_error }} + + {% if '403' in watch.last_error %} + {% if has_proxies %} + Try other proxies/location  + {% endif %} + Try adding external proxies/locations + + {% endif %} +
{% endif %} {% if watch.last_notification_error is defined and watch.last_notification_error != False %}
{{ watch.last_notification_error }}