Commit Graph

4965 Commits

Author SHA1 Message Date
Steve Howell 042cd8f222 Handle large/gigantic messages when recentering.
(imported from commit d57e702f504a9a3e6b7049a19217671902df4ab7)
2013-06-05 13:50:01 -04:00
Steve Howell 4c8a293750 Scroll more like barnowl again. (but closer to the edges)
We are moving back to a barnowl-ish scrolling algorithm for
the arrow keys, where when you have a message selected toward
the bottom of the screen, hitting down arrow and up arrow
effectively puts the originally selected message at the center
of the screen.  In order to avoid unnecessary scrolls, we
are making it so that you can move the pointer closer to the
edges.

(imported from commit c08233d6d2034a04469b8f424b39d94a230cafe0)
2013-06-05 13:50:01 -04:00
Leo Franchi 92256ab48f Add a TESTING_DEPLOYED settings key, and don't send stats for it
(imported from commit cd73317814a240f7df180f546a9eb6937bb368bb)
2013-06-05 12:57:47 -04:00
Leo Franchi 5a8cc44ba8 Don't autoselect all users in create stream listing
(imported from commit dae00c632d860386255d063db295d707b396b18a)
2013-06-05 12:57:47 -04:00
Leo Franchi b5cadeca73 Backport bootstrap-typeahead click fix to make clicking on autocomplete more reliable
This is the patch described here:

https://github.com/twitter/bootstrap/issues/2715
92189b87ad

That commit has not been upstreamed to bootstrap due to bureaucracy issues.

(imported from commit 3c4a109b58f403569a41f5048ab347a800f029c2)
2013-06-05 12:02:08 -04:00
Tim Abbott 74f70f3915 generate-activity-metrics: Display by-week usage numbers changes.
(imported from commit 22bc1592c35c5f86ab89f7f4fc14ba7dbd2375db)
2013-06-05 10:24:23 -04:00
Tim Abbott 42ddabf91a Do only one bucket, as specified on command line.
(imported from commit 4ca4f9609a01a6cfedc55efdbe2423673bbe4904)
2013-06-05 10:24:23 -04:00
Tim Abbott 6f38feca05 Change display format for metrics
(imported from commit eb87f1958fd52098d8bdcf205efc95cdaad56787)
2013-06-05 10:24:23 -04:00
Leo Franchi b6a3446b62 Refactor to use wildcard/exclusion for all
(imported from commit 2874361aef2cbc14a3047f964eb584f27a29323c)
2013-06-05 10:24:23 -04:00
Tim Abbott 5f86ed92f3 generate-activity-metrics: Add support for specifying realm.
(imported from commit 09e2adb6ae8d9fb0a140fbbe9a0f1272e2aa81a7)
2013-06-05 10:24:23 -04:00
Tim Abbott 6425a894f5 generate-activity-metrics: Fix import issues.
(imported from commit a8dd3690200ea42616301adc29d136e7554f45df)
2013-06-05 10:24:23 -04:00
Leo Franchi 113180b7b7 nagios: Don't page about load/disk/ levels on non-critical servers.
Add a pageable_servers and not_pageable_servers hostgroup, and only page for
app/postgres/zmirror.

(imported from commit 15c286324e942bd38e2a600a3b9091044f117e28)
2013-06-05 10:20:56 -04:00
Steve Howell c7ab489260 Remove dead code in notifications_bar.
I removed references to the following:
    on_custom
    custom_message
    current_message
    show_custom_message()
    clear_customer_message()

(They were not being used anywhere.)  Also, show() does not
receive a msg parameter any more.

(imported from commit 8ec347b40fc9fa582317d68e85c98258cf3fba2f)
2013-06-05 09:35:21 -04:00
Tim Abbott a130882ebb Document @-notifications in our markdown docs.
This is a little lame, but I think it's better than nothing.

(imported from commit 895bed89304524d272d6f0a5a51b479b6f2a872a)
2013-06-05 09:29:27 -04:00
Tim Abbott 34e2edb220 Change tutorial instructions for how to reply.
(imported from commit 5204ff60763da990ea27d572adb6810324c0d764)
2013-06-05 09:29:27 -04:00
Tim Abbott e2973d9181 Put the formatting that one wants to create in left column of help page.
In general it seems like the more intuitive way to organize this table
-- you're going to be first find the formatting you're trying to make
visually, and then look across to find its syntax, not the other way
around.

(imported from commit 59c932a8763d1d532e896903f597d7c0193b5de9)
2013-06-05 09:29:27 -04:00
Tim Abbott c609d347b7 puppet: Move python-requests to base.pp.
It's needed to use the Humbug API, which most of our machines end up
using anyway.

