From cde8040c9b8b5dc23a1eb1d34dd0db72ba4cef2f Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Wed, 17 Apr 2013 14:36:13 -0700 Subject: [PATCH] Adding explainer for error-ridden feeds. --- apps/rss_feeds/views.py | 1 + media/css/reader.css | 2 +- media/js/newsblur/reader/reader_statistics.js | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/rss_feeds/views.py b/apps/rss_feeds/views.py index 2532d69dd..f166bdfdd 100644 --- a/apps/rss_feeds/views.py +++ b/apps/rss_feeds/views.py @@ -152,6 +152,7 @@ def load_feed_statistics(request, feed_id): feed.active_premium_subscribers = original_active_premium_subscribers feed.premium_subscribers = original_premium_subscribers stats['premium_update_interval_minutes'] = premium_update_interval_minutes + stats['errors_since_good'] = feed.errors_since_good # Stories per month - average and month-by-month breakout average_stories_per_month, story_count_history = feed.average_stories_per_month, feed.data.story_count_history diff --git a/media/css/reader.css b/media/css/reader.css index 6a1756b27..eab087686 100644 --- a/media/css/reader.css +++ b/media/css/reader.css @@ -6155,7 +6155,7 @@ form.opml_import_form input { } .NB-modal-statistics .NB-statistics-update-explainer { clear: both; - margin: 12px 24px 0; + margin: 6px 24px 6px; font-size: 10px; color: #808080; } diff --git a/media/js/newsblur/reader/reader_statistics.js b/media/js/newsblur/reader/reader_statistics.js index 9c39b471f..beb6aae88 100644 --- a/media/js/newsblur/reader/reader_statistics.js +++ b/media/js/newsblur/reader/reader_statistics.js @@ -117,6 +117,11 @@ _.extend(NEWSBLUR.ReaderStatistics.prototype, { $.make('b', 'Why so infrequently?'), 'This site has published zero stories in the past month or has averaged less than a single story a month. As soon as it starts publishing at least once a month, it will automatically fetch more frequently.' ])), + (data.errors_since_good && + $.make('div', { className: 'NB-statistics-update-explainer' }, [ + $.make('b', 'Why is the next update not at the normal rate?'), + 'This site has is throwing exceptions and is not in a healthy state. Look at the bottom of this dialog to see the exact status codes for the feed. The more errors for the feed, the longer time taken between fetches.' + ])), (!NEWSBLUR.Globals.is_premium && $.make('div', { className: 'NB-statistics-premium-stats' }, [ $.make('div', { className: 'NB-statistics-update'}, [ $.make('div', { className: 'NB-statistics-label' }, [