Commit Graph

7168 Commits

Author SHA1 Message Date
Tim Abbott 71e1f00fc6 puppet: Move our iptables config to zulip_internal.
(imported from commit f177b3989092f4fa7f00ae5bfb833ea23fe35489)
2013-11-09 07:28:18 -05:00
Tim Abbott e957c8adb2 puppet: Move our SSHD config to zulip_internal.
(imported from commit 0c6314963ebe9246d8136dc6db3176d226dc2049)
2013-11-09 07:27:19 -05:00
Tim Abbott 27eeb95eb4 Fix password reset on Django 1.6.
(imported from commit 8a0d106d1380653eeb042787fa7eefca3f416222)
2013-11-08 15:51:49 -05:00
Tim Abbott 828917cac8 Enabled the Django cached template loader.
This was recommended by:

https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

Since we don't change our deployments without restarting Django and
don't use any custom template magic, this should be a free performance
win.

(imported from commit fd498ab97d0669c3a14b342b2d2f01994a1f1ee1)
2013-11-08 15:36:31 -05:00
Tim Abbott 98ad49c866 Use persistent connections to our database.
I figure we can start with 600s as a maximum age -- our threads do
many dozens of requests per minute, so I figure we'll get most of the
benefit of permanently persisting connections this way.  I could also
be convinced to do just 60s, though the impact will likely to be less
visible on staging.  600s seems to be what Django originally had for
this parameter before they disabled it by default.  See:

https://groups.google.com/forum/#!msg/django-developers/rH0QQP7tI6w/yBusiFTNBR4J

for discussion, which also suggests we might have issues with
runserver that we should watch out for.

(imported from commit 0ae09fa4f1b39cc88c76fa58258aaf20ab168dcf)
2013-11-08 15:36:31 -05:00
Leo Franchi d13500ac0d Add a email-only sso login page that redirects to a deployment-specific domai
(imported from commit 7134ad71f01b3c22c61c6c0e65f7196efaf92237)
2013-11-08 14:33:12 -05:00
Leo Franchi 4070a95735 Add a desktop-specific landing page, in case we change the behaviour of / in the future
(imported from commit aac1e5495cdae0c797b22d0aeee1eb05f22f9b37)
2013-11-08 14:32:41 -05:00
Leo Franchi 7126610298 Add a generate_204 method to our backend for the desktop app
(imported from commit 3fa61b7e09884c83a27740087abba25dbcd8a9cb)
2013-11-08 14:13:44 -05:00
Steve Howell d311ab0283 Avoid stack trace when hitting "i" to close message menu.
The function show_actions_popover() actually toggles the
message action menu open and closed.  I renamed the method
to toggle_actions_popover(), and I check to make sure the
menu is open before trying to focus its first item.

(imported from commit b2c32b6c4e0be6066cd1d41463457b7e991df0ec)
2013-11-08 12:28:22 -05:00
Steve Howell 62089aeff6 Make sure unread counts stick for huddles.
Every time we re-render the huddles section, we need to
update the unread count.  We do this is in very similar
fashion to how we update individual users.

(imported from commit 2419365bc602ddaebc609090e119c0dcfad35bb7)
2013-11-08 12:11:28 -05:00
Waseem Daher 76fa95a5e9 activity: Display times in US/Eastern.
(imported from commit 730d37e0b8da046c1fe9e0c0cfc9b420da560865)
2013-11-08 11:39:59 -05:00
Waseem Daher 8b89a56922 Exclude wdaher.com from our analytics dashboard.
It really shouldn't count.

(imported from commit ad91ecfacbd421bc1e10ef3a15ef28ca9e87a0ae)
2013-11-08 10:47:50 -05:00
Steve Howell 038460bd26 Select the first menu item when using the "i" hotkey.
If you use the "i" hotkey to open the message menu, focus
the first item in the menu.

(imported from commit 54069710134c64368220ab0cf9144c3dc1a4304d)
2013-11-08 10:44:21 -05:00
Steve Howell 59ec080a8d Simplify analytics/activity.html.
For legacy reasons, this template wanted each tab's content as
a one-key dictionary, instead of a string.  Each tab already has
a tuple to allow for fields like title, so this wasn't really giving us
any long term flexibility; it was just crufting up the calling
code.

(imported from commit 2a316107ec223a83efa8735f4810a6fa43107541)
2013-11-08 10:44:20 -05:00
Steve Howell 38e479d4a6 Extract make_table() in analytics/views.py.
(imported from commit f1457763ac491d32de19221fb9a2d11e43d58106)
2013-11-08 10:44:20 -05:00
Steve Howell bb3eca70c7 Allow enter key to submit an alert word.
This fixes a mild regression in 6bd2a0315ff56a20027074d65ccaa094bd35e63f,
which fixed a bigger bug.  That change added the event parameter to
add_alert_word(); this change updates one of the callers to now
supply it.

(imported from commit c6375abb8bd22d12c538cd7439462aae4665ee38)
2013-11-08 10:36:37 -05:00
Tim Abbott cd51334493 Temporarily disable populate_db parallelism to support Django 1.6.
We don't really take good advantage of the parallelism anyway (though
it is very useful if you want to make 10000 messages, we don't do that
often).  If we decide we need that functionality, we can figure out
what the right way is to do threads with this stuff.