(imported from commit 95a3317ab25632007deaadf74da5bec175641d27)
2013-06-04 19:48:40 -04:00
Tim Abbott d3ad2cd1d4 puppet: Deploy Nagios configuration via Puppet.
(imported from commit ef4c2fb9188bab406b7e677cbe3d0c2b1527a4c4)
2013-06-04 19:48:13 -04:00
Tim Abbott efcf88a707 puppet: Fix paths in feedback-bot configuration.
(imported from commit e9407af884dc75490de5168e067453e77aa612d7)
2013-06-04 19:48:13 -04:00
Tim Abbott 0c78bb87fa puppet: Add tool to call puppet apply for the current machine type.
(imported from commit 995f32d3daed69f8fc01e950f7c40fc71cdad684)
2013-06-04 19:48:13 -04:00
Tim Abbott b64af68d6a puppet: Fix key name for the Humbug ops key.
(imported from commit 9647603e4b0ec91411be029dc08c558dfd7ed8f4)
2013-06-04 19:48:13 -04:00
Tim Abbott cd65aea287 Add our trac configuration to puppet.
(imported from commit 8a9cf825344cdf83e8233f15ba66bbf050c920e4)
2013-06-04 19:48:13 -04:00
Zev Benjamin 4bf3cf1c67 Fix whitespace
(imported from commit 27ad5cda6ce439f81fb0ab231ef43303f2d70736)
2013-06-04 19:33:20 -04:00
Tim Abbott 0378c43dc6 update-deployment: Move Schema change detected to post-receive.
Since update-deployment is run on the host being deployed to and only
has access to a recent clone of the git repository, it doesn't
necessarily have the old refs available for reverts.

(imported from commit 3652f58a7b165c805822bf6d8a4f0792c629e28e)
2013-06-04 18:42:00 -04:00
Tim Abbott 795173ac86 update-deployment: Move color codes to humbug_tools.py.
(imported from commit 96a79a699ea032714b24aa6572fd188433b979a8)
2013-06-04 18:42:00 -04:00
Zev Benjamin 5a1f036db3 Use Diff Match Patch instead of difflib for HTML diffing
Diff Match Patch provides more human-readable diffs.  For example,
try replacing "mouse" with "sofas".

(imported from commit 7ced81202ce85d5ef69888c59912e3e44c38cfc8)
2013-06-04 18:18:36 -04:00
Zev Benjamin 1af0d5b942 [manual] Add Diff Match Patch dependency
(imported from commit 808a83f4326ed88a09321e0f7ca647c956a5af32)
2013-06-04 18:18:33 -04:00
Zev Benjamin 3325554c03 Fix app_frontend.pp whitespace
(imported from commit ecbdd52b00d67569fc907b05ccd2c903e65141c4)
2013-06-04 18:17:44 -04:00
Zev Benjamin 0c20f48636 Show changes to edited messages using color highlighting
I didn't use red and green for fear of it not being visible to
color-blind users.  We may need to tweak the colors.

(imported from commit 59c4f1dac549a248783e4c3b3ec472d8cb690df5)
2013-06-04 18:15:45 -04:00
Zev Benjamin df53f54cbd Add library to diff HTML fragments and mark changes
I would really like to parse the HTML we produce from the library to
ensure that we don't generate malformed-HTML.  This is unfortunately
hard because we both want pretty strict parsing and we want to parse
html5 fragments.  For now, we just do a basic sanity check.

We also may want to switch to Google Diff-Match-Patch, as that can
clean up the resulting diffs.

(imported from commit 3772f92135cfd7423c335335f861f2c11462a8db)
2013-06-04 18:15:45 -04:00
Zev Benjamin 835dd6673a Only reselect the selected message on rerender if it's not -1
We could get into this situation when someone is doing a search and
someone else edits a message while the results are still loading.

(imported from commit 99e371fd75c7ae7dc98a0c03bc434e434da44b94)
2013-06-04 16:21:56 -04:00
Zev Benjamin 1d2c1a00bc Improve error reporting for trying to select an unknown message
(imported from commit 4fdc09d11e35eeed2510de6668d5a982c915f8c0)
2013-06-04 16:21:56 -04:00
Tim Abbott b753eb0c1e [manual] Include the events API in the API tarballs.
Previously our receive API bindings were broken in our API tarballs
because we weren't including the receive API bindings which they used.

This requires our deploying the built API tarball to the prod server
when we deploy it so that the link on /api isn't broken.

(imported from commit 14ecaab34556f4e29c72f4f567d8af73c89d6297)
2013-06-04 15:53:36 -04:00
Zev Benjamin d95ea89f54 Fix a "can't read property 'id' of undefined" user error
`current_msg_list.get(id)` and `rows.get(id,
current_msg_list.table_name)` are not interchangable in terms of
checking for whether we have a message.  The former checks whether
the message is in the current message list while the latter checks
whether the message is in the current message list and currently
rendered.  `message_edit.end` only operates on rendered messages.

