Commit Graph

1533 Commits

Author SHA1 Message Date
shlurbee
b5812e6fa5 Check for valid campaign when fetching bid history
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.
2012-07-18 14:48:29 -04:00
shlurbee
6890bb56b1 Always show comments for sr discovery links
Fixes a bug where comment pages were broken for new sr discovery links.
2012-07-18 14:48:21 -04:00
Max Goodman
05afaf6580 Fix jQuery gzipping in the Makefile. 2012-07-18 14:48:07 -04:00
bsimpson63
02db4d60b1 Fix typo in VotesByDay. 2012-07-18 14:45:53 -04:00
bsimpson63
7015790e98 Write vote id only to column name for Cassandra views. 2012-07-18 14:45:35 -04:00
bsimpson63
6fd201ef37 VotesByComment. 2012-07-18 14:45:25 -04:00
bsimpson63
565ae5bb2f Only show "view live" link on current live campaign. 2012-07-18 14:45:11 -04:00
Neil Williams
42319801c3 Get more comprehensive list of needed subreddits in ModAction.add_props.
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.
2012-07-16 12:06:55 -07:00
bsimpson63
5edadcb20a Use weight instead of bid when scheduling campaigns. 2012-07-16 12:03:58 -07:00
Neil Williams
cce5c1c8e1 Add reddit-stop event to upstart jobs.
This allows us to quickly turn off every reddit-related process on a
system.
2012-07-16 12:02:56 -07:00
Neil Williams
d4661ad89b Add upstart job for putting subscriber stats in traffic db. 2012-07-16 12:02:56 -07:00
shlurbee
aff7c460aa Fix query for fetching promotion schedule by user.
The general query worked fine but passing an author_id raised an error.
2012-07-16 11:52:23 -07:00
shlurbee
7abbac6e25 Show traffic for manual promo
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.
2012-07-16 11:52:22 -07:00
Keith Mitchell
5928add7c2 Fix facets in Opera 2012-07-16 11:52:20 -07:00
Keith Mitchell
16c753096c Use a raw string for the related_replace_regex 2012-07-16 11:52:19 -07:00
Neil Williams
8d276592ce Update .gitignore for renamed generated strings file. 2012-07-16 11:52:17 -07:00
Matthew Robertson
eac376c02b Ensure video stops playing when "hide" clicked.
Fixes reddit/reddit#233.
2012-07-16 11:52:14 -07:00
Max Goodman
412b1c3e55 Tighten up cssfilter bg-gradient regex to prevent inner rules.
Thanks to listen2 for disclosing this issue.
2012-07-16 11:31:30 -07:00
Neil Williams
9cd5fed51d Add traffic to example.ini. 2012-07-14 09:30:06 -07:00
Neil Williams
0c4b64ee3b zip_timeseries: Handle descending *and* ascending data correctly.
The previous fix broke promoted link traffic which is ordered the other
way.
2012-07-13 11:31:28 -07:00
Neil Williams
251f0f310b traffic: Reinstate JSON access to subreddit traffic data. 2012-07-13 11:31:28 -07:00
Neil Williams
6352fedad6 traffic: Darken the green graphs for color blind users.
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.
2012-07-13 11:31:28 -07:00
Neil Williams
9db5a52743 Show subreddit public description on private subreddit 403 page.
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.)
2012-07-13 11:31:28 -07:00
Neil Williams
649a56a06f Truncate sidebars when used as description fallbacks.
There's been enough time to add proper public descriptions and the
remaining gigantic sidebars are an eyesore in subreddit listings.
2012-07-13 11:31:28 -07:00
Keith Mitchell
cbadd98a85 Add text to search page button 2012-07-13 11:31:28 -07:00
Maxime Rouiller
a07741f31a Added padding to the search button 2012-07-13 11:31:28 -07:00
Keith Mitchell
9bd9a43da8 Fix issue with unicode in search facets 2012-07-13 11:31:28 -07:00
Keith Mitchell
f4d738060e Remove duplicate in INVALID_QUERY_CODES 2012-07-13 11:31:28 -07:00
Keith Mitchell
af0dbe5b66 Don't show NSFW links in the related tab unless the Link is marked NSFW 2012-07-13 11:31:28 -07:00
Neil Williams
45d86810d8 traffic: Use max instead of min to calculate current slice.
zip_timeseries works *backwards* through time so min was getting
the least-correct time.
2012-07-12 19:42:57 -07:00
Neil Williams
94945f7341 Overhaul traffic pages (and update a few self-serve pages).
* 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.
2012-07-12 14:56:27 -07:00
Neil Williams
6a2c4afcb2 Directly access traffic database for traffic queries.
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.
2012-07-12 14:56:27 -07:00
Neil Williams
49f688df10 Add basic sqlalchemy model of traffic db schema. 2012-07-12 14:56:27 -07:00
Keith Mitchell
c9d98fc729 Whitespace cleanup in routing 2012-07-12 14:56:27 -07:00
Keith Mitchell
bcac640369 Add a /rules page 2012-07-12 14:56:26 -07:00
bsimpson63
82ee08fc5d Clean up in POST_del. 2012-07-12 14:22:04 -04:00
bsimpson63
7afd3eb5b6 On deletion remove links from unmoderated_links. 2012-07-12 14:21:57 -04:00
bsimpson63
23bb2f16fa Run queries.ban on all spam things so spam_filtered will update. 2012-07-12 14:21:46 -04:00
shlurbee
c012ff81c8 Enable subreddit discovery spotlight ads
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
2012-07-11 14:45:11 -07:00
shlurbee
eaa3b808d1 Fix "what's this" help link in spotlight
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.
2012-07-11 14:43:25 -07:00
Keith Mitchell
fa629e92c9 Show reddit search "facets"
If search results contain hits from more than one subreddit,
the top 20 will be selectable to click through and narrow
results
2012-07-11 14:31:57 -07:00
bsimpson63
3c0c27fab3 Don't use self.totals if it doesn't exist (day traffic issue). 2012-07-10 17:16:02 -04:00
bsimpson63
ba7e3516e4 CL ONE for ModAction lookups. 2012-07-10 17:16:01 -04:00
bsimpson63
9b9db8fb12 Add subreddit query for unmoderated links. 2012-07-10 17:16:01 -04:00
Neil Williams
6db4e82ac8 Use CL ONE for Cassandra Save/Hide lookups.
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.
2012-07-10 17:16:01 -04:00
Jonathan M Tran
9ed1f8cc0f Fix for error 500 being thrown at registration 2012-07-09 13:17:19 -07:00
Neil Williams
1f951aadc0 Gracefully degrade when cassarel lookups fail.
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.
2012-07-09 13:17:19 -07:00
Neil Williams
e2f3dba37f setup.py: Ensure webhelpers==0.6.4.
Newer webhelpers packages cause issues with Routes.
2012-07-09 13:17:19 -07:00
Neil Williams
4ba3b66834 setup.py: Add missing lxml dependency.
filters.py depends on lxml. This dependency was missing.
2012-07-09 13:17:19 -07:00
Neil Williams
f50bab028d setup.py: Gracefully handle when Cython is not installed. 2012-07-09 13:17:19 -07:00