(imported from commit 98aa4b54fab6fd437b7c7ac0c3c7e658d2f8cb33)
2013-11-08 08:22:04 -05:00
Tim Abbott f8208263ec [Django 1.6] Make pre-1.6 password reset links still work.
We can revert this commit once any previously valid password reset
links would have expired.

(imported from commit ffac4d36e914e77ad1516ccfac26318c79ba0f7f)
2013-11-08 08:22:04 -05:00
Tim Abbott 402547fa3f [Django 1.6] Update password reset form for Django 1.6.
(imported from commit caa37216333c4750146146ce9baed59461546220)
2013-11-08 08:22:04 -05:00
Tim Abbott 2e833613c3 [Django 1.6] update monkeypatching for CursorDebugWrapper.
(imported from commit cb4b44a2bb6ba6efbd1fb5710da2df7c1dec7f81)
2013-11-08 08:22:04 -05:00
Tim Abbott c03050f2b9 [Django 1.6] Use the legacy PickleSerializer for sessions.
This is for backwards compatible.  Later we should actually switch to
the JSON serializer, because it means having our SECRET_KEY stolen
isn't an immediate arbitrary code execution vulnerability.

(imported from commit e68ba5cfdb79c0c1f7b178279ecd0307016f5eff)
2013-11-08 08:22:04 -05:00
Steve Howell 52ec258122 [staging only] Show Recent Group PMs in right sidebar.
Show up to 10 of your recent group PM conversations in the right
sidebar.  Clicking on the links narrows to the huddle and opens the
compose box for the huddle.  The green circles have opacity
proportional to the number of users present in the huddle.

This is feature flagged to staging only.

Some of this code was written by Allen before commits were squashed.

Known issue: unread counts disappear on certain refresh events.

(imported from commit 3b44665150ba20594d8b0295cb30df03601c1d52)
2013-11-07 16:54:13 -05:00
Steve Howell 7bde1f7716 Add activity.short_huddle_name().
(imported from commit e3f0389298631fd06169dbc9559691470ac19d00)
2013-11-07 16:54:13 -05:00
Steve Howell 9adcba1e6d Add activity.huddle_fraction_present().
Add a method that lets us know what percentage of a huddle is
present.  (We can use this later to set the opacity of huddles
in the UI.)

(imported from commit 8a2383951807d7bfbf9d730a8980d977cf23b379)
2013-11-07 16:54:13 -05:00
Tim Abbott ba15333df9 Add temporary debug logging around Tornado handler protocol.
This logging is kinda excessive since it adds like 4 log lines per
recipient, so I expect we'll end up reverting it once we've debugged
the proximal issue.

(imported from commit 5e6ab3e230f32b65ad9cf0d95f20ffbc0fe7397e)
2013-11-07 15:44:19 -05:00
Tim Abbott 3b41e79074 get_events: Log queue ID in home and get_events requests.
(imported from commit 8be1427c6c9ec3d1eb4a02f3c6ad5c2726542596)
2013-11-07 15:44:19 -05:00
Tim Abbott 1a97f194e9 compose: restart the get_updates loop 2s after sending a message.
This should substantially mitigate the get_updates failures that we've
been seeing, since users will experience a 2s-slow send, not a 0-60
second slow send.

We should revert this once we resolve the root problem.

(imported from commit b665d0dfe674e1113bdd62cef50e3d9c52758e4c)
2013-11-07 15:30:05 -05:00
Zev Benjamin b715e15d3d Fix blueslip not outputting to the console
(imported from commit ffb96548b8262881ae731b627b510f208b3b93dc)
2013-11-07 14:23:16 -05:00
Waseem Daher 50ca7c4731 day2 email: Try to make clear that this is the last one.
(imported from commit 953d491a7c5b6717178c85aed4a96e08a8e61e61)
2013-11-07 13:23:41 -05:00
Waseem Daher 9c28bf34e8 Remove full names from our day1 and day2 emails.
The weird formality of using your complete name I think feels even
spammier than saying nothing.

(imported from commit b2326de91866fa3c13c2023723f64d1beadf435e)
2013-11-07 13:20:58 -05:00
Jessica McKellar 07959dc6d9 alert words: fix accidental use of a global variable.
The global in question was `event`, set to:

MouseEvent {dataTransfer: null,
            toElement: button.btn btn-mini add-alert-word,
            fromElement: null, y: 442, x: 763…}

in Chrome. This does seem to be the correct event.

In Chrome, this global variable existed, so the code path didn't error
out. In Firefox, the global variable didn't exist, causing adding
alert words to fail.

(imported from commit 6bd2a0315ff56a20027074d65ccaa094bd35e63f)
2013-11-07 11:50:01 -05:00
Zev Benjamin 24ae5998e5 socket: Request the status of pending requests on reconnect
This will hopefully help with the send dialog being stuck on
"sending" as well as allowing us to not show errors to the user on
reconnect.

