Commit Graph

2071 Commits

Author SHA1 Message Date
Waseem Daher f214c2df75 Lay the groundwork for a "typeahead helper" module.
(imported from commit 0b73238e935fac7c13d7152b262d3e71a714f3ea)
2012-11-18 19:41:03 -05:00
Waseem Daher 2287c553ec If we just narrowed from a search, blur the searchbox so that Esc still works.
(imported from commit e8bfe58b81a12bb6dba34ab5210c249a33b5c700)
2012-11-18 19:39:49 -05:00
Waseem Daher afa7e83414 Make the searchbox typeahead optionally narrow to stream or PMs.
(imported from commit dcef6f4d426a37c010363cc943441bd0361f8f05)
2012-11-18 19:39:44 -05:00
Waseem Daher 95706ce9a2 Create a searchbox typeahead where enter does not submit the form.
(imported from commit 38105e2f31611dda8c9767212f18c1a73640df45)
2012-11-17 23:58:16 -05:00
Waseem Daher ab78076c43 composebox_typeahead.js: Export code that splits name-and-email.
(imported from commit b118a9b0475b71cb4ffd880bcde5868d4e81e73e)
2012-11-17 23:29:35 -05:00
Tim Abbott eac3ae2ed1 zephyr_mirror: Improve zwrite error handling.
(imported from commit a6b5b9c0c9bd6ffde0b2b783c87528bdcae03566)
2012-11-16 17:08:51 -05:00
Tim Abbott 6026c80de6 API: Add unsubscribe function.
(imported from commit 6dc55e9030770500770ce3921a4e77499d64f2d6)
2012-11-16 17:06:01 -05:00
Tim Abbott 312db82f2b urls: Reindent our API views.
Otherwise the upcoming /api/v1/subscriptions/remove is too long.

(imported from commit 47da45a84b986fea238bac17b317dbb1aa506b4b)
2012-11-16 17:06:01 -05:00
Tim Abbott d1239278c7 Rewrite remove_subscriptions to work like add_subscriptions.
In particular:
* Taking a list of streams as arguments.
* Using the _backend model so that we can have an API version.
* Considering "not subscribed" to be a non-fatal error.

And of course the corresponding changes to subs.js.

(imported from commit fdb300c6aa6921c2c6b09c22bd1e64405c368809)
2012-11-16 17:06:01 -05:00
Tim Abbott ff2b5c19de add_subscriptons_backend: Some minor code cleanup.
(imported from commit 14a8352b65859b5a8688a6823404f4a7982403ae)
2012-11-16 17:06:01 -05:00
Tim Abbott f1ccf44c99 add_subscriptions_backend: Check that the argument is a list.
(imported from commit c514dab9fb28dcdaa12b38e7ef028e177f4377fb)
2012-11-16 17:06:01 -05:00
Tim Abbott f5ccde78e3 [manual] Use "subscriptions" for {add,list}_subscriptions consistently.
This change requires a zephyr_mirror deployment when it is pushed to prod.

(imported from commit a31d6efd2db4d4617c7c6b00326be3f07c7263da)
2012-11-16 17:06:01 -05:00
Tim Abbott afc62a8e16 [manual] Uniformize the subscriptions API method names.
This requires a zephyr_mirror deployment when it is pushed to prod.

(imported from commit 6543441fb264b518f8705d7989d068a1d50ce5d6)
2012-11-16 17:06:01 -05:00
Waseem Daher b251d064f9 narrow.js: Add ability to narrow to private messages by name/email.
(imported from commit b3afda6444afa9b44b140882f3d71fb41b3ef10d)
2012-11-16 15:58:49 -05:00
Waseem Daher 77a45cbc0e narrow.js: Add the ability to narrow by stream name.
(imported from commit 033dea1f63cceb30f37eae50ea3a7425a8e94685)
2012-11-16 15:58:37 -05:00
Waseem Daher 162c708bde Add the ability to get more messages by stream name.
(imported from commit 38a2847a9820585a458c651436e3a7ec9256c590)
2012-11-16 15:58:21 -05:00
Keegan McAllister 3494a3ae2a tests/frontend/run: Make waiting for the server less noisy
(imported from commit c62bc23081e76e18de2aeddf45a2e7043deabc2b)
2012-11-16 15:33:38 -05:00
Keegan McAllister 08a43f2f5c Add a tool to run all the test suites
(imported from commit 073f3f0595669ce7c2cc9334e7318bc2856e1e8e)
2012-11-16 15:33:38 -05:00
Keegan McAllister 2a619a0054 tests.py: Allow skipping generate-fixtures with --skip-generate
(imported from commit ca3de89fc5cd71e3a60b173275edf7cf74d65cdf)
2012-11-16 15:33:38 -05:00
Keegan McAllister a2750943e3 Use a custom Django test suite runner
This allows us to define new command-line arguments for 'manage.py test'.

