Commit Graph

603 Commits

Author SHA1 Message Date
Steve Howell f5bb2409ef Create "analytics" app with activity reports.
(imported from commit 6385935c3d7894fe52bcc265faecc30b07629717)
2013-11-06 12:07:32 -05:00
Steve Howell a827d727cc Create non-localserver "corporate" app with jobs pages.
The corporate "app" is not a full-fledged Django app, but it has
a urls.py and a templates directory.  This commit creates the app
and moves the jobs pages into it.  Localserver deployments will
not see any of the corporate code.

(imported from commit 35889c3cf92329258c30741fdfa564769a4fac1a)
2013-11-06 12:07:31 -05:00
Zev Benjamin 1271ca0f45 Add a simple pair of tools for blocking and unblocking deployments
The main use-case here is for ensuring that we don't deploy to master
while doing demos.

(imported from commit d3c8ba502052b352291548200032f39e0743b774)
2013-11-05 17:13:45 -05:00
Tim Abbott 7f0eb71d9b Don't include local_settings.py in local server tarballs.
(imported from commit 5d893375de87f878d270bf8dc3270c7fcd3b25af)
2013-11-05 17:06:33 -05:00
Tim Abbott b5979a3fed [manual]: Rename zulip-internal puppet module to zulip_internal.
(imported from commit 64ac7ec0f3495b1fe7810da3d4d41263c52b9b3b)
2013-11-05 17:06:32 -05:00
Tim Abbott e06722657a [manual] Remove /messages/latest API and related legacy code.
This requires doing a puppet apply on our servers to take effect
properly.

(imported from commit 19dc56f071f07a5d2571eef49dd835121b2e82b6)
2013-11-05 14:19:40 -05:00
Zev Benjamin 787215d743 [manual] Switch over to new /etc/zulip/zulip.conf config file
Run the following commands as root before deploying this branch:
 # /root/zulip/tools/migrate-server-config
 # rm /etc/zulip/machinetype /etc/zulip/server /etc/zulip/local /etc/humbug-machinetype /etc/humbug-server /etc/humbug-local

(imported from commit aa7dcc50d2f4792ce33834f14761e76512fca252)
2013-11-05 14:14:19 -05:00
Kevin Mehall 78b45b61fb Minify JS in the localserver upgrade tarball.
This moves the list of removed files from .gitattributes to
tools/build-local-server-tarball because static/ and tools/ are
necessary for update-prod-static, and it seemed best to keep the
entire list in one place.

(imported from commit 2a447cbde29e90d776da43bb333650a40d4d363c)
2013-11-04 13:40:43 -05:00
Tim Abbott 5f92ccb422 [manual] Move update-prod-static and update-deployments back to tools/.
update-deployment has been replaced by upgrade-zulip for local server
instances, since it won't be running off a git repository, and
update-prod-static won't be needed since we plan on shipping minified
javascript.

When we deploy this, the deployment will fail, and then we'll need to
update the git checkout from which post-receive runs on git.zulip.net.

(imported from commit 86aaedbab09c60ae86ac1d0ae492d0d1bc45569f)
2013-11-04 13:22:41 -05:00
Tim Abbott dc596f7a47 build-local-server-tarball: Add prefix.
(imported from commit 725b197e93133d81a2fdfe23c1cdd34103d52a11)
2013-11-04 13:22:41 -05:00
Leo Franchi fe1313ad76 Split management commands for internal use into zilencer/
(imported from commit 3fd81bfc7e987fc88bd1d632546850eebbb92234)
2013-11-04 11:58:52 -05:00
Tim Abbott 68dcc760c3 Clean up some unused imports.
(imported from commit 0c5d8e2a55ba1b8909ba807fee3afe863dcdc226)
2013-11-04 11:51:17 -05:00
acrefoot 9af244a6bc fix narrowing bug introduced by composebox notifications
I switched narrow.by_subject and narrow.by_recipient to use the all_msg_list
instead of current_msg_list, since we wanted to be able to narrow to messages
specifically not in the current_msg_list. However, in searches which revealed
old messages outside the range of all_msg_list (which only has a single contiguous range),
this broke narrowing.

Let's use msg_metadata_cache instead.

(imported from commit 427f717484b4ae83d9bb4cc6e51ce17177d037fe)
2013-11-01 18:33:10 -04:00
Luke Faraone 7fd9c607ea Exclude api/setup.py from the linter's wrath.
(imported from commit 2e9718b6be472523b2684b6fcae4545f0a7fba49)
2013-10-31 17:26:52 -04:00
Tim Abbott a616800d8d review: Rename humbug => zulip in test git repo path.
(imported from commit 1551003af066401914dbc055e75769911a335441)
2013-10-31 15:29:49 -04:00
Tim Abbott ba7c3a50f2 Remove migration code from database username migration.
(imported from commit 87a4ab08420b03aac331fda072149140804ee467)
2013-10-31 15:29:49 -04:00
Tim Abbott eb4286bddd Fix saving historical backups for our mediawiki.
Previously we were not commiting them to the right git repository.

(imported from commit 2a99db84fe6fce4d9fb970425af92d92507dce21)
2013-10-31 15:05:23 -04:00
Tim Abbott 161a1d4091 Rename humbug => zulip in paths for non-postgres backups.
(imported from commit a35065d3d94f86574d837a3e826023ee3a70819a)
2013-10-31 15:05:23 -04:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.

This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.

(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
2013-10-31 11:34:15 -04:00
Zev Benjamin 0b461ec947 Add one-off tool for automating manual steps of recent puppet changes
(imported from commit 7add18afc7927cbbb5006a5a6c2b1c45092035f7)
2013-10-31 11:06:21 -04:00
Tim Abbott ac745c8bf5 Move install-server under tools/.
(imported from commit 0999b09fbfd9f28a4bd421565aa8a884b7d2c3bc)
2013-10-30 20:39:39 -04:00
Zev Benjamin dd678465ae [manual] Move puppet modules to the top level
The new puppet.conf file has to be moved into place manually.

(imported from commit 253d9a95386dae8c803a998ce2dc7e8be40c880a)
2013-10-30 15:42:26 -04:00
Tim Abbott 5b33c44f64 Add tool to build local server tarballs.
We need to maintain this by labeling the files that we don't want to
ship with our local server tarballs in the .gitattributes file.

(imported from commit e29f38c477a4cdfd80fbb8e4e95c611b34f3b212)
2013-10-29 17:55:07 -04:00
Steve Howell 3494ce6ebc Start to clean up settings.html.
Check that settings.html has at least balanced tags, and
automate the checking of those tags.

(imported from commit 35e9be269caa211803d64f2b54cb0287e13707b3)
2013-10-29 10:59:41 -04:00
Tim Abbott 901a5c342c Use os.path directly rather than sometimes importing it separately.
(imported from commit 48486c4ea64d02a15faeebb0f490d31e9b113d62)
2013-10-28 15:44:13 -04:00
Zev Benjamin e5470b2b66 Run queue processor workers from run-dev.py
(imported from commit d8977fbb899bf4a1b7e3a644a9259279ac744efd)
2013-10-28 14:30:53 -04:00
Tim Abbott f41f0e4084 [manual] Move write-rabbitmq-consumers-state-file to bin/.
We need to do a puppet apply immediately after deploying this, or our
rabbitmq consumer state files will become stale.

(imported from commit 18696a5a8b1ff431425d1f71c208acc9bf0694f2)
2013-10-28 10:54:49 -04:00
Tim Abbott fffd4f3c59 Move zulip_tools library to root of repository.
(imported from commit 2fada9d2acbcf81f8e2b3de8caadbf335141dfaa)
2013-10-28 10:54:48 -04:00
Tim Abbott 38c5629505 Move generate_localserver_secrets.py to scripts/setup.
(imported from commit 8d9ca2fc78700a38ec3ce5866b2b1032aabe1635)
2013-10-28 10:54:48 -04:00
Tim Abbott 7c6ca81df5 Move zulip-puppet-apply to scripts/.
(imported from commit c4e4c98f0a50feb31f7a716e04009d814cf047e7)
2013-10-28 10:54:48 -04:00
Tim Abbott 56e9ad230e [manual] Move our deployment scripts to scripts/.
This will require updating the post-receive code on git.zulip.net to
work.

(imported from commit 2e51fa2d7b891c1138d3f22ae534cfb8a6cf174c)
2013-10-28 10:54:48 -04:00
Tim Abbott 1a448c256e Move get-django-setting to bin/.
(imported from commit b4d908897550f9818b6db862d95bb0cbbc1da15a)
2013-10-28 10:54:48 -04:00
Tim Abbott cdd7ab895d Move postgres-init-db to scripts/setup/.
(imported from commit 7844fc5cac3e3c90466216e14b2c5b25b4830216)
2013-10-28 10:54:48 -04:00
Steve Howell e6991c299d Add tools/migrate-db-osx.
(imported from commit b422f7d4e93655b77322170b2bdd4e2eb4493696)
2013-10-28 10:39:46 -04:00
Tim Abbott 5b2775724a Make tools/migrate-db optimized for the local dev instance case.
(imported from commit a4db99435646e337a09cbfe2f64d3d7ca6b0346a)
2013-10-28 10:39:46 -04:00
Zev Benjamin cdcbe61cb0 [manual] Change references to the humbug_test user, schema, and database to zulip_test
This requires no changes in production, but is tagged as manual to
remind developers that they need to edit and run the tools/migrate-db
script to fix up their local database instances.

(imported from commit fbf764fb61592ef994d6d2ad56edad65ff01f14b)
2013-10-26 04:16:28 -04:00
Zev Benjamin 7b6f6823a5 [manual] Change references to the humbug user, schema, and database to zulip
This commit must be simultaneously deployed on both staging and
prod0.  It also requires completely taking down the app.

To deploy these changes, do:
* check out this commit at /root/zulip on postgres0, postgres1, staging, and prod0

* stop the process_fts_updates job on postgres0 and postgres1
* stop the app on staging and prod0

* do a puppet apply on postgres0, postgres1, staging, and prod0
* move the new client certificates into place on staging and app
* move the new server certificates into place on postgres0 and postgres1
* reload the database config on postgres0 and postgres1 (this might
  actually require a restart)
* run tools/migrate-db on postgres0 as root

* do a deploy through this commit on staging and prod0
* start the process_fts_updates job on postgres0 and postgres1

* do a puppet apply on nagios

(imported from commit 819bdd14326c1425e2d3041a491a8ca3b9716506)
2013-10-26 04:16:27 -04:00
Zev Benjamin 05b9c08cfa Add one-off tool for migrating our database user, schema, and db name from humbug to zulip
(imported from commit 4b5e27eb3b083f2e2f2cabe64901f3dbaecd4739)
2013-10-26 04:16:27 -04:00
Leo Franchi 9e1173eb9e Add a generate_localserver_secrets.py script that populates local_settings.py
(imported from commit ced1397d225efe0cf2f0eef7d43b495e3ab9b845)
2013-10-25 16:29:18 -04:00
Zev Benjamin a463d2a386 Remove inaccurate comment
(imported from commit 8584f14435c1db89f5a9f538d0048f0e42705f85)
2013-10-24 16:40:38 -04:00
Tim Abbott 5270b8875b Add a simple script to fetch a setting out of Django.
(imported from commit c0ebaf02108a930f0290d56bd666611e36ba28c0)
2013-10-24 16:26:45 -04:00
Zev Benjamin ca16644152 Add client-side SockJS wrapper
The wrapper handles our RPC protocol, authentication scheme, and
reconnections.

(imported from commit 1fed2d160582c235a32de80a80b3e451c13a7b1c)
2013-10-22 18:45:11 -04:00
Zev Benjamin 5979af3a45 [manual] Add asynchronous message sender via sockjs-tornado
New dependency: sockjs-tornado

One known limitation is that we don't clean up sessions for
non-websockets transports.  This is a bug in Tornado so I'm going to
look at upgrading us to the latest version:
https://github.com/mrjoes/sockjs-tornado/issues/47

(imported from commit 31cdb7596dd5ee094ab006c31757db17dca8899b)
2013-10-22 18:45:11 -04:00
Tim Abbott 080f5922e1 lint-all: Fix gotcha regexps to not misparse certain quoting cases.
(imported from commit fed305fce9cf6f88e05f4d7310e25928ae6add4b)
2013-10-21 14:37:36 -04:00
Steve Howell 5c4fb277c1 Add tools/check-handlebar-templates.
(imported from commit e9f634be4d3699eb2d4fc12f6311b42ead710427)
2013-10-09 17:16:52 -04:00
Tim Abbott aad13aea04 post-receive: Login as the zulip user when deploying.
(imported from commit 750c3de9dc37ae3bc32964543da26a4d26eb8591)
2013-10-08 17:21:58 -04:00
Tim Abbott 0f2fa7e59a puppet: Fixup some humbug => zulip rename issues.
(imported from commit 4d83dc2af380cfbae3a1958f98c671c7e8c58f05)
2013-10-08 08:57:30 -04:00
Tim Abbott f3fd1a2c44 [manual] puppet: Rename humbug user to zulip.
(imported from commit 90e517a4a657d2821b371c833e557c2003c9340c)
2013-10-08 08:57:30 -04:00
Tim Abbott b8b0eb4508 Some zulip => humbug updates in comments and print statements.
(imported from commit 9253569a1df7f96fda81ab162d710cdda03f30ca)
2013-10-08 08:57:29 -04:00
Tim Abbott e11ae77ba6 [manual] Rename /home/humbug to /home/zulip.
This may require just doing an mv on the home directory, plus changing
the home directory in /etc/passwd.  It should of course be done carefully.

(imported from commit 660997d897ee6d33563af74f0fc5d4267a911755)
2013-10-08 08:57:29 -04:00
Tim Abbott 9677ce8920 [manual] Move git checkouts from /home/humbug/humbug to /home/humbug/zulip.
(imported from commit d58be28e57fcb3b5585c0018f1dbb53adf5067df)
2013-10-08 08:57:28 -04:00
Tim Abbott 31a445e42e [manual] Rename /home/humbug/humbug-deployments to /home/humbug/deployments.
This requires doing an `mv` and then `puppet apply` on each of staging
and prod as part of the deployment process.

(imported from commit 5d0be64a3846f7151d2036d2e0b31049bc1c2dd2)
2013-10-08 08:57:28 -04:00
Zev Benjamin 959a5c4835 zulip-puppet-apply: Always do a dry run first and then prompt to do the real run
You can immediately apply the changes by passing '-f' or '--force' as
the first argument.

(imported from commit 91f00f6afd3c42e2b11f60e92fc20962bc952f0d)
2013-10-07 16:22:55 -04:00
Jessica McKellar cdc6c50620 Unbreak non-stdout review script invocations.
The API directory wasn't making it onto sys.path in time anymore.

(imported from commit d4ed145913e0119d56de435811f793895da175fe)
2013-10-07 15:43:17 -04:00
Luke Faraone 80c2eb0367 Repoint to new repository
(imported from commit bc90453bf9776b1e3d05c222f78cc66383278c32)
2013-10-07 13:43:23 -04:00
Steve Howell 84c147a379 Abort the review script when pointed to localhost.
(imported from commit 3a7b2123f9667508425dc8e33300a28294b58f2d)
2013-10-06 15:30:00 -04:00
Zev Benjamin 6e54ca3045 puppet: Factor out writing the rabbitmq consumer check state file into its own script
This temporarily breaks the rabbitmq consumer checks for the
user_activity and notify_tornado queues because their state files
were renamed to match their queue names.  It will be fixed for
staging in the next commit.

(imported from commit a6aaa330a1134d8ddffe8f4959deb12b219f241a)
2013-10-04 14:19:16 -04:00
Steve Howell 94cec018c0 Force-minify min/activity.js.
The minify logic doesn't have an easy way to detect that you
removed a file since the last deployment.

(imported from commit 50d05fcdad382a586073c06d29d279433d1bba81)
2013-09-26 13:55:45 -04:00
Tim Abbott fff4244b54 Move various settings into local_settings.py.
(imported from commit 03c4a61383f3f8cf8207050d68d5ce870e12fcca)
2013-09-25 15:40:21 -04:00
Waseem Daher 675baf102b norman-mailer: Deal more gracefully with fewer fields.
(imported from commit b83380c72e9ac2be77f4c1e74c82d63fe2d42244)
2013-09-20 14:36:00 -04:00
Steve Howell 7228ce956b Wait for puppet checks to finish in lint-all
(imported from commit 760c49622e5f33e12551f24128e1df54a9ae8848)
2013-09-19 10:46:29 -04:00
Steve Howell 203a71dcd0 Fail hard on pyflakes errors.
Also, run pyflakes in the background like the other processes.

(imported from commit b168a5f7dd6dd5ec4b75e3148aea82b3e1040f87)
2013-09-19 10:46:28 -04:00
Waseem Daher 790e2b67de norman-mailer: Declare that our file is UTF-8.
(imported from commit 54236cd3bc4e4291767a47da21043992e592de48)
2013-09-19 10:44:25 -04:00
Zev Benjamin 952f15762e Add tool for sending Github payloads to a local instance
This is very useful for testing our Github integration.

(imported from commit c61fd883c599395d31416a25090e57594fddeadf)
2013-09-17 13:55:39 -04:00
Steve Howell b4b6fa14d3 Persist muting preferences to the back end
(imported from commit db2d4362a0601f35a75b798cf6945556e44532fb)
2013-09-11 16:47:37 -04:00
Waseem Daher ad66b2244c norman-mailer: Add ability to use multiple templates.
(imported from commit a896ce14408c75c7dcf520439a3e7a6ff463e8a9)
2013-09-10 21:24:03 -05:00
Leo Franchi f70e899518 Use exec to launch unicorn so it dies when we kill the script
(imported from commit 59ca5b28f4d1674a0e904f191cc11dbdbf5fc289)
2013-09-10 10:26:24 -04:00
Kevin Mehall 810dd89621 Maintain a list of people in the realm.
people_list and people_dict include the feedback bot and anyone you've
cross-realm PM'd with. Useful for autocomplete, but not for admin and
stream settings views.

Fixes the UI part of Trac #1772.

(imported from commit cdefd4e86980447aad5190e7fc8ae3666d66e3c3)
2013-09-09 12:13:33 -04:00
Leo Franchi 8c0e112aa7 Update generate-activity-metrics to use new graphite url
(imported from commit 4664e9f389d05edb014ddb3b7f271cfc32245f3f)
2013-09-06 15:14:55 -04:00
Zev Benjamin 2f1551e745 Replace comment references to trac.humbughq.com with trac.zulip.net
(imported from commit 231d0884345be525d58ce51f48a76bba6960f09d)
2013-09-05 15:43:08 -04:00
Leo Franchi 897dd87b94 Add a span around alert words to mark them visually
(imported from commit 9b8fbbd957086f1eeaa3409e5830aa6d7974fbe8)
2013-09-05 10:18:40 -04:00
Waseem Daher 07d692758e Script to help send welcome emails to new Zulip users.
(imported from commit 787c950a71f34a6137e53448594ba9ff42fc939f)
2013-09-04 13:30:06 -04:00
Zev Benjamin f7a7527049 Start and stop all our processes in one invocation of supervisorctl
With the supervisor speedups, these run much faster.

(imported from commit d8b96178f7c57861e9de8dd640a861c22df6e9ad)
2013-08-27 17:30:57 -04:00
Tim Abbott 134da30fdf Add webathena authentication button for Zephyr users.
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it.  Obviously needs more docs.

Current problems include:

* supervisorctl reload ends up recreating /var/run/supervisor.sock
  with the wrong permissions, so it only works once in a row before
  you need to chmod that.

* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
  local root vulnerability

* This uses SSH and thus is kinda slow.

(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Scott Feeney 95719a91cf [third] Add Lazyload.js
This is a small, MIT-licensed lib from https://github.com/rgrove/lazyload

(imported from commit c6e43c06dfe3fa8559b2a3d28a48d9e0a6848283)
2013-08-26 13:02:57 -04:00
Steve Howell 795248a1d0 Mute any topic named "muted" on zulip.com.
This change will allow us to test the muting feature on
staging.  Any topic named "muted" will automatically be
muted.  You can also mute any other topic on the console:

    muting.mute_topic('devel', 'ios');
    current_msg_list.rerender();

More UI around this experiment will be coming soon, as well
as support for muting entire streams.

The muting module keeps track of which topics are muted, but a
user can expand muted messages, and once that happens, the
messages are marked with the "force_expand" flag that gets
persisted to the back end.

Muted messages are rendered in similar fashion to the summarized
rows, and as part of unifying some of that code, we have
made it so that expanding a summarized section doesn't remove
individual flags related to summaries; instead, the messages
get the force_expand flag set.

(imported from commit acee4190e63813d46850415c41ff8ebfae4a6953)
2013-08-23 12:10:27 -04:00
Steve Howell 58c141ad79 Avoid side effects in ui.set_presence_list().
Have ui.set_presence_list() only touch the presence list.

Before this change, it was calling update_unread_counts(), which
has a bunch of side effects unrelated to the presence list.

(imported from commit 690f754d78874a03fa36f8ff8765d5a63e431d28)
2013-08-22 14:46:13 -04:00
Scott Feeney 6de6ced290 Fix PM unread counts not displaying
This was broken in two ways:

1. Commit ad59d6f78042ce89, "Make the left sidebar and right sidebar
more consistent", pushed last Monday, changed the markup for the right
sidebar without changing a selector in stream_list.js that was looking
for the old markup.

2. Even then, whenever new user presence information came in, we would
rerender the user list and blow away the unread counts. This commit
patches around that by updating unread counts after rendering the user
list. I'm not sure what broke this or how it was working before.

(imported from commit 53ed40139e257e44411e918d1ecdce3a49e9ee51)
2013-08-22 14:46:12 -04:00
Steve Howell d21cbac611 Clean up globals after each unit test.
The functions add_dependencies() and set_global() are convenience
methods that allow you to modify the global namespace while
the current file is running but then have it be cleaned up
by index.js when you're done.

(imported from commit f75b8a10c19f773a8d2d3a8fa4bc39b1679566fe)
2013-08-21 18:18:58 -04:00
Tim Abbott 8879b84293 run-dev: Ignore certain request.finish() exceptions.
(imported from commit e797c0a6f5cd753bd84069bff202b421f0ff3be9)
2013-08-21 12:01:55 -04:00
Scott Feeney 5f2517bddc Add support for analyzing test coverage with Istanbul
To use, make sure your Node installation is up to date and install
istanbul with npm:

  sudo npm install -g istanbul      # 'sudo' may be optional on OSX

Then run

  tools/test-js-with-node cover

and navigate to coverage/lcov-report/js/index.html in a browser.

(imported from commit 2da4894d1725e2f9540b3895304246e3cd138f6c)
2013-08-20 10:46:45 -04:00
Scott Feeney 69efe2a695 Add a Node.js-based test runner
There are no functional changes; you can still use the shell script
tools/test-js-with-node. It just delegates now to the new index.js to
iterate through all the other .js files in the test directory and run
them. This sets the stage for Istanbul to correctly compute test
coverage.

(imported from commit 6f521c78b7a314d010fa113f9c2c971ab999b637)
2013-08-20 10:46:22 -04:00
Jessica McKellar b32219c8eb Don't display unread counts until after making a bankruptcy decision.
Users were getting confused about why the unread count in the sidebar
/ notification bar / Dock was different from what the bankruptcy modal
said, so only show them the true server count until they've made a
decision.

(imported from commit 71d376cd4a85749ccf49936b251e6b8ac21361b7)
2013-08-20 10:26:52 -04:00
Steve Howell 53f62bd71c Created MessageListView class.
(The code for MessageListView  was extracted from message_list.js.)

(imported from commit 60c0bac4c734d3850f8b8c047a978c292b19cc13)
2013-08-19 12:17:56 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Luke Faraone 6e81fd46af Update review script to accept non-ASCII branch names
(imported from commit 391dd3a549c4a2f4766105b85a6ebc885a293db2)
2013-08-15 10:56:46 -04:00
Steve Howell 050c8ad103 zulip.subject_dict -> composebox_typeahead.seen_topics
Move zulip.subject_dict into composebox_typeahead.seen_topics,
and encapsulate the use of seen_topics inside composebox_typeahead
with add_topic() and topics_seen_for().

(imported from commit 2bc2d1714fabdc07a661cbf815d14b36a08990e2)
2013-08-14 13:15:00 -04:00
Luke Faraone ecc42bc9f8 Add administrative panel to allow for user deactivations etc.
We now show a list of users and allow you to deactivate a user using the
same process as `python manage.py deactivate_user`.

We add a new menu item accessible from the gear icon which will eventually
have much more than just this, but we have a good start here.

Here we also add a property to UserProfile which determines whether you're
eligible to access the administration panel, and then have code which shows
the menu option if so.

This introduces a new JS file, admin.js.

(imported from commit 52296fdedb46b4f32d541df43022ffccfb277297)
2013-08-13 14:20:18 -04:00
Steve Howell 0879648f0e Remove respond_to_cursor flag.
The prior commit, which was a functional fix, made the
flag obsolete.

(imported from commit 203a080106b00e0355a1223f783bbe579430b4ad)
2013-08-13 14:12:28 -04:00
Steve Howell d27feeed62 Extract code to summary.js.
(imported from commit 51d958b27e53555f5f77d6e6b661eade57190e23)
2013-08-13 11:26:12 -04:00
Waseem Daher 02dba3da11 iframe-bot: Don't show tweets.
(imported from commit 584fdbfa50e2ff1d3526f741e96ef6691fa731e1)
2013-08-13 10:41:02 -04:00
Waseem Daher 7329cedd84 iframe-bot: Properly style emoji (but you need to copy in the images).
(imported from commit 3fbf54a46d4f20e9da21c73cfe9f6a0064749f1c)
2013-08-13 10:36:05 -04:00
Waseem Daher dfb60ee966 File uploads using Dropbox.
(imported from commit c552133fc7025eca526fbfef24fd544260d7111b)
2013-08-12 17:22:23 -04:00
Waseem Daher 932d002ff4 Zulip embedded iframe bot.
Currently running for CUSTOMER3, at MIT.

(imported from commit 1c29d3fb3fbf29b9ea633e9fc102e7737eba4fd7)
2013-08-12 17:09:48 -04:00
Waseem Daher 067bd390ac Remove kiosk mode.
We instead implemented the ~desired functionality here using the
API and a bot to make a totally read-only, static, slowly-updating
view into the Zuliverse.

This is the moral equivalent of reverting deb035b4c702fcdb0e660ed549fe74c682abb6d9

(imported from commit 9d743fe82f197b37f005e5a038f77cc4b8566024)
2013-08-12 16:19:53 -04:00
Steve Howell 878ee2b3fd Move Filter class to filter.js from narrow.js.
1) The class Filter now lives in its own module.
2) The function canonicalized_operators() is now a class method on Filter.
3) The function message_in_home moved to filter.js and became private.
4) Various calling code had to change, of course.
5) Splitting out Filter helped simplify a few tests.

(imported from commit e41d792b46d3d6a30d3bd03db0419f129d0a2a7b)
2013-08-12 13:58:32 -04:00
Steve Howell 37f8cc9294 Extracted code into compose_fade.js.
The compose_fade has three public exports:

    set_focused_recipient
    unfade_messages
    update_faded_messages

All code was pulled directly from compose.js, except for the
one-line setter of set_focused_recipient.  The focused_recipients
variable that used to be in compose.js was moved to compose_fade.js,
hence the need for the setter.

(imported from commit 462ca5d0d0bd58612d0197f3734a8c78de8c6d30)
2013-08-11 17:05:13 -04:00
Waseem Daher 0dcaf9ca3d Kiosk mode [unsafe].
"Kiosk mode" is a "read-only" Zulip suitable for embedding into
an iframe on another site. I say "read-only" in quotation marks,
because the account is still a fully-fledged active account on
the server, and we just tear out a bunch of stuff in Javascript
(that a malicious user could easily re-enable).

So in that sense, it's not actually safe in security-sensitive
environments -- malicious users logged in via kiosk mode
can do anything the kiosk-mode user can do.

(We need this functionality for the customer3 realm specifically;
 we'll possibly just tear this code back out once that experiment
 has run its course.)

(imported from commit deb035b4c702fcdb0e660ed549fe74c682abb6d9)
2013-08-11 15:57:21 -04:00
Scott Feeney 4aab49657d Fix minify-js failure to update app.js when templates changed
Also adds a clarifying comment.

(imported from commit ae05fa7063b7e77ab6d8942eab2a2191429b312f)
2013-08-09 23:31:44 -04:00
Zev Benjamin 0cfc8fae9f Add basic Javascript Dict implementation
(imported from commit 9f2fb089eb6e269549de26b37bd588355757d22c)
2013-08-09 17:20:14 -04:00