Commit Graph

4630 Commits

Author SHA1 Message Date
acrefoot b20eb5621f [api version bump] Update API documentation in the example scripts
Give better examples, and rewrite options parsing to be more consistent across examples.
Make it more obvious that you can use "--user" and "--api-key" with our python examples.

This bumps our python bindings to v0.1.9

(imported from commit 297468088f864b7d585e567dc45523ea681f1856)
2013-06-05 17:34:41 -04:00
acrefoot d021aebf54 Update API Docs to talk about Bots and how to create them
Since we've made it easy to use bots instead of creating entirely new user accounts
for things which act as bots, we've needed to update the documentation. This commit covers
the static html documentation we have on humbug's API.

(imported from commit 4ddbf0331588b0f463a9920b4cd363b68e811ca5)
2013-06-05 17:17:00 -04:00
Waseem Daher a58876e733 Make all "a"s have cursor: pointer by default.
In specific, this solves the problem of the links in the stream
"right-click menu" not having the little hand icon, uncovered
in our last usability study.

But even better, it also sets a more sane default -- if you're
an "a" and you *don't* want the hand, you have to explicitly
remove it.

(imported from commit 38c0b42f3b7fd5b2b3dff99e8c4c4a2e8aa62833)
2013-06-05 17:08:00 -04:00
Leo Franchi 72295b0c15 Fix case where redis-py returns an int instead of a string from TTL
(imported from commit ad1d9b43e4776cd6ce0c51573799767b2cf9bd96)
2013-06-05 16:56:25 -04:00
Leo Franchi 21b1090f39 Warn if TTL of redis key is -1
(imported from commit f44ccef6dee190f531537fc8f3af9354c737a17f)
2013-06-05 16:49:30 -04:00
Leo Franchi b815d7ea83 Properly calculate expiry of keys we add to Redis
(imported from commit 42fda34ed1cd1eb9411defa1c0cbf53ef0de7a7b)
2013-06-05 16:49:30 -04:00
Tim Abbott a2a696dacf Add unread counts to the user sidebar.
Because of spacing issues in the right sidebar, the unread counts
appear to the left of the person's name, not the right.

It's kinda awesome that this is only 20 lines of code.

(imported from commit f5a4ea27bc4cd2e8157746ce7524a600b638930b)
2013-06-05 16:44:49 -04:00
Zev Benjamin 8884e81bb3 Move the current deployment symlink in restart-server
This will help minimize downtime.

(imported from commit 47fb66f0d2e21fc12f62c69b7c59ca6828553309)
2013-06-05 16:33:43 -04:00
Zev Benjamin 300e57fcbd Fill memcached caches synchronously before restarting the server
(imported from commit a45fa845e94a1fc6e96a1aafca31e9a6fc2b7526)
2013-06-05 16:33:43 -04:00
Zev Benjamin 2f7f0da27f Use a per-deployment memcached key prefix
Some cache keys used by Django (like sessions) will not have the key
prefixes, but those values shouldn't change across most restarts.

(imported from commit 2fe61028111fe9d5700432214a611b3341412654)
2013-06-05 16:33:43 -04:00
Zev Benjamin 826b895a2c Avoid using djcache directly
(imported from commit 2a8f0135c7e31ecc30628420e521c8f708c656c5)
2013-06-05 16:33:43 -04:00
acrefoot 8447174325 Make testing message appear on its own line in code reviews
(imported from commit 5d37c7dc51723d08aac7d12fa71e9d7da0f3f62c)
2013-06-05 15:38:16 -04:00
acrefoot 38991a065b Update .gitignore for Kdevelop users
(imported from commit 9bc470f017b4e1e58f3297ce1f3d4a9a2950b921)
2013-06-05 15:38:16 -04:00
Zev Benjamin f38fb33388 Lighten edit diff colors
(imported from commit a2f5778890cbc031f1b95f55a91689e5ee5332e3)
2013-06-05 14:26:46 -04:00
Steve Howell 8be0ea972a Cosmetic: move function up in file.
This just moves keep_pointer_in_view() to be adjacent to recenter_view()
in the file.

(imported from commit 27056e2a949ffef262ac21130436f7303fd2935f)
2013-06-05 13:50:02 -04:00
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