From 643f4590445928b7ac568b922f1edb6f52765b68 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Tue, 3 Mar 2015 00:02:09 +0100 Subject: displaying feed errors in ui --- pyaggr3g470r/templates/feed.html | 10 ++++++++++ pyaggr3g470r/templates/home.html | 6 ++++++ 2 files changed, 16 insertions(+) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/feed.html b/pyaggr3g470r/templates/feed.html index 21db7ebe..9910ccf7 100644 --- a/pyaggr3g470r/templates/feed.html +++ b/pyaggr3g470r/templates/feed.html @@ -14,6 +14,16 @@ ({{ ((feed.articles.all()|count * 100 ) / nb_articles) | round(2, 'floor') }}% {{ _('of the database') }}) {% endif %} .
+ {% if feed.error_count > 2 %} + {{ _("That feed has encountered too much consecutive errors and won't be retreived anymore") }} + {% elif feed.error_count > 0 %} + {{ _("That feed has encountered some errors but that counter will be reinitialized at the next successful retreiving") }} + {% endif %} + .
+ {% if feed.last_error %} + {{ _("Here's the last error encountered while retreiving this feed:") }}
{{ feed.last_error }}
+ {% endif %} + {{ _('Address of the feed') }}: {{ feed.link }}
{% if feed.site_link != "" %} {{ _('Address of the site') }}: {{ feed.site_link }} diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index a00f962e..8170a99d 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -21,6 +21,9 @@ {% for fid, nbunread in unread|dictsort(by='value')|reverse %}
  • {% if feed_id == fid %}{% endif %} + {% if in_error.get(fid, 0) > 0 %} + 2 else "orange" }} ;" class="badge pull-right" title="some errors occured while trying to retreive that feed">{{ in_error[fid] }} + {% endif %} {{ nbunread }} {{ feeds[fid]|safe }} {% if feed_id == fid %}{% endif %} @@ -36,6 +39,9 @@ {% endfor %} {% for fid, ftitle in feeds|dictsort(case_sensitive=False, by='value') if not fid in unread %}
  • + {% if in_error.get(fid, 0) > 0 %} + 2 else "orange" }} ;" class="badge pull-right" title="some errors occured while trying to retreive that feed">{{ in_error[fid] }} + {% endif %} {% if feed_id == fid %}{% endif %} {{ ftitle|safe }} {% if feed_id == fid %}{% endif %} -- cgit