Commit Graph

2044 Commits

Author SHA1 Message Date
Tim Abbott fac24df233 Show a user-visible error message when mirroring is not working.
The main problem with this code is that the error message doesn't go
away until you reload.  To fix this, we need to add a noblock option
on get_updates.

(imported from commit dc45af397bcf06a218bda5dd224ebd5fdf3462db)
2012-11-26 11:49:29 -05:00
Tim Abbott eefa5b2d7b API: Add support for nonblocking get_updates requests.
(imported from commit bf2ab19a83765c177fbb93abc1a61dccf5b4b2b7)
2012-11-26 11:49:29 -05:00
Jessica McKellar be27ec1ad4 nagios: Change zephyr mirror liveness check to only care about aggregate statistics.
Too many individual users occasionally don't update their mirrors,
causing us to be permanently alerting; we have sufficient user
notification at this point (plus Waseem keeping an eye on /activity)
that we don't need to alert on individual users.

We do, however, still care if something happens (say, Linerva going
down) that causes many users' mirrors to go down.

(imported from commit 392952c95739e183d4a711120e3a963671cec289)
2012-11-26 10:31:29 -05:00
Keegan McAllister 75526a2c67 nagios: Drop ssh -o StrictHostKeyChecking=no
This is bad for security.

I've checked that all currently known hosts for nagios@nagios.humbughq.com
match one of our existing servers.  When adding servers to nagios in the
future, it will be necessary to do an initial manual ssh from nagios@ and check
the host key fingerprint.

(imported from commit adfd1d29f03343d4be04e87c5e26a018f31e5194)
2012-11-26 00:25:15 -05:00
Keegan McAllister 043f0d8e15 nagios: Use lowercase host aliases
(imported from commit c653d5948894e651a5040339e8cd6af50af712b3)
2012-11-26 00:25:15 -05:00
Keegan McAllister 1939b55b5a nagios: Remove wiki.humbughq.com
This is the same machine as git.humbughq.com.

(imported from commit 8aa9306668d672052aa38a2f4453cb0127ab5cc5)
2012-11-26 00:25:15 -05:00
Keegan McAllister f761643724 nagios: Monitor bots.humbughq.com
(imported from commit 83cb5cc3c3c4bf54e1339d877bd60cd05586783b)
2012-11-26 00:25:15 -05:00
Keegan McAllister f8a065ed2c nagios: Remove dev.humbughq.com
This is an alias for staging.humbughq.com.

(imported from commit b2d2777e57773052dd59b3f5c067e23eafb60681)
2012-11-26 00:25:15 -05:00
Keegan McAllister b9c8f4a770 nagios: Enable ssh-based checks on all machines
(imported from commit 3905ad03cc2ed5dec6f8eb6b20d4b4f0896f164c)
2012-11-26 00:25:14 -05:00
Keegan McAllister 25916d9ce5 nagios: Check Debian update availability
(imported from commit 59da03c409281b6b2f5cf3612e5f7bd0caa76226)
2012-11-26 00:25:14 -05:00
Keegan McAllister 4b1a2e8a8a Install nagios-plugins-basic on every machine
We need this for check_debian_packages.

(imported from commit 588dfbe7d5b69acfd1db7fcf4060b64ec5151c2d)
2012-11-26 00:25:14 -05:00
Keegan McAllister 5836462cb4 Import check_debian_packages Nagios plugin
From http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-debian-packages/details

(imported from commit 6304a2aa315a91fd48e9ad79fcdb584ba8a2ccb4)
2012-11-26 00:25:14 -05:00
Keegan McAllister 685deba16b Puppetize APT::Periodic config
(imported from commit 2ccdeb4f9c8173a83c7014987977304187651f67)
2012-11-26 00:25:14 -05:00
Keegan McAllister 384a50822d Avoid unnecessary rows.get in pointer management
(imported from commit ef1d8a885b264be797616a2bab3f23e2702949c5)
2012-11-25 15:21:55 -05:00
Keegan McAllister a70fb98038 Reduce code duplication in keep_pointer_in_view
Fixes #269.

(imported from commit 5d382c0e1493a0798fc9bd1f5a8f37e15f2ea5ef)
2012-11-24 02:03:17 -05:00
Keegan McAllister b21bdc91cb Fix email addresses generated by populate_db --extra-users
(imported from commit bdb93e51966ca8c0e20d67cccbe50e80e2592127)
2012-11-23 19:19:46 -05:00
Zev Benjamin f1e644ece8 Fix "multiple popovers can appear" issue.
The reproducer for the issue here is:
- Scroll to the top of your feed
- Click on a stream name
- Open a popover
- Click on a subject name
- Note that your old popover doesn't go away, and that you can open
  a new one.

The problem was that when we narrow, we call jQuery.empty() on the
zfilt table. That not only removes nodes but also clears event
handlers and jquery data. Thus, even though we have a reference to
the old popover element in the ui module, the element has forgotten
it had a popover. When we call .popover("destroy") it actually
creates a new popover, but never shows it.