(imported from commit 11cf24694a54a3b717256903b7582ddec9a85587)
2012-11-16 15:33:38 -05:00
Keegan McAllister 172386d9dd tests/frontend/run: Complain if the test server dies
One way this can happen is if run-dev.py --test is already running.  In that
case the one we launch will die with "Address already in use", and we should
alert the user that test results may not be accurate.

(imported from commit 078091cace2cff777b444668b03f96dc208f22fc)
2012-11-16 15:33:37 -05:00
Keegan McAllister 88a76518ec run-dev: Print traceback on exception
We can't rely on the builtin exception printing, because killpg will kill the
process before that happens.

(imported from commit e7db6a39e0549e21653b4a705d2278eb3dc7b2d4)
2012-11-16 15:33:37 -05:00
Keegan McAllister 5d8b66bf33 run-dev: Don't leak servers when we fail to bind to the proxy port
(imported from commit da7cd1f62f3d073bdae6fe72e71f4127931f4d57)
2012-11-16 15:33:37 -05:00
Keegan McAllister 5344c9dcc5 frontend/tests.js: Wait more intelligently to receive messages
(imported from commit 4bd6ad72cbde8f0cb8bdd3b20883d1449435bb29)
2012-11-16 15:33:37 -05:00
Keegan McAllister b8f0599c7c tests/frontend/run: Avoid leaking test server on exception
(imported from commit 4c8ab0db991655a6647bd9861cc2fb95b21c1be4)
2012-11-16 15:33:37 -05:00
Keegan McAllister 0e6ce16172 tests/frontend/run: Wait more intelligently for the server
(imported from commit c3e26d7a85bca85921270d7927c0243df6586a2a)
2012-11-16 15:33:37 -05:00
Keegan McAllister 1ea92c0953 Manage file locking using the 'with' statement
This is clearer and more exception-safe.

(imported from commit b67641b05da9dbf8e5a887f398bac81ab5985cf3)
2012-11-16 13:43:44 -05:00
Keegan McAllister af36b437b6 log_event: Use 'with' for files
(imported from commit d49b46ecd8aa74679ade3820004d10cb42940ad3)
2012-11-16 13:43:44 -05:00
Keegan McAllister ccf14b89c2 log_event: Don't flush the log file right before we close it
There's no need.

(imported from commit 8c3b933b7fddfb858ee4dc201b63b6fe921dc8e9)
2012-11-16 13:43:44 -05:00
Keegan McAllister f132cd311b log_event: Close the lock file after we're done with it
(imported from commit 023e50e1aeeafee334f9b55e12ab91aa84a7872a)
2012-11-16 13:43:44 -05:00
Jessica McKellar 905f2d3235 nagios: add monitoring for the liveness of our users' zephyr mirrors.
Using the check_user_zephyr_mirror_liveness plugin.

(imported from commit c17e112fe8696fab583a0dbc228ea9fb6e6988b0)
2012-11-16 11:36:33 -05:00
Jessica McKellar 5498557b4b nagios: add monitoring for Zephyr mirroring.
Using the check_zephyr_mirror plugin.

(imported from commit 8ef5d4870c3a2ec547729c191de838504cea1d3d)
2012-11-16 11:36:16 -05:00
Jessica McKellar b86ddf4ddc nagios: add a check_user_zephyr_mirror_liveness plugin.
It will alert when our users' mirrors don't appear to be running, as
assessed by having recently made a get_message API request.

(imported from commit 4b8c5f51b007568a90a92f7b095c51f3566d5117)
2012-11-16 11:28:37 -05:00
Jessica McKellar fcf5eb8f1f nagios: add a check_zephyr_mirror plugin.
It checks the output of api/bots/check-mirroring and alerts if we
aren't able to send and receive mirrored Zephyrs.