(imported from commit 203ee612bfd0aa94571dde9b601e948b3c6f6cbb)
2013-06-04 15:39:51 -04:00
Zev Benjamin 6bd61f458d Don't throw an exception if someone edits a very old message
Previously, if you didn't have a message that someone else had edited
in your message list, you would get an exception because we weren't
checking whether we actually had the message or not.

(imported from commit 33a5c6e7fe95b5397a32df5c7b5f6714d71e1e5f)
2013-06-04 15:38:42 -04:00
Leo Franchi 23b4ad3b02 Add a redis_check management command
(imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)
2013-06-04 09:43:09 -04:00
Leo Franchi 0b5b1dafc4 Add a rate limiting system to our backend
(imported from commit a1218618918b4dedc77307e2f277665e7dd8fa22)
2013-06-04 09:43:09 -04:00
Leo Franchi 4b2a2d01e6 [schema] Add a rate_limits column on UserProfile
(imported from commit 3682212d91ce5a91cc2e7d5611da0265518cf18a)
2013-06-04 09:43:09 -04:00
Leo Franchi 8cc0a9b4f9 [manual] Require redis-server to be installed on our servers
This requires `redis-server` to be installed. Check it is installed before
deploying this commit. It also requires 'python-redis' to be installed.

(imported from commit e3434a04456e596f6c84c1a3c289a00aa7cbb2ed)
2013-06-04 09:43:09 -04:00
Zev Benjamin 17f9a68b73 Fix the most recent round of jQuery validator errors
The malformed HTML caused the bots and user API key forms to be
merged.  When the user clicked the "Show your API key" button, a
form-related event gets triggered, which jquery.validate tries to
handle.  When it does so, it ends up throwing an exception because
the form element involved in the event does not have an associated
validator object attached to it.

(imported from commit 26100a443603dc8a6cc23b9f3e825632149faf7f)
2013-06-03 17:20:42 -04:00
Leo Franchi f9a99192df Add supervisor conf file for stats
(imported from commit e9104676e714dc36050fef50cabe8386b6c52e4d)
2013-06-03 16:16:22 -04:00
Luke Faraone a73e86cd9f Keep the desktop client updated as to the app's new message count.
(imported from commit c8deb2a773ee5c82f9d2decdced936f2f18dd4e0)
2013-06-03 13:10:25 -07:00
Luke Faraone c5d3ca0247 Send notifications over the JS→C++ bridge if it exists.
When determining if desktop notifications are enabled, we can check whether
there is a "window.bridge" element.

Now when it comes time to actually send out notifications, we can just test
again for the existence of "window.bridge" and if so, shunt the data over
it.

(imported from commit 8104c91ea9da7bc485c86a3c21edc88905d2f47b)
2013-06-03 13:10:18 -07:00
Steve Howell 3ee4161ace Allow pointer in more places.
Before this fix, the code would restrict the pointer to be above
either the 1/2 mark or 2/3 mark of the page, depending on your
scrolling direction.  This fix makes it so that the system leaves
your scroll and pointer alone when between the 1/5 mark and 4/5
mark.  This means the user can read more messages on the screen
at a time before getting paginated.

(imported from commit 98f6319bf63181dd331e037ac20a0c15518725ea)
2013-06-03 11:04:01 -04:00
Steve Howell 40ce4e0acc Streamline recentering code.
When you make a call to set_message_position(), you already
know that the pointer is gonna be onscreen, so set the flag
to suppress scroll pointer updates.  This should be faster and
also avoid future confusing bugs where recenter_view() and
keep_pointer_in_view() run for the same event.

(Both callers to recenter_view pass in the selected message,
and then the calls to set_message_position() set the scrollTop
so that the selected message shows onscreen.)

(imported from commit f1a6f189b7899b280a6316ea7eb03f015d3d4ae3)
2013-06-03 10:41:04 -04:00
Jessica McKellar a63b0e31a7 Say if a realm is open in the internal signups Humbug.
(imported from commit 5745f3b2fbfbbdc2681628ef1ccb637cc1abb9f3)
2013-06-02 15:12:28 -04:00
Jessica McKellar 79d494282d Use a case-insensitive wrapper around retrieving a realm by its domain.
We were previously able to create realms for different casings of the
same domain.

(imported from commit c13a86c9eb9fb4934bebcda7a578e2a071dd1962)
2013-06-02 15:12:28 -04:00
Jessica McKellar 83a8ed048f Remove unused imports in zephyr/lib/.
(imported from commit 54fa64f34d29ede939d18f3834249b7bff4490e5)
2013-06-02 15:12:27 -04:00
Jessica McKellar bd5bc4fcf7 create_realm: be able to specify an open realm.
(imported from commit 227b89c51c45b2a3fcd343b2a6a986f5212c1b9c)
2013-06-02 15:12:27 -04:00
Jessica McKellar 048a53c1ce Make do_create_realm aware of restricted_to_domain.
(imported from commit bee8d79cd5f5d4165e2a573eb3a91123857be6cd)
2013-06-02 15:12:27 -04:00