Commit Graph

17029 Commits

Author SHA1 Message Date
Tim Abbott faf47fe147 lint: Fix gitlint checking commits in master but not in the branch.
This was causing a bunch of spurious failures.

Workaround for https://github.com/travis-ci/travis-ci/issues/4596 ;
TRAVIS_COMMIT_RANGE is actually just totally wrong for this purpose.
2017-04-25 16:52:52 -07:00
digi0ps 8fb9d2bff3 settings: Redesign settings/administration panel buttons.
This redesigns all the ugly bold-colored buttons in the settings and
administration pages.
2017-04-25 16:33:59 -07:00
Cory Lynch 0d9b77c8b7 composebox_typeahead.js: Add typeahead cancelling for '# '.
If somebody types '# ', then close the typeahead dialog and
don't autocomplete. Relevant node tests were also added.

Fixes #4505.
2017-04-25 15:55:23 -07:00
Tim Abbott 60225012e6 unread: Add tool for marking all messages as unread for testing.
This tool can save a lot of manual work in testing our unread counts
logic.
2017-04-25 15:40:12 -07:00
vbNETonIce cb2181d42d Update prod-maintain-secure-upgrade.md
fixing typo in line 370: 'we should' > 'we show'
2017-04-25 15:25:22 -07:00
Tim Abbott c0d7e83333 logging: Change missing push notification keys from error to warning.
This is a configuration problem, but it just means a feature is not
enabled, not that attention is required, so it should be a warning,
not an error.
2017-04-25 13:52:36 -07:00
Tim Abbott b6094b8e91 logging_handlers: Fix missing host key in queue errors.
This fixes exceptions thrown when trying to report errors from queue
processors to email.
2017-04-25 13:48:44 -07:00
digi0ps 1cc9cb969b sidebar: Make topic name width consistent. 2017-04-25 11:58:33 -07:00
digi0ps eb852ef19e sidebar: Move chevron in the stream list further from the scrollbar.
Previously, the chevrons were too close to the scrollbar. This commit
fixes that by moving it farther from the scrollbar.
2017-04-25 11:58:33 -07:00
Sarah faf20d9b47 Documentation: Update new feature tutorial.
Update the steps listed in the "Writing a new application
feature" section, based on changes to how realm properties
are created and updated on the backend.

Addresses part of issue #3854.
2017-04-25 11:16:27 -07:00
Eeshan Garg 46b6475066 webhooks/gitlab: Use branches.find to filter Git notifications. 2017-04-25 10:46:21 -07:00
Eeshan Garg 8900e99ae5 github_webhook: Use branches.find to filter Git notifications. 2017-04-25 10:46:21 -07:00
Eeshan Garg 047c02781c webhook-walkthrough: Recommend passing kwargs to build_webhook_url.
When constructing URLs for testing, we now recommend passing
query parameters as keyword arguments to build_webhook_url
instead of overriding it.
2017-04-25 10:46:21 -07:00
Maxim Averin 15170b5423 Switch regenerate_api_key to use RealmAuditLog. 2017-04-25 10:23:33 -07:00
Steve Howell 8eb86335b9 Extract narrow_state.js.
Despite the length of this commit, it is a very straightforward
moving of code from narrow.js -> narrow_state.js, and then
everything else is just s/narrow.foo()/narrow_state.foo()/
(with a few tiny cleanups to remove some code duplication
in certain callers).

The only new functions are simple setter/getters that
encapsulate the current_filter variable:

    narrow_state.reset_current_filter()
    narrow_state.set_current_filter()
    narrow_state.get_current_filter()

We removed narrow.predicate() as part of this, since it was dead
code.

Also, we removed the shim for narrow_state.set_compose_defaults(),
and since that was the last shim, we removed shim.js from the app.
2017-04-25 09:57:32 -07:00
Steve Howell 7326971380 Extract stream_edit.js.
This code makes the right pane work in "Manage Streams" when
you are editing a stream subscription.  It handles basic
functionality (submitting forms, etc.), live updates, and
showing the pane as needed.

Most of the code here was simply moved from subs.js, but some
functions were pulled out of larger functions:

    live update:
        add_me_to_member_list
        update_stream_name
        update_stream_description

    collapse/show:
        collapse
        show_sub

We also now export subs.show_subs_pane.

We eventually want stream_edit not to call into subs.js, and
this should be fairly easy--we just need to move some shared
methods to a new module.
2017-04-25 09:57:32 -07:00
Steve Howell ca2aea8d01 Extract stream_create.js.
This new modules handles the UI to create streams.  It mostly moves
code from subs.js.

It introduces an API around what used to be called meta.stream_created:

    reset_created_stream()
    set_name()
    get_name()

It only partially moves new_stream_clicked().
2017-04-25 09:57:32 -07:00
Umair Khan 86ebc2ccb1 testing: Reset INSTRUMENTED_CALLS for subsuites.
We need to reset INSTRUMENTED_CALLS variable before running every
subsuite. If we do not do this then the subsuite running on a
particular process called A will send the accumulated instrumented
calls gathered by the previous subsuites which also ran on the process A.

This also fixes the extra delay that we used to experience after the
tests had finished running. The extra delay was due to the duplicate
instrumented calls in the INSTRUMENTED_CALLS list. The size of this
list used to be ~100k for parallel model as opposed to ~1800 for serial
model.
2017-04-25 09:07:15 -07:00
Umair Khan d4ca0f1751 testing: Create one upload directory per process.
This commit creates a dedicated file upload directory for every process
when we are running tests in parallel mode. This makes sure that we do
not run into any race conditions due to multiple processes accessing
the same upload directory.
2017-04-25 09:07:15 -07:00
Umair Khan 93b4200cae testing: Move _worker_id incrementer block to the top.
Incrementing the _worker_id should be the first step for the process.
It gives better structure to the code.
2017-04-25 09:07:15 -07:00
Tim Abbott 145fa0e5b2 capitalization: Flag Emoji One as allowed. 2017-04-24 23:15:39 -07:00
Tim Abbott 427629ca4c emoji: Fix strings in migration 0076.
It's arguably a bug that Django puts the value strings into the
migration object, but this was causing test failures.
2017-04-24 22:50:19 -07:00
Cynthia Lin ef2ff9f9a0 integrations: Remove deprecated Stash integration. 2017-04-24 22:35:23 -07:00
Cynthia Lin a267c61cdd integrations: Update docs for adding integration images. 2017-04-24 22:34:36 -07:00
Harshit Bansal 6cb03ea78e frontend: Add UI necessary to change emoji set.
Note that this code is disabled until the infrastructure for the
feature can be finished.

Tweaked by tabbott to use slightly cleaner names for the various sets.
2017-04-24 22:31:30 -07:00
Harshit Bansal 07081196f4 backend: Allow to change UserProfile's `emojiset` field via api. 2017-04-24 22:30:07 -07:00
Harshit Bansal fb3fda031d models: Add `emojiset` field to `UserProfile` model.
Includes a database migration.
2017-04-24 22:30:06 -07:00
Tim Abbott 1f0c4e5fb3 email mirror: Fix mypy annotation error. 2017-04-24 22:01:48 -07:00
Umair Khan 556264f3d7 reset_password: Modify password reset email if email is in wrong realm.
This fixes a confusing issue where a user might try resetting the
password for an email account that in part of a different Zulip
organization.

Is a useful early step towards making Zulip support reusing an email
in multiple realms.

Fixes: #4557.
2017-04-24 21:58:29 -07:00
Emilio Aburto L a8521dc988 docs: Update Docker development instructions to include chown.
This adds a command to change ownership of /srv/zulip to the zulip
user.
2017-04-24 21:40:44 -07:00
K.Kanakhin e3e52e7284 email-mirror: Move postfix email mirror integration to separate script.
This fixes a performance problem where we were previously starting up
a full Django process (~0.7s even on a fast machine) every time a new
email came in, potentially allowing users to accidentally DoS a Zulip
server.  Now, we just post over HTTPS, allowing the existing thread
pool support to do its job.

- Add script wrapper to communicate postfix pipe with django web server
  over HTTP(S). It uses shared_secret authentication mode.
- Add django view to process messages from email mirror server.
- Clean management command `email-mirror`. Left just functional
  for cron email processing.
- Add routes for new tornado view.
- Change pipe script in master process postfix config template
  based on updated script.
- Add tests.

Tweaked by tabbott to adjust the directory and set better defaults.

