Commit Graph

5225 Commits

Author SHA1 Message Date
Scott Feeney f06c0fbdc8 Only focus textbox if streams page opened directly
If you click on "Streams" from the gear menu, we want to focus the
textbox to create a new stream. But if the Streams page is brought up
programmatically (e.g. to jump to a specific stream's settings), this
commit makes it not focus the textbox.

(imported from commit 900bdafb701180eac1d284120a91ea2a84d7177b)
2013-06-19 18:31:06 -04:00
Scott Feeney a7eaddefa5 Fix race condition for sidebar "Stream settings"
The sidebar link now uses a one-time event handler for a custom event,
subs_page_loaded.zephyr. If the streams page is already open, we can't
rely on the event so we expand the stream in question immediately.

(imported from commit 3c22e1791d238a3be4a73edcfb5456e392cee608)
2013-06-19 18:31:05 -04:00
Allen Rabinovich adaf5e502a A dark header with a more compact search field and no message composition buttons in responsive view
Removing dead CSS code, loading a bigger gravatar for Retina displays

(imported from commit 0feb79b46b0c275d4a220a4dec733584e0204023)
2013-06-19 15:23:52 -07:00
Steve Howell b896c587e2 Extracted S3-related code to lib/upload.py
(imported from commit 4f0b0012b89d21b3bd445a2a6f84f3de72190e13)
2013-06-19 18:10:45 -04:00
Steve Howell b055698317 Work around possible jQuery issue in building buddy list.
(imported from commit 17ad22f0bb3b30333cb9675cb710b9b5e2141198)
2013-06-19 16:35:35 -04:00
Zev Benjamin 418c8c2deb viewport.js: Use its own proxy functions internally instead of directly calling $(window) methods
(imported from commit 89e90d30ee41b63f1f8ca7e3d0d92b682a97583d)
2013-06-19 16:35:35 -04:00
Zev Benjamin 338a0fb4ce Reduce code duplication in viewport.js
This also gets rid of an inconsistency in the use of jwindow vs. $(window).

(imported from commit a42e47ef0dd9eaf9aaa4d4e2eedb466d77ec3385)
2013-06-19 16:35:35 -04:00
Luke Faraone 7b75dd9cc4 Use different mechanism to determine the running user
Per http://docs.python.org/2/library/os.html#os.getlogin, getlogin()
only works when you have an associated controlling tty.

This script didn't work previously because when we do deployments there
is no tty. Thus, we switch to the alternative mechanism for determining
the current username described on the page linked above.

(imported from commit 1dbcf98fd7248d20e501fd7fb22e1dbd306040fd)
2013-06-19 16:35:35 -04:00
Luke Faraone df1211e6af Make restart-server refuse to run if non-Humbug user on deployment
If you're running this as a user other than "humbug" on a deployed server,
you're going to have a bad time.

Specifically, memcached won't work, and other undefined behaviour may
occur.

So here we add a check and error out if you run this script on an
app_frontend as non-"humbug".

(imported from commit a3d5f0f58ded42393c03f4d21b4650494fae418f)
2013-06-19 08:32:59 -07:00
Steve Howell 2b320f8d57 Allow user to upload an image for their bot's avatar (back end).
(imported from commit 34833b61b935f4eec2b23abbb3532aaa58e13fb6)
2013-06-19 10:21:20 -04:00
Scott Feeney scott@humbughq.com 42d2c40464 Add link to stream settings from sidebar popover
(Trac #1375)

(imported from commit 92fdbc9906f1394f3ae484a91919226224f43631)
2013-06-18 18:03:38 -04:00
Scott Feeney scott@humbughq.com 0119423d27 Make a code comment clearer (subscription settings)
(imported from commit 085cdc43371fbdf9b0e93f7de13bda9264e41c92)
2013-06-18 18:03:38 -04:00
Kevin Mehall 9322e63d32 Refactor typeahead for user names (PM and @reply).
Get data directly from the main user list, rather than maintaining a
separate list just for autocomplete.

Fixes trac #1362 -- Does not depend on historical messages, so
will do the correct autocomplete after a single reload.

(imported from commit 6b35a709dba3384530082e8cfacf0151f9e0eb26)
2013-06-18 17:52:39 -04:00
Kevin Mehall fbed3e23a8 [third] Patch bootstrap-typeahead to handle objects that aren't strings.
Based on https://github.com/twitter/bootstrap/issues/6579. Doesn't
look like upstream is going to fix that or its 6 duplicates any
time soon.

(imported from commit b3e887d929cc42124aeb1f13abd7503f38f92a1f)
2013-06-18 17:52:39 -04:00
Scott Feeney scott@humbughq.com 0fde644417 Fix typos in "No ~/.humbugrc found" error message
(imported from commit b0c8aab4668751d9b1d12792d249645498a95932)
2013-06-18 17:47:03 -04:00
Waseem Daher 5863b0e965 integrations: Typo fix.
(imported from commit 340e26bda84c4109f3cae0d92b2c82d612d3dc59)
2013-06-18 17:22:22 -04:00
Luke Faraone 6bd3886406 Don't pass along client locale settings when sshing in to our servers
(imported from commit d25f2a47b60c1ac7e4dcbd4a0133d0c0c9698b4e)
2013-06-18 17:20:48 -04:00
Zev Benjamin dd939ed7fe Disable the collection of metrics when not deployed
We were using up a lot of events in our dev environments.

(imported from commit 8413ecfa835cce0a231bdf437f37ad8cf12a9133)
2013-06-18 17:07:36 -04:00
Zev Benjamin 80702ccaa0 Add metrics variables to the template context via a context processor
Wrapping render_to_response never actually worked correctly.  On the
login page, mixpanel_token would be missing, but we wouldn't get an
error because it is surrounded by double quotes, which meant that it
was still valid Javascript.

(imported from commit 820ee42fab8f679983e5a3a4309a2feaf690f20f)
2013-06-18 17:07:36 -04:00
Zev Benjamin aff42f0c73 Revert "Add a bunch of debugging support for mixpanel"
This reverts commit c5050f66d985eb76e38117b2668594fedfc10702.

(imported from commit ea1c92f73e8fd4ce2816e7af94b5d3a55edc8a7e)
2013-06-18 17:07:36 -04:00
Zev Benjamin 22a6cd3dd7 Send mixpanel events on window resize and page load about the window size
(imported from commit 9c2859513af52510802da4eb94496d54625775f2)
2013-06-18 17:07:36 -04:00
Zev Benjamin c9bf69189a Use mixpanel.register to reduce code repetition
(imported from commit 13ac43ce4a5539ce8accb5315bc28e7ad872435c)
2013-06-18 17:07:36 -04:00
Zev Benjamin 94daecd039 Send only 10% of the events we generate to mixpanel
(imported from commit f5b1b68f81346a90998a8ab6e789151b0e55dba1)
2013-06-18 17:07:36 -04:00
Zev Benjamin 08097d6788 Don't always claim that the application has been updated when reloading
I don't love the default reloading message, but I'm not sure how to
tell the user why we need to reload in several cases.

(imported from commit 5f2eecdb0d83f31bd60673b247e8aac8f08ce20f)
2013-06-18 16:36:02 -04:00
Zev Benjamin eb62a31bb8 Use a different error message for get_events and get_old_messages
(imported from commit 191f46b482d0bf4adf60967cdfebb0d7dbcf82f8)
2013-06-18 16:36:02 -04:00
Leo Franchi 23322a791d puppet: Add sparkle configuration files
(imported from commit e36efd64584d946bb13fb5b44af817e85345e197)
2013-06-18 16:12:14 -04:00
Leo Franchi 7705400de2 Properly set stream highlight when toggling in home view
(imported from commit 2aa810f5ca0eb8d62bcf87dc93608c56cf4956f3)
2013-06-18 16:05:23 -04:00
Steve Howell a46a371677 DRY up sent-by-me checks with messages.sent_by_me.
This is a pure refactoring.  We set messages.sent_by_me inside
add_message_metadata(), which gets called early in a message's
lifetime.

(imported from commit 2f6270f92ecdf0e4a64401030f86d89a8fb7be2e)
2013-06-18 16:01:09 -04:00
Steve Howell 943a29dc34 Show correct avatar for desktop notifications.
This updates desktop notifications to use avatar_url from the
server (in case users have uploaded their own avatar).  It
also removes the unneeded stamp parameter from the URL, and
it unifies URL handling with message_list.

(imported from commit 6bb43a25c01cc3d26f30fc167780a477d1c5d023)
2013-06-18 16:01:09 -04:00
Waseem Daher 67ac671b74 Remove composebox help text.
Right now, the text can sort of visually collide with new messages.
Also, the text is really only of benefit to total novices; you
learn it once and then those 15px are ~forever useless to you.

(imported from commit 93915fc854c1b801de0fb6654f014b6c7f2edc08)
2013-06-18 15:44:03 -04:00
Tim Abbott 5c1dda5e31 generate-activity-metrics: Use a long time horizon.
Now that we have more than a month worth of data, it's nice to
actually just display it all.

(imported from commit f2ec027af81699d6937e52b18ac40973a54c349b)
2013-06-18 14:59:07 -04:00
Tim Abbott 49a26b9c75 api: Don't require 'https://' in site option.
The --site= option is really only for internal developer use, so I
don't think we gain anything from being strict about it.

(And it doesn't help that the error message one gets pre-this-patch is
super confusing).  Fixes Trac #937.

(imported from commit 8d699982aa6830f9eae2bccd6d0c7a1e0e53dd56)
2013-06-18 14:59:07 -04:00
Kevin Mehall 6106f8008a Refactor variable names in fading code.
(imported from commit 25e2240f30d86f98d50c36302afbfef43fb4a60e)
2013-06-18 10:40:07 -04:00
Kevin Mehall 97754b3641 Optmimize and simplify update_faded_messages().
Trigger a repaint only on the messages that change fade state,
rather than repainting all messages.

(imported from commit d3a225448c004a4b467e51ceb97fda06a7a6f04b)
2013-06-18 10:06:58 -04:00
Kevin Mehall dc6dd71658 When fading tests for matching messages, normalize huddle lists
(imported from commit 805e62c1a57e754c225b743c7d801d8b33da5ed4)
2013-06-18 10:06:58 -04:00
Kevin Mehall b1b4c1a625 Update fade on every change to recipient fields. Trac #1261.
(imported from commit 2b966765bef3e7e4d8cd2ee6ad55a05ba1f23ab2)
2013-06-18 10:06:58 -04:00
Leo Franchi 2795b362a8 Complete subscription list with any missing subscribed streams
(imported from commit c433a921465af7422d481d6aaf7b0d2fc732a8fe)
2013-06-17 15:26:53 -04:00
Tim Abbott c824901e2e Load fewer messages from the server when narrowing.
This should substantially improve narrowing performance, while still
delivering enough messages that one should only need to contact the
server again if the user scrolls up a significant distance.

(imported from commit 2b0af0e5b9d3a449e7f195a87d57d517b47f0b3a)
2013-06-17 13:48:06 -04:00
Tim Abbott c3b4ab0f02 puppet: Move nagios homedir to /var/lib/nagios.
That's where it is supposed to be, and besides, that's what a Nagios
server is going to expect it to be.

(imported from commit c273f18533909fa8eac182246dbbe498a5381f6c)
2013-06-17 13:48:06 -04:00
Tim Abbott 261300d10e puppet: Add Nagios crontab to puppet.
(imported from commit 353b167b303b27ccbfc0cd0130665399faab80dc)
2013-06-17 13:48:06 -04:00
Tim Abbott 83016e501b puppet: Complete several more of our nagios TODOs.
(imported from commit 239cbe1606cc077119b65b3dc18b519b09b021a4)
2013-06-17 13:48:06 -04:00
Tim Abbott d3d5334a55 puppet: Import pagerduty_nagios.pl into puppet.
(imported from commit 1b91524498372d3e69f07468e4635c4d66c44d85)
2013-06-17 13:48:06 -04:00
Tim Abbott caafb405d7 puppet: Finish puppetizing git/wiki configuration.
(imported from commit 423083269cea7b23f8b5805561919b9c6b9a8f4d)
2013-06-17 13:48:06 -04:00
Tim Abbott 5c388ed28e puppet: Run our wiki out of supervisord.
(imported from commit a8f6d14ce55de0e7458496f9debb15529120deaf)
2013-06-17 13:48:06 -04:00
Tim Abbott 1bf4a36ac1 puppet: Clean up organization in base.pp a bit.
(imported from commit 2be403981f94b440f9b999d7b8a36a0ec0cedcb7)
2013-06-17 13:48:06 -04:00
Tim Abbott 91933a2004 puppet: Move configuring supervisor into its own module.
(imported from commit b2ad9bc5c5d6bde78380b0537696ed26cab8c264)
2013-06-17 13:48:06 -04:00
Tim Abbott 4d31e5d79e puppet: Increase memcached memory limit to 512MB.
(imported from commit 152c2545a3337fb1d6794a41c63c4d0b148adecc)
2013-06-17 13:48:05 -04:00
Tim Abbott 9e2d17ff9e puppet: Add uid/gid for Nagios user.
It turns out that having a UID for one user that's 1000, and not
setting them for other users, is a disaster: puppet might create them
in the wrong order, using UID 1000, and thus breaking creating the
'humbug' user later on.  The same issue applies to groups.

(imported from commit 02b4700278e5c495bd514802f41ae238e6b051ac)
2013-06-17 13:48:05 -04:00
Tim Abbott 5e41bab681 puppet: Fix iptables-persistent always being restarted.
(imported from commit 5246be11dbbba3b9fee4be0477eb08525575577e)
2013-06-17 13:48:03 -04:00
Steve Howell 438e412772 Hide more things when you "close" the compose box.
This change backs off from the always-open-compose-box paradigm,
so that when a user "closes" the compose box, they can no longer
type text, attach files, etc., and instead, they have buttons
to reopen the compose box.

(This change does not affect the feature that when you're in reply
mode, the compose box stays open.)

(imported from commit 32305d5b35f457a83f126a2265defdd98e885a2b)
2013-06-17 10:21:49 -04:00