mirror of https://github.com/zulip/zulip.git
page_params: Remove duplicate debug_mode field.
This had the same value as development_environment, I believe in a way likely to persist long term, and was less clear about its meaning.
This commit is contained in:
parent
2e67b879ed
commit
af2b1ef3a1
|
@ -81,7 +81,7 @@ function report_error(
|
|||
stack = "No stacktrace available",
|
||||
{show_ui_msg = false, more_info} = {},
|
||||
) {
|
||||
if (page_params.debug_mode) {
|
||||
if (page_params.development_environment) {
|
||||
// In development, we display blueslip errors in the web UI,
|
||||
// to make them hard to miss.
|
||||
blueslip_stacktrace.display_stacktrace(msg, stack);
|
||||
|
@ -228,7 +228,7 @@ export function info(msg, more_info) {
|
|||
export function warn(msg, more_info) {
|
||||
const args = build_arg_list(msg, more_info);
|
||||
logger.warn(...args);
|
||||
if (page_params.debug_mode) {
|
||||
if (page_params.development_environment) {
|
||||
console.trace();
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ export function error(msg, more_info, stack = new Error("dummy").stack) {
|
|||
logger.error(...args);
|
||||
report_error(msg, stack, {more_info});
|
||||
|
||||
if (page_params.debug_mode) {
|
||||
if (page_params.development_environment) {
|
||||
throw new BlueslipError(msg, more_info);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ from zproject.backends import (
|
|||
)
|
||||
|
||||
DEFAULT_PAGE_PARAMS = {
|
||||
"debug_mode": settings.DEBUG,
|
||||
"development_environment": settings.DEVELOPMENT,
|
||||
"webpack_public_path": staticfiles_storage.url(settings.WEBPACK_BUNDLES),
|
||||
}
|
||||
|
||||
|
|
|
@ -220,8 +220,7 @@ def build_page_params_for_home_page_load(
|
|||
# Pass parameters to the client-side JavaScript code.
|
||||
# These end up in a JavaScript Object named 'page_params'.
|
||||
page_params = dict(
|
||||
# Server settings.
|
||||
debug_mode=settings.DEBUG,
|
||||
## Server settings.
|
||||
test_suite=settings.TEST_SUITE,
|
||||
poll_timeout=settings.POLL_TIMEOUT,
|
||||
insecure_desktop_app=insecure_desktop_app,
|
||||
|
@ -232,7 +231,7 @@ def build_page_params_for_home_page_load(
|
|||
search_pills_enabled=settings.SEARCH_PILLS_ENABLED,
|
||||
# Only show marketing email settings if on Zulip Cloud
|
||||
enable_marketing_emails_enabled=settings.CORPORATE_ENABLED,
|
||||
# Misc. extra data.
|
||||
## Misc. extra data.
|
||||
default_language_name=get_language_name(register_ret["default_language"]),
|
||||
language_list_dbl_col=get_language_list_for_templates(register_ret["default_language"]),
|
||||
language_list=get_language_list(),
|
||||
|
|
|
@ -57,7 +57,6 @@ class HomeTest(ZulipTestCase):
|
|||
"cross_realm_bots",
|
||||
"custom_profile_field_types",
|
||||
"custom_profile_fields",
|
||||
"debug_mode",
|
||||
"default_language",
|
||||
"default_language_name",
|
||||
"default_view",
|
||||
|
|
Loading…
Reference in New Issue