(imported from commit 31ee889853f348e486863073dc130cdfb4e1338d)
2013-11-07 11:43:34 -05:00
Zev Benjamin 48a25211fa socket: Record the request status in redis
(imported from commit 6c3f6dc37d1abdcacf105f865ac24483717438ca)
2013-11-07 11:43:34 -05:00
Zev Benjamin 87fc182645 socket: Move `req_id` parameter to top level of protocol payload
(imported from commit 271d84a0b44a2623bec290f64a83a0423698a1ef)
2013-11-07 11:43:34 -05:00
Zev Benjamin 4595143023 socket: Switch to client ids from connection ids
Clients can only have one connection at a time, anyway, so we can
just keep track of a client id, instead.  This makes reconnections
easier.

It's a little funny to use queue ids for the client id, but we know
they should exist by the time the client is connecting and they are
guaranteed to already be unique and authenticatable.  We will also
eventually be integrating the event system and the socket code closer
anyway.

(imported from commit 1f60e06fb16d31d6c121deafd493fb304d19a6c2)
2013-11-07 11:43:34 -05:00
Zev Benjamin 63924ea742 socket: Reduce code duplication in authentication error cases
(imported from commit e7900b1374c3c0e5ea994ff315d281833e7ecdc6)
2013-11-07 11:37:00 -05:00
Zev Benjamin e0fece4082 socket: Log the transport type on the authentication line
(imported from commit 7b3ae3ab38da35cbd60aca991665d40b41a7f78f)
2013-11-07 11:31:06 -05:00
Zev Benjamin b5c68371d0 socket: Don't even create the socket on prod
(imported from commit 1990d86618ae715c072b6b81672afd6f0e8f48fe)
2013-11-07 11:31:06 -05:00
Kevin Mehall ed31b110e3 Revert "Fix duplicated summary blocks when scrolling up."
This is unnecessary without summarization and has a performance
impact on scrolling.

This reverts commit 6270a33ff0fe98fc901b687ca533ef0ea127d052.

(imported from commit ac328a9fe344adfaf1cc1822cd58bc9178ae1a33)
2013-11-07 11:04:27 -05:00
Kevin Mehall d93c7545f6 Revert rendering window changes related to summarization
This reverts commit c10d9c1a0d23891acce88bf8d79866c08cb75681.
This reverts commit 9259a246946cd968a8725c38ff5ef2d4b4793717.

(imported from commit 50e9e0136c2487cc63d75ae2b78df0c70a1b0be1)
2013-11-07 11:04:27 -05:00
Steve Howell 3fcbfeaa80 Move "Edit this message" higher in the info menu.
For messages that you sent yourself, it is more likely that you
will want to edit the message than reply to yourself, collapse
your own message, etc. from the info menu, so we make it the first
option.  This should make it easier for keyboard users to edit
messages.

(imported from commit 94c5036a4ae85ed091c95eae2545e78887a09598)
2013-11-07 10:43:09 -05:00
Tim Abbott d246189d98 Fix report_send_time check.
(imported from commit eeb2dd9cb0861a5eeea6254ab9d6a3d818fb2ebd)
2013-11-07 09:54:41 -05:00
Kevin Mehall 57aabc112d Add debug for a possible way get_events might forget a request
(imported from commit ca3ac5b942ffdcc8f175cc6b690cb2555e170836)
2013-11-06 18:34:50 -05:00
acrefoot 4c88a909cb If EMAIL_HOST is unset or blank, don't send email via django.core.mail
It will instead use the dummy EmailBackend

(imported from commit 6faec7f3e087901226a120b9268cf687ed165c05)
2013-11-06 17:36:41 -05:00
Steve Howell bdbd8d006a Exclude analytics and zilencer from LOCAL_SERVER INSTALLED_APPS.
(imported from commit f055ff18166d73b3531d27ccef7f5d457cd89017)
2013-11-06 16:56:10 -05:00
Steve Howell 64fb17f9c2 Move management commands to the analytics app.
Move commands related to stats collection and reporting from
zilencer to analytics.  To do this, we had to make "analytics"
officially an app.

(imported from commit 63ef6c68d1b1ebb5043ee4aca999aa209e7f494d)
2013-11-06 16:51:08 -05:00
Leo Franchi 9a0faf9ca8 Clean periods for our domain statsd keys
(imported from commit d89b860566a7845774f470a215a3f3697b871d3c)
2013-11-06 15:45:03 -05:00
Leo Franchi 591d06cb24 Only log valid stats to statsd
(imported from commit 449b7f5e750913c04e4df8f2a895274ded99ddd9)
2013-11-06 15:41:46 -05:00
Steve Howell a32b47f7d6 Exclude bots from Active Users in main activity counts.
(imported from commit f0b0d46470dc5a2f7f80fe8f2329e3df9384bc07)
2013-11-06 15:38:25 -05:00
Tim Abbott 4aa7ce3bd2 Also display the time until new work is scheduled after rendering.
(imported from commit 33562f105d5dd6ed81ca60d0517277d908ec2ffd)
2013-11-06 15:35:49 -05:00