(imported from commit 9721d60c78549bd2362833590b304952f2bdef2d)
2012-11-21 18:02:33 -05:00
Jessica McKellar 3b4df3bbad Refactor replace_floating_recipient_bar to reduce code duplication.
(imported from commit 9f044a370e4b57c12eaca667e7d0ccdf9f546628)
2012-11-21 16:44:04 -05:00
Jessica McKellar 89582bff8a Fix floating recipient bar being unnarrowable.
When we switched to delegated event handling, the bound handler for
all of our events was #main_div, but the floating recipient bar lives
outside of #main_div. Additionally, the bar needs to inherit the zid
from the target recipient bar since it is used for the narrow.

(imported from commit 7c18e16f2e98436888a8edb81fbbdd4d17abfe2a)
2012-11-21 16:44:03 -05:00
Luke Faraone dad00fa29f Add script to create new realms.
(imported from commit 764d41f28b1af10860ea4d03a6aa983f40d3ffd7)
2012-11-21 16:42:15 -05:00
Luke Faraone 724dce78e4 Always allow registration if attempting to register for a non-MIT realm.
(imported from commit 00489ab74c376a4ffb23ad661699ef31c6c06818)
2012-11-21 16:42:15 -05:00
Luke Faraone 87d7ec57ee Use reference to view rather than direct URL.
(imported from commit 86ed3cbc93f7a4885bb9a87002dc39aaeae07820)
2012-11-21 16:42:15 -05:00
Luke Faraone 1c5ba6dc45 Remove Google Apps tease.
(imported from commit 57d46c26ba1888acde9117346782f8f99e371588)
2012-11-21 16:42:15 -05:00
Tim Abbott 6ac25fb9ba zephyr_mirror: Don't break long words/urls when mirroring.
(imported from commit df2b6a6969fc54016eeee4996df317e2843844c8)
2012-11-21 15:55:18 -05:00
Luke Faraone c911598575 SSL certificates for zephyr.humbughq.com
(imported from commit bfddb4cd0c4ab5fa61d192ea5705df6da2dc8dda)
2012-11-21 13:58:48 -05:00
Zev Benjamin f77b138bc4 Fix left border appearing on messages in Firefox
The problem seems to be caused by a bug in Firefox.  We work around
the issue by adding empty table rows to the top of the table and
removing them when the user is idle.

This resolves trac #413

(imported from commit 2b15a4a2241bd7e813800a42608d650e0d4fa4f0)
2012-11-21 12:18:04 -05:00
Waseem Daher 807113fa70 Temporarily remove user-visible "time travel" UI.
I'd like to think about how to polish aspects of this a bit more,
but would like us to be able to deploy master at some point today.

This is basically the philosophical equivalent of reverting the
user-visible UI changes introduced in
b7b6794ad635ec63269a2043cd48b02749fbffda

(imported from commit edfaadf26741c47120c3acf6c410d33025c0a260)
2012-11-21 11:30:56 -05:00
Waseem Daher 776a947f75 Properly handle a "top" update in an empty narrow.
Previously, it was impossible to narrow to a completely empty narrow.
Now it is possible, and the code needs to be tweaked in a few ways
not to break in this case.

(imported from commit e4dd4159ad52d003fc11d0b8b6531322c12a3de8)
2012-11-21 10:38:31 -05:00
Keegan McAllister 161af7838f Prevent session expiry as long as the user has reloaded in the past two weeks
Fixes (?) #416.

(imported from commit 9d56fe4125f742e2cdccc41ebd385daacccf461f)
2012-11-20 21:49:11 -05:00
Keegan McAllister ced6921491 Redirect to /accounts/login if an Ajax call fails because we aren't logged in
Fixes #396.

We could display an error message, but jumping right to the login page seems
smoother and conveys the same information.

This will discard any message being composed, but preserving it would have
security consequences that we should consider further before implementing that.
Hopefully, users only get logged out by an explicit action, so they can't
complain too much (but see #217).

(imported from commit aaa23ecf46c73e514117ae1010fc44e133f2ba07)
2012-11-20 21:49:11 -05:00
Keegan McAllister 33d1b77344 Return HTTP 401 Unauthorized from JSON views when not logged in
(imported from commit c1f4989c8d1132e10b2e61e9ef08000823994b35)
2012-11-20 21:49:10 -05:00
Waseem Daher 5e321048b1 Put the realm in the <title> when you're logged in.
This resolves Trac #145.

(imported from commit 680c11ecb25e22201a1a335f97b014290aa25a06)
2012-11-20 21:15:26 -05:00
Luke Faraone ed691f0b6e Linewrap long line in views.py
(imported from commit 923ce6d87755e4827995d10f62b574d416246147)
2012-11-20 17:40:40 -05:00
Luke Faraone 48806b5548 Fix incorrect Recipient access, use create_stream_if_needed.
This solves 500s that were occurring when subbing to "signups" and related
actions.

(imported from commit 91a59cc23d144133565b2465896e0c5ba868a9bb)
2012-11-20 17:38:00 -05:00
Waseem Daher 12f1a29e07 Specify the stream in a way that includes the realm.
(imported from commit 4de319fe3600f7d434be5198fef214f059f4b668)
2012-11-20 17:18:32 -05:00
Tim Abbott f72427d83c zephyr_mirror: Fix running --sync-subscriptions repeatedly.
(imported from commit 15bead790590c91cd4a1d794799f94341d31c181)
2012-11-20 17:17:40 -05:00
Tim Abbott 15c778dacf style: Use space before "(" when defining an anonymous function.
(imported from commit 369e13d918f0da2566587b83f3881c908a152519)
2012-11-20 17:17:39 -05:00
Tim Abbott 14494d6a1f Add "time travel" feature.
(imported from commit b7b6794ad635ec63269a2043cd48b02749fbffda)
2012-11-20 17:17:39 -05:00
Tim Abbott bbf482b6f8 Fix using "load old messages" on the narrowed view after unnarrowing.
Previously, we were adding those narrowed messages to message_dict the
first time, and thus totally skipping those messages each additional
time you tried to "load old messages" on that narrow.

(imported from commit 77eef376e1165b86e3c599608a1b5089a09d51e0)
2012-11-20 17:17:39 -05:00
Tim Abbott 2b7ecfd325 get_old_messages: support adding messages on both top and bottom.
(imported from commit f01ca9f9770d07fb736f07b4c2397efe71ee8d1e)
2012-11-20 17:17:39 -05:00
Tim Abbott da43f250a4 narrow: Fix incorrectly adding messages to message_array.
(imported from commit babc7f40e0817c29e7d55f3ba534cbf3de8e3920)
2012-11-20 17:17:39 -05:00
Luke Faraone b1ba5bf1b2 [manual] Send a message when a new user creates an account.
(imported from commit 2c69be9bfbbe947db41188cbdfc05cf887dc858f)
2012-11-20 16:41:55 -05:00
Jessica McKellar f1fc271258 nagios: Increase the timeout on MIT zephyr forwarding functioning.
Sometimes messages are delayed passed the allowed 10 seconds. We may
eventually decide that that amount of latency is unacceptable, but the
latency is not what this script is supposed to be checking.

(imported from commit d83a6a83d60e9eac13b3b87fb31de7f9881acabf)
2012-11-20 15:32:06 -05:00
Keegan McAllister ff040faf97 bugdown: Use Markdown.reset() instead of re-creating the whole parser
(imported from commit 45a65453f2178a6a73392e2bd1e7d6d03de0e0e7)
2012-11-20 15:10:15 -05:00
Keegan McAllister fc60543432 bugdown: Remove trailing punctuation from automatic links
And allow parentheses etc. within a link, if they're not at the end.

Fixes #401.

(imported from commit 5261fce74fe381ceece2e7406776cc5bde19deb9)
2012-11-20 15:10:15 -05:00
Jessica McKellar bdf3473bac Fix bug where sending a PM would display as sent to the wrong person.
In get_display_recipient, the userprofile was selected incorrectly by
user_id instead of the userprofile_id. In production, this hasn't
resulted in a user-visible error because we use MySQL and user ids are
always equal to userprofile ids.

This does happen if you are using SQLite locally and run populate_db,
which adds a bunch of users in parallel in an insufficiently
transactional way.

(imported from commit c25a04b4919e3efdfc6996b03492f7714d9034e8)
2012-11-20 15:08:50 -05:00
Jessica McKellar cb50d4e7ef Have smarter PM autocomplete: sort based on who you Humbug the most.
(imported from commit 8b0223c97bc2cb8a1470ca482831ca615aaf10ec)
2012-11-20 15:08:49 -05:00
Zev Benjamin dbb0241568 add_to_table: bail early if there are no messages to render
This bug affected receiving messages while narrowed.  When none of
the messages recieved matched the narrow predicate, we'd try to
render messages and then create a jQuery object out of a bunch of
newlines (the only thing that results from a render of 0 messages).

(imported from commit 81f5aa46fac06fe0e5a14a8757f245f90b5845cc)
2012-11-20 14:06:36 -05:00
Jeff Arnold 57fbf21a7a Make searches with no initial results still work
(imported from commit 3dde5d661521001373430c1413ac1f80a16a1c2d)
2012-11-20 10:31:28 -05:00
Zev Benjamin 359fb41b64 Manipulate messages before adding them to the DOM
This greatly reduces the number of events generated and prevents the
blue flashing on message arrival.

This also necessitated a change in how we looked up message rows to
add the 'next_is_same_sender' class, which led to a further
optimization where we don't have to do as many jQuery selections by
id.

(imported from commit 0bcd5688b483c560b6f3a29c6d36433da600e8ef)
2012-11-19 23:31:23 -05:00