(imported from commit 6c9abc380fca955d00462f829fa7dcadfef24221)
2012-11-16 11:28:28 -05:00
Jessica McKellar b48671ae43 nagios: print more information on check-mirroring errors.
(imported from commit 6ea149d939ae309745ce8c5b2ab7ae2237007d97)
2012-11-16 11:25:22 -05:00
Jessica McKellar a0aa1b31c8 nagios: Add remote disk and load checks.
(imported from commit 1f0a1f5540212357ac2ed0c8d50fb2291a1812ed)
2012-11-16 11:25:22 -05:00
Jessica McKellar 5ec66f467b nagios: add basic monitoring for new servers, and a hostgroup for SSH-based checks.
(imported from commit 7e5ad2bb024eb935bf6640a894cad762e45c0ab0)
2012-11-16 11:25:14 -05:00
Jessica McKellar 010f15c66e nagios: add a test contact and contact group for testing new alerts.
(imported from commit 9cc1ef2b7af6c84bfd87dc38c6a558ea3b36d267)
2012-11-16 11:24:46 -05:00
Jessica McKellar 609ff161a1 nagios: send the full multi-line alert data in Nagios e-mails.
(imported from commit c906bd2b6a2a1e0f009e4743a0f7b1968f371919)
2012-11-16 11:24:45 -05:00
Waseem Daher bf1d6f4aa4 Don't linewrap the user's full name and ellipsize if it gets too long.
This should address the catherio/tibbetts feedback of the name
breaking oddly across the middle of their name.

One notable change introduced by this commit is: If your name is very
long, e.g., "Waseemio Daherioian", it gets cut off. (On Firefox, it
gets rendered as "Waseemio Daherioia...", and on Chrome it gets no
ellipsis at all.)

The current behavior is that the long name actually overflows into
the main text area, which I think is worse.

(imported from commit 668cb30bc2326c255b229f4f19f29be473bdc1e8)
2012-11-16 11:00:14 -05:00
Waseem Daher 79abd7cb5c Make searchbox shrinking idempotent.
The existing code shortens the searchbox each time it receives focus.
Unfortunately, this means that if it receives focus twice in a row, it
shrinks twice in a row. (For some reason, the '/' hotkey does this).

So, instead, make it idempotent -- if we're already shrunk, don't
shrink us again.

(imported from commit 8179963bbd00822d15d92609d89f572d2de7800c)
2012-11-15 22:13:52 -05:00
Waseem Daher 5fa0b8d9d0 Allow searchbox to grow and shrink more flexibly.
This is nearly perfect, modulo two things:

1. If you have a search active and you resize the window, the search
   box resize doesn't take effect until you exit the search.

2. In super-narrow windows (<380px), the searchbox overshoots
   the message area slightly.

I don't regard either as huge issues -- I'll probably fix #1
eventually.

(imported from commit 4900fb9783cc9f447315b0892bd3505f5c31ce15)
2012-11-15 17:23:00 -05:00
Tim Abbott 50995dc6b7 Fix showing the subscribe-and-send dialogue when you're subscribed.
This doesn't fully fix the problems related to not syncing
subscriptions to browser clients, but it does fix the instance that
everyone experiences.

(imported from commit be2bc31a7c4443c1678321f1a938496e2632c0d3)
2012-11-15 17:15:59 -05:00
Jeff Arnold a68efd9ce2 Handle loading of older messages in narrowed view
(imported from commit 2fe1377736322a44e8682c69dd5e4312d5f46ca4)
2012-11-15 16:32:00 -05:00
Tim Abbott b8f65fb8aa review: Fix review with new to: sending.
(imported from commit 67f588afbc6ec6556d31827c8c9495fbaa59fadf)
2012-11-15 16:27:05 -05:00
Tim Abbott 2ed1917a10 api_get_old_messages: Use @has_request_variables.
(imported from commit 98862197e7b2f57e64ac4d906251cb81f582f5d1)
2012-11-15 15:39:14 -05:00
Tim Abbott 00cd30ff97 Use @has_request_variables in json_remove_subscription.
(imported from commit b08b7672959f8773db1ff7e40b53648926b47a09)
2012-11-15 15:39:14 -05:00
Tim Abbott 1c0832583c send_message_backend: Use POST() for the forged variable.
(imported from commit f2ca2a1adf1c71aa2e92e13a5f9396dfb091a8ef)
2012-11-15 15:39:14 -05:00
Tim Abbott 5467678a2e send_message_backend: Return error on messages with no recipients.
(imported from commit 4cf9bac8eb6e35dde0510afe4efb8ba70c86b566)
2012-11-15 15:39:14 -05:00
Tim Abbott 17f55441b5 Filter out empty string recipients in extract_recipients.
(imported from commit 0a4168e36ea2fe40bde281d2690adcf40bb15abe)
2012-11-15 15:39:08 -05:00