Occasional rogue promotion weights were causing /promoted/graph to fail. We
should figure out how those weights are being created in the first place, but
for now just check to make sure a campaign exists before using it.
Links that had been taken down for DMCA compliance (and therefore moved
into the takedown subreddit) were breaking modlog because the takedown
subreddit wasn't in the list of subreddits to look up.
Defaults to showing traffic for the last month if a promoted link doesn't have
any campaigns associated with it. This will make it possible to see stats for
manually launched promos like the subreddit discovery links.
This should be a bit more color-blind friendly as it's high-contrast.
Additionally, I've changed the name of the variable to something less
tied to the contents of the variable, as I really should've known better
from the world of CSS classes.
This allows moderators of private subreddits to explain why it is
private or how to request access (or simply that you shouldn't and
should go the hell away.)
* Upgrade flot and include the new timeseries flot plugin.
(flot/flot@ca050b26c2)
* All times mentioned by traffic are now in UTC, not "local."
* Traffic data is generated as actual tables and JavaScript
generates the Flot charts from the tables for accessibility.
* Many pieces of traffic data that were only accessible from the
old traffic app are now moved into the reddit app.
* Traffic backend lag time is indicated on the graphs for clarity.
* Use excanvas with Flot instead of Google Charts for old-IE fallback.
Traffic stats are currently pulled from the traffic app, which is a
separate pylons application, via HTTP requests. This patch eliminates
the dependency on that extra app by moving the queries into the reddit
app while maintaining the existing API near-verbatim. This allows us to
ditch the external traffic app.
Checks to see if there's a field called sr_discovery_links in the .ini file
and, if there is, mixes those links in with rising links in the spotlight.
Promoted links are still inserted as before.
Example of what the .ini file entry would look like:
sr_discovery_links = t6_hq, t6_hr, t6_hs
When the user clicks "what's this?" we query the dom with .thing:visible to
find out what kind of link is being displayed so we know which blurb to show.
However, we were calling hide() on the link before doing the query, which
meant it didn't match the .thing:visible filter and we were always falling back
to the default.
This fixes a bug where we were showing the rising links help blurb when the
user clicked "what's this?" on a promoted link.
Looking up saves and hides generally results in a big multi-get that'll
end up hitting most of the ring. During load spikes this is a big issue.
Let's try reducing the CL to reduce load.
The relation lookups currently do a multiget that will likely end up
hitting every node in the ring, until this can be fixed they are very
susceptible to load spikes. Rather than losing the whole request and
returning a 500/YBR to the user, if one of these lookups fail, we'll
just plow on.