Reid Barton
f48e875d13
api: Pass along --site in init_from_options
...
(imported from commit a893c098b92690214a90a572ab54504d93da29e6)
2012-12-14 16:15:39 -05:00
Zev Benjamin
103eb5130d
Authenticate to Postgres with client certificates and check the server's certificate
...
(imported from commit a3be2178d7675d409d81b9119815ac1f680d1388)
2012-12-14 11:38:18 -05:00
Tim Abbott
ce40de14c9
Add a tool to save/restore user passwords.
...
(imported from commit 59bea04308bc0c42aeef840aa923dbef1919d31d)
2012-12-13 17:10:03 -05:00
Tim Abbott
434765d810
populate_db: Close database connections before shutting down.
...
This avoids some messages being logged by the postgres server.
(imported from commit 86aaa025a36dad6ec14d49b629cfb1ec326f929c)
2012-12-13 17:09:35 -05:00
Tim Abbott
e330be7fc1
dump_pointers: Use timestamps, not IDs, for transmitting the pointer.
...
(imported from commit 9b51b9edc5b0bdfb2305c12a123d554811ec9e06)
2012-12-13 17:09:35 -05:00
Tim Abbott
bda420a0f9
Fix email case issues when restoring user pointers.
...
(imported from commit 84d3288dffc1cb010d8cd2a749fe71aa2a4d0df3)
2012-12-13 17:09:34 -05:00
Tim Abbott
899cbabe23
populate_db: Make some more bits of memory possible for Python to free.
...
(imported from commit 2d8184d05f622475ffab1043a40251644a88c230)
2012-12-13 17:09:34 -05:00
Tim Abbott
cfc3781841
populate_db: Fix StreamColor restore.
...
Previously, the StreamColor restore code didn't properly account for
the fact that most user subscriptions were in pending_subs and thus
not yet in the database.
(imported from commit 2e28c5a68aa045494b9336d7114c23f5c3706c28)
2012-12-13 17:09:34 -05:00
Tim Abbott
7707690231
Decrease memory usage in bulk_create for UserMessage objects.
...
By processing UserMessage objects in batches as we go, this avoids
consuming a large amount of memory that is linear in the size of the
messages log.
(imported from commit 0c42d97f0863da9c079836c60bebcbaeec59f849)
2012-12-13 17:09:34 -05:00
Tim Abbott
9811050a4f
views: Add json_to_list and use it and json_to_dict more.
...
(imported from commit a6fdc85edb8066eab7ca7cfa5f6f5fdf53b10a8c)
2012-12-13 16:39:58 -05:00
Tim Abbott
2280e4a58a
Rename from_json_to_dict to json_to_dict.
...
(imported from commit a96d29c5e9a700c54a29a8777d7a1e5a4ccbd77d)
2012-12-13 16:39:58 -05:00
Waseem Daher
7de057dcb0
Remove unescaped use of stream name in subscriptions page.
...
This was causing issues with our ability to unsubscribe from
streams with " in their names.
The solution here is a bit hacky, since it depends on the JavaScript
being fairly aware of the layout of the DOM, which is not great.
But it works.
This fixes Trac #328 .
(imported from commit a1b6c8e1f3a9daacdc48920a195717aa89b3a9a9)
2012-12-13 15:46:30 -05:00
Waseem Daher
858d638960
Make subscriptions page slightly more robust to weird characters.
...
This fixes Trac #522 , which previously prevented you from
subscribing to a stream named
'"]'); alert('hi');
This does not fix #328 , which is that you can't unsubscribe
from 'Waseem', among other things.
(imported from commit 869063cafa9e7e988aea993d072ca1ad880bcee1)
2012-12-13 15:46:30 -05:00
Waseem Daher
622bcb9ef4
Call the colorpicker drawing code just once, rather than in a tight loop.
...
Unfortunately, this doesn't actually give us much performance gain
either; it's not really the calls to 'find' that are taking any time.
But I do find this a little cleaner as well.
Simply initializing 100 colorpickers with our options takes about 700ms.
Initializing ~100 colorpickers with the total default set of options
shaves that down to about 300-400ms (though obviously doesn't quite
achieve what we want).
(imported from commit 7084b35fb6e77600edfcdcfcc2761a11e6f38c03)
2012-12-13 15:46:30 -05:00
Waseem Daher
cd237c3429
Smarter template invocation on settings page.
...
Rather than calling the template generating code once per
subscription, let's just do it in a batch when possible.
With about 100 subscriptions, the "fetch" call takes about 800ms to
render (while testing locally) both before and after this change,
which is somewhat disappointing.
But this *is* cleaner!
(imported from commit 9ba8819524da86c00a2508349be0ea0ddd48606b)
2012-12-13 15:46:30 -05:00
Tim Abbott
e7b74060d2
Log password change events via the password reset feature.
...
(imported from commit bbec7074229e8779c81d439d4eef373b5dac9fa7)
2012-12-13 15:22:35 -05:00
Luke Faraone
7ee945062d
Add command to mark users as inactive.
...
This is useful when testing the sigup workflow, as this script enables you
to run through a MIT signup without manually creating a new inactive user
in the database.
(imported from commit c22649cc7c561c2fbe8682d1b17d7e5aba9ac04e)
2012-12-13 14:15:31 -05:00
Tim Abbott
e6fef7d7ba
Fix confusion of user / user_profile objects in MIT signup codepaths.
...
(imported from commit f39943bf31f705365ed9743c6d2e9239fed8c9e2)
2012-12-13 13:32:34 -05:00
Zev Benjamin
1aa825e6d0
puppet: Add generic nagios monitoring for postgres.humbughq.com
...
(imported from commit 9e732b69580bc3da8507a5fe6fdd81f044fb4443)
2012-12-13 11:30:02 -05:00
Zev Benjamin
cd73e13601
puppet: Add python postgres module (python-psycopg2) to humbug_app_frontend packages
...
(imported from commit 3f41629d6f1e2c26458e223bc2135a53ac3bdd14)
2012-12-13 11:30:02 -05:00
Zev Benjamin
dc6d48611d
puppet: Accept traffic on port 5432 (postgresql)
...
(imported from commit bf30d0af2377209f3d5c10add3a526a1fee28dd8)
2012-12-13 11:30:02 -05:00
Zev Benjamin
4d2899b5f8
puppet: Add postgres config
...
(imported from commit ca932a1a1af7e7236ff1f47785acf4b412b16650)
2012-12-13 11:30:02 -05:00
Zev Benjamin
155e2c4943
install-server: Allow users to use an alternate humbug root
...
(imported from commit 1b5e57c1ec8c175733c8fb15343b096c46e6b6b2)
2012-12-13 11:30:02 -05:00
Zev Benjamin
ab373d6457
install-server: Use "apt-get -y" instead of "yes '' | apt-get"
...
(imported from commit 0157f179928d69a5f0ff574a2d003187f28c1772)
2012-12-13 11:21:25 -05:00
Zev Benjamin
11f8dc644d
install-server: Quote filenames in existance checks
...
(imported from commit ed17b65d875b5321c57fff4e16263282cccf4dff)
2012-12-13 11:21:20 -05:00
Zev Benjamin
16a5af0b8d
install-server: Accept apt-get prompts
...
(imported from commit 2f69d047488d3d82689a4fc71777e3c4667b36d5)
2012-12-13 11:21:16 -05:00
Zev Benjamin
b6b0ab80cb
install-server: Check for humbug-self-signed.key before running
...
(imported from commit 0c5ab50fbb278db740690522e2354f33f1958cc7)
2012-12-13 11:21:11 -05:00
Zev Benjamin
d90fb5d00f
install-server: Use named constants for file paths
...
(imported from commit 6178f8110c6f79c642dd3c8cde149be6e4d72e16)
2012-12-13 11:21:05 -05:00
Zev Benjamin
4788443e60
Switch staging to use postgres
...
(imported from commit fde5bf54a42c6be95fe2436094d7ac1626c29683)
2012-12-12 18:24:22 -05:00
Waseem Daher
4108f2f817
Add a 'realm' column to the activity page.
...
This makes it easier for me to, e.g. check on all of CUSTOMER1.
(imported from commit 1970df29b08b299cd1d00013abecefd7efbffb48)
2012-12-12 18:05:54 -05:00
Luke Faraone
f76ea63b77
Document humbug-send and humbugrc in README for API users
...
(imported from commit 9ca282d4d768f2d2a474da1209621f03147954fe)
2012-12-12 16:48:00 -05:00
Luke Faraone
2da0a2275c
Switch to the option group pattern for API examples.
...
(imported from commit 67d0164df822a56f06d5f959297cc2efa9706001)
2012-12-12 16:48:00 -05:00
Luke Faraone
5a0f1897bc
Add humbug-send, a more full-featured sending tool.
...
(imported from commit 631f3c7320192a502b60bc4c4838d068ed60ee76)
2012-12-12 16:48:00 -05:00
Luke Faraone
0057c04e13
Update copyright notices for consistency, use the copyright symbol.
...
No textual changes were made besides reflowing text and subbing © for
(C).
(imported from commit e36108ad31be6ec65325e4ac48e9fb7d17e409ff)
2012-12-12 16:48:00 -05:00
Luke Faraone
d69d935b7c
Use a configuration file for API variables.
...
(imported from commit 784483949f29c865ad1eac522c61e2ee42f406e8)
2012-12-12 16:48:00 -05:00
Tim Abbott
1681651b7d
Add dump_useractivity migration helper tool.
...
(imported from commit 6ceb437447c51be16b5eb0375de2f3bcf3fb14d0)
2012-12-12 15:45:55 -05:00
Tim Abbott
7cebbd4a52
Add datetime_to_timestamp library function.
...
(imported from commit 28466ac5c8fc406ec70a61cae5975a784eb0f238)
2012-12-12 15:45:37 -05:00
Tim Abbott
a086307e6a
Add command to dump and restore user pointers.
...
For use in database migrations.
(imported from commit f06ae569fe986da5e7d144c277bf27be534c04f9)
2012-12-12 15:45:35 -05:00
Tim Abbott
565acffbc5
Fix populate_db pointer restore.
...
(imported from commit e7984f5a762fde833c3b8520ef556fbd841aacbb)
2012-12-11 17:18:59 -05:00
Tim Abbott
b14e4d2a57
Add tool to merge messages logs together for populate_db.
...
This tool hardcodes the paths to the input log files; we'll need to
change that down the line.
(imported from commit 8b067a6d3dc781694a001d549e5e60900d9c2596)
2012-12-11 17:17:38 -05:00
Tim Abbott
c21535d420
models: Create database indexes on auxiliary Message fields.
...
I suspect we'll want these for narrowing code at some point.
(imported from commit d2077aa4d7a6967bb4cb7d9404a4db4fcf824343)
2012-12-11 17:17:38 -05:00
Tim Abbott
02d65664b4
Increase MySQL batch size to 10,000.
...
This saves 30 seconds in populate_db runtime on MySQL.
(imported from commit 7fe483bf5f32cfa3d09db8ad7a9be79bd0a2a271)
2012-12-11 17:17:38 -05:00
Tim Abbott
3014a12cef
populate_db: Truncate too-long messages on replay.
...
(imported from commit 4d89bf8a9235d5ed65863a851a13c91f4fb8632e)
2012-12-11 17:17:38 -05:00
Tim Abbott
feda941ac4
build-api-tarball: Fix prefixes.
...
(imported from commit 870ae9ab242c4d373a5901beec83b4c03d371d89)
2012-12-11 17:17:27 -05:00
Tim Abbott
c09f2d534e
Fix using DEBUG=False on development machines.
...
This is useful for debugging our error Humbug code, for example.
(imported from commit ea244b03eaf74349ade53d15ee20312732b4e083)
2012-12-11 17:15:59 -05:00
Keegan McAllister
b283123382
bugdown: Remove special treatment of backslash
...
Fixes #562 .
(imported from commit aa39cf390ef44275c7d5a84ca954c75535d372b1)
2012-12-11 16:54:10 -05:00
Zev Benjamin
695d9a4dc6
Change get_updates_params.reload_pending to reload.is_pending() as the former no longer exists
...
(imported from commit fdc59a27230cb49adee2f5444e440aaa84103e5e)
2012-12-11 16:40:26 -05:00
Jessica McKellar
2f1f1fa6be
Add tests for /json/get_old_messages.
...
(imported from commit 36a076af79635a11d9d48439bd92dfa694ed9df6)
2012-12-11 16:07:09 -05:00
Jessica McKellar
41e688d913
Add exception handling around database lookups based on user data.
...
(imported from commit 4ddab2ed130ef57c967cc9364f8890a4c5b5e347)
2012-12-11 16:07:09 -05:00
Jessica McKellar
435c98b35c
Be more picky about the type of get_old_messages's narrow POST parameter.
...
This addresses 500s observed on prod due to bad narrow values.
(imported from commit 5a865ce41e8a90d3990332d906cba4336eb53ada)
2012-12-11 16:07:09 -05:00