Commit Graph

19162 Commits

Author SHA1 Message Date
Rishi Gupta b3654c7b7e confirmation: Remove vestiges of the MitUser table.
The MitUser table was removed in df525ad.

confirm_mituser.html could have been accessed through the last few lines of
confirmation/views.py:
    templates.insert(0, 'confirmation/confirm_%s.html'
                     % (obj._meta.model_name,))

The commit message on df525ad suggests there was another way
confirm_mituser.html could have been called, but I don't currently see
evidence for it in the code.
2017-07-07 18:53:00 -07:00
Rishi Gupta 11c2b76275 confirmation: Remove util.get_status_field and settings.STATUS_FIELDS.
Unnecessarily general for our needs.
2017-07-07 18:53:00 -07:00
Rishi Gupta 7cef3d95ee confirmation: Add url_pattern_name to simplify subclassing Confirmation. 2017-07-07 18:53:00 -07:00
Rishi Gupta 8fed9eeb75 confirmation: Make host a required argument in get_link_for_object.
Removes some lines of test from test_email_change.py. The relevant code path
was never utilized by the code itself, just by the tests.
2017-07-07 18:53:00 -07:00
Rishi Gupta c72a5f2efe confirmation: Call get_link_for_object with host=unused when host unused. 2017-07-07 18:53:00 -07:00
Tim Abbott a4a654034c errors: Fix paths to error page art.
Previously, these only worked with certain base URLs.
2017-07-07 18:50:13 -07:00
Tim Abbott 0b60f11cf8 analytics: Display Zulip Electron app as the main desktop app.
This should make the /stats data significantly clearer.
2017-07-07 18:31:47 -07:00
Tim Abbott 31caab4229 analytics: Rename 'new iOS app' to 'Mobile app'. 2017-07-07 18:31:13 -07:00
Brock Whittaker 626c5ef55e analytics: Restyle and refactor /stats page.
This completes a major redesign of the /stats page.
2017-07-07 18:22:32 -07:00
Tim Abbott dcc40c7035 devtools: Document the --input option to collectstatic. 2017-07-07 17:48:52 -07:00
Tim Abbott 33e8edef98 frontend: Use CSS classes, not IDs, for error_page CSS.
This makes our templates linter happy and is a bit cleaner.
2017-07-07 17:45:11 -07:00
Tim Abbott 2ccd5aa758 devtools: Document better solution for editing error pages. 2017-07-07 17:45:11 -07:00
Vaida Plankyte 1b12a9122f frontend: Redesign 4xx page. 2017-07-07 17:45:10 -07:00
Tim Abbott 780b77d84d devtools: Document portico.css issues with static/html/ files. 2017-07-07 17:30:45 -07:00
Vaida Plankyte 14865770a0 frontend: Redesign 5xx error page to be pretty. 2017-07-07 17:27:21 -07:00
Greg Price 207bf2e1fb i18n: Recognize a little more Handlebars syntax in makemessages.
Usually we write translation expressions as `{{t ... }}`, but `{{ t ... }}`
is equally valid as far as Handlebars is concerned, and it matches how we
usually write simple variable substitutions, as `{{ ... }}`.  So occasionally
someone writes `{{ t ... }}`; currently there are two examples of this
in the codebase, in `settings/bot-{settings,list-admin}.handlebars`.

Probably it'd be good to pick a style and enforce it uniformly, but
until we do, the other style shouldn't break translation.
2017-07-07 17:02:39 -07:00
Tim Abbott f2379d66a2 i18n: Fix capitalization of Zulip Botserver download code. 2017-07-07 17:02:39 -07:00
Greg Price 4b765ae304 i18n: Fix a smattering of strings that weren't getting translated.
These are some strings I spotted in English when playing around a bit
with the UI set to German, where our translations are near complete.

It'd be great to have a more systematic way of spotting this kind of
omission.  Probably a fairly simple linter could catch a lot of cases.
2017-07-07 16:59:23 -07:00
Greg Price 038a2c7692 unread_ui: Wait for i18n setup before rendering.
Without this, the "Since you were last here" text got rendered in
English for me every time when I tested in German, both in dev
and on chat.zulip.org.

This brings us to 9 places we invoke `ensure_i18n`.  That seems
like a sign that there may well be more places we're still
missing, and that we should probably find a more systematic way
to make sure all our frontend UI rendering waits for translation
to be ready.  Anyway, for now, fix this one.
2017-07-07 16:59:23 -07:00
Tim Abbott 5ee9599acd help: Link to zulipchat.com/apps to have the latest apps page.
Ideally, we'd be using {{ apps_page_url }}, but the /help/ markdown
system doesn't support custom Jinja2 content in its code.
2017-07-07 16:58:04 -07:00
Tim Abbott 3467a39cbd RateLimitFilter: Fix issues with unicode exceptions.
If you call str() on an exception with unicode characters in it, that
will itself throw an exception.
2017-07-07 16:51:04 -07:00
Umair Khan ee6e07d13f message_sender: Use response_data variable.
response_data already contains the result of ujson.loads.
2017-07-07 16:33:36 -07:00
Umair Khan 0e8231d0f1 process_queue: Recover gracefully after PostgreSQL restart.
- For threaded workers:
Django's autoreloader catches SIGQUIT(3) to reload the program. If
a process being watched by autoreloader exits with status code 3,
reloader will restart the process. To reload, we send SIGUSR1(10)
signal from consumers to a handler in process_queue which then
exits with status code 3.

- For single worker per process:
Catch the SIGUSR1 and quit; supervisorctl will restart the worker
automatically.

Fixes #5512
2017-07-07 16:33:15 -07:00
Brock Whittaker 28861c225b settings: Move streams list table filter closer to table.
The filter input was at the top of the page above a creation modal when
it should be directly above the table.
2017-07-07 16:07:58 -07:00
Brock Whittaker 7b098d77e4 settings: Change notification settings top text to tip. 2017-07-07 16:06:47 -07:00
Brock Whittaker 375b25c91f settings: Indent UI settings checkboxes. 2017-07-07 16:05:07 -07:00
Brock Whittaker 968c4e7586 settings: Change UI settings top text to tip. 2017-07-07 16:05:04 -07:00
Brock Whittaker bd664b0dd5 portico: Fix background color; remove need for bg-image classes. 2017-07-07 15:30:47 -07:00
Jack Zhang c5cdede891 portico-css: Reposition header, portico-page content, and footer. 2017-07-07 15:29:43 -07:00
Vishnu Ks 8954c0c726 management: Use Realm.objects.get instead of get_realm.
The Realm.DoesNotExist exception will never be raised if we pass a
string_id as in that case zerver.models.get_realm function would be
used for fetching. realm.zerver.models.get_realm uses filter query
so the exception will not be raised even if there are no realm which
matches the query.

Tests added by tabbott.
2017-07-07 15:02:12 -07:00
Vaida d5517bae36 Delete the old zulip.com "referrals" system.
This system hasn't been in active use for several years, and had some 
problems with it's design.  So it makes sense to just remove it to declutter
the codebase.

Fixes #5655.
2017-07-07 14:59:18 -07:00
Vishnu Ks fcd944447e common.js: Don't set default password quality/length in frontend.
The min quality/length values are always available via data
attributes. So there is no point of specefying a default value
in common.js.
2017-07-07 14:48:06 -07:00
Vishnu Ks f2e6e16fe4 account-settings: Include password length and quality data attributes. 2017-07-07 14:48:06 -07:00
Vishnu Ks 92e7255217 page_params: Include password min length and quality.
The change password form http://localhost:9991/#settings/your-account
don't have data-min-length and data-min-quality attributes. The
account_settings.handlebar which has the change password form is
rendered client side. So we have to pass the value of min length
and quality in page params to set the data-min-length and
data-min-quality attributes.
2017-07-07 14:48:06 -07:00
Vishnu Ks 81f9d5810e portico: Remove check mark from password field. 2017-07-07 14:48:06 -07:00
Vishnu Ks f273e83a85 portico: Explain why password is weak to user. 2017-07-07 14:48:06 -07:00
Vishnu Ks caf9b55cd2 register.html: Include translations bundle. 2017-07-07 14:48:06 -07:00
Tim Abbott 61f0778296 events: Use property_types framework to deduplicate code.
This cuts another block of code that we needed to add for every new user
setting.
2017-07-07 14:26:44 -07:00
Tim Abbott dbabe3fd37 add_users_to_streams: Fix check for all_users option. 2017-07-07 13:57:57 -07:00
Tim Abbott 982667acf5 management: Add new library for specifying realms.
This new library is intended to make it easy for management commands
to access a realm or a user in a realm without having to duplicate any
of the annoying parsing/extraction code.
2017-07-07 13:57:57 -07:00
Tim Abbott a9d52052f0 manage.py: Print CommandError exceptions cleanly.
Django, by default, prints these exceptions as a giant traceback,
which is really ugly and scary to sysadmins.  We really just want to
print the error message to stdout for convenient viewing by the user.
2017-07-07 13:44:14 -07:00
Tim Abbott cd4f35abdf test-backend: Don't run tests in parallel with given test files.
It's usually slower to run in parallel with a single file.
2017-07-07 13:36:03 -07:00
Tim Abbott 05c190a97c Fix new-login emails for iOS not identifying OS correctly.
Previously, we were only checking for common strings in iOS browsers,
not for the explicit string that we use with the Zulip app.
2017-07-07 13:34:25 -07:00
Tim Abbott 6eca9a1fbf docs: Update recommendations of disk requirements.
Addresses part of #5724.
2017-07-07 12:58:42 -07:00
Tim Abbott 728b852b28 logrotate: Dramatically decrease maximum size of logs.
It's rare that there's value in having the log files get this big, and
these changes mean these log files should never consume more than a
few gigabytes.

And in particular, the server.log is far more important than the other
log files, and grows much faster, so we might as well spend most of
the space we are spending on that.

I estimate that the total size of log files from this is going to be
under 1-2GB, since 75MB (compressed size) * 10 (compressed logs) +
500MB (uncompressed size) = 1.25GB from server.log, and the rest is
negligible.

Fixes part of #5724.
2017-07-07 12:58:33 -07:00
Tim Abbott 6355f26b91 supervisor: Dramatically decrease default log file max sizes.
Most of these log files are useless except a few minutes after an
event happens, and the aggregate effect of the originals size limits
meant that Zulip's logs could consume many gigabytes of disk.

The new logging strategy should limit our usage from supervisor logs
to at most 3 Gigabytes:
* 20 * 3 = 60MB per queue worker => <1GB.
* 100 * 10 = 1GB for Django and Tornado logs.

Fixes part of #5724.
2017-07-07 12:30:24 -07:00
Vaida Plankyte 6e3308a5ac frontend: Make table headers fixed.
Tweaked by tabbott to update the users list as well.

Fixes #4746.
2017-07-07 12:18:58 -07:00
Cory Lynch 75617d07de search_suggestions: Prioritize recent huddles.
Fixes #5612. What this specifically does is that if you are
typing a group PM, this logic iterates through the possible
search suggestions for the next autocomplete. If that suggestion
contains a group PM that already exists, then prioritize it with
the most recent one on top.
2017-07-07 12:12:30 -07:00
Cory Lynch 7efba29b0c search_suggestions: Hide own name in huddle suggestions. 2017-07-07 12:12:30 -07:00
Tim Abbott 761379bf9b events: Clean up unnecessary realm_mandatory_topics code. 2017-07-07 11:11:44 -07:00