Fixes #2421.
2017-04-24 21:24:23 -07:00
Brock Whittaker ba51c077be Add assets for portico signin pages.
This adds some of the required assets for the portico signin pages such
as logos and validation signals.
2017-04-24 16:19:18 -07:00
Steve Howell 232e1e4006 minor: Tweak js-dep-visualizer configuration. 2017-04-24 14:46:34 -07:00
wangjames 744f4aa663 Fix modals dependency cycle.
This commit forces the files that create modals to create their own
modal closing function instead of creating all of them in the modals
file. These functions are then passed to the modals.close object. This
is intended to remove modals.js's dependencies on these other files.
2017-04-24 14:30:02 -07:00
Steve Howell c999bdf823 compose: Distinguish get_message_type() from composing().
We now only call compose_state.composing() in a boolean context,
where we simply care whether or not the compose box is open.  The
function now also returns true/false.

Callers who need to know the actual message type (e.g. "stream" or
"private") now call compose_state.get_message_type().
2017-04-24 12:42:06 -07:00
derAnfaenger 2adf641b72 Fix provisioning failing due to partial downloads.
'$COMMIT' was originally printed in '$COMMIT_FILE_PATH' before all
respective files were downloaded, meaning that this step
wouldn't be repeated if one download failed. This commit prints
'$COMMIT' only after all downloads were successful.
2017-04-22 21:16:11 -07:00
Tommy Ip a67ade2419 lint: Fix gitlint test due to non-deterministic git range.
This makes getting the commit SHA non time sensitive by using the
range provided by TravisCI.
2017-04-22 21:34:58 +01:00
Steve Howell 5ae284dcb1 Add topic_generator.js to the app. 2017-04-22 11:46:47 -07:00
Steve Howell d938afaedc Extract narrow.narrow_to_next_topic().
This borrows some code from a PR from Mahim Goyal.
2017-04-22 11:46:47 -07:00
Maxim Averin 73a1dd63d5 analytics: Refactor legacy 'zulip_internal' decorator.
Rename 'zulip_internal' decorator to 'require_server_admin', add
documentation for 'server_admin', explaining how to give permission
for ./activity page.

Fixes: #1463.
2017-04-22 11:42:02 -07:00
Tommy Ip 6ec32b37c3 lint: Fix lint rule error due to unordered list.
Tweaked to automatically sort by tabbott.
2017-04-22 11:38:36 -07:00
Eeshan Garg ce0f1453b9 webhooks: Filter specific BitBucket Git branches.
This is the last of the Git integrations that didn't have this
feature.

Fixes #4327.
2017-04-22 11:29:53 -07:00
Shayan Toqraee 534c951ec4 Add rtl.js library for detecting direction of text.
This comes complete with some documentation and node tests, and is a
key step towards implementing RTL support in Zulip.
2017-04-22 11:25:54 -07:00
Michael 854d70e7c6 test_events: Verify format of event dicts precisely.
This is basically just using the new check_dict_only everywhere, with
a few exceptions:
* New self.check_events_dict automatically adds the id field to avoid
  duplicating it ~80 times.
* Set log=False for many of the testing action functions to remove the
  timestamp field from their returned event dictionaries, since it's
  not needed and is the result of a deprecated log_event function.

Wasn't sure if the subscription_field list in do_test_subscribe_events
could contain optional arguments, so I left the call to check_dict on
along with a TODO.

Fixes: #1370.
2017-04-22 11:22:41 -07:00
hackerkid a768c94f9d requirements: Upgrade django-bitfield to 1.9.2. 2017-04-21 22:25:50 -07:00
Steve Howell ddbe877909 Add narrow.stream_topic(). 2017-04-21 21:59:22 -07:00
Steve Howell 6ddbf12376 Add topic_generator.get_next_topic(). 2017-04-21 21:59:22 -07:00
Steve Howell 079885770b Add unread.topic_has_any_unread(). 2017-04-21 21:59:22 -07:00
Steve Howell 4871b491f3 Add Dict.is_empty(). 2017-04-21 21:59:22 -07:00
Steve Howell b27180a645 Have next_topic() return stream/topic objects.
We now use "map" to have our inner generator of topics be
mapped to objects with both the stream and topic.  Thanks to
Mahim Goyal for helping with this design.
2017-04-21 21:59:22 -07:00