mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 16:43:57 +00:00
analytics: More fixes to zilencer urls import logic.
This commit is contained in:
@@ -18,10 +18,8 @@ from analytics.views.stats import (
|
|||||||
stats,
|
stats,
|
||||||
stats_for_installation,
|
stats_for_installation,
|
||||||
stats_for_realm,
|
stats_for_realm,
|
||||||
stats_for_remote_installation,
|
|
||||||
stats_for_remote_realm,
|
|
||||||
)
|
)
|
||||||
from analytics.views.support import remote_servers_support, support
|
from analytics.views.support import support
|
||||||
from analytics.views.user_activity import get_user_activity
|
from analytics.views.user_activity import get_user_activity
|
||||||
from zerver.lib.rest import rest_path
|
from zerver.lib.rest import rest_path
|
||||||
|
|
||||||
@@ -30,7 +28,6 @@ i18n_urlpatterns: List[Union[URLPattern, URLResolver]] = [
|
|||||||
path("activity", get_installation_activity),
|
path("activity", get_installation_activity),
|
||||||
path("activity/integrations", get_integrations_activity),
|
path("activity/integrations", get_integrations_activity),
|
||||||
path("activity/support", support, name="support"),
|
path("activity/support", support, name="support"),
|
||||||
path("activity/remote/support", remote_servers_support, name="remote_servers_support"),
|
|
||||||
path("realm_activity/<realm_str>/", get_realm_activity),
|
path("realm_activity/<realm_str>/", get_realm_activity),
|
||||||
path("user_activity/<user_profile_id>/", get_user_activity),
|
path("user_activity/<user_profile_id>/", get_user_activity),
|
||||||
path("stats/realm/<realm_str>/", stats_for_realm),
|
path("stats/realm/<realm_str>/", stats_for_realm),
|
||||||
@@ -41,10 +38,8 @@ i18n_urlpatterns: List[Union[URLPattern, URLResolver]] = [
|
|||||||
|
|
||||||
if settings.ZILENCER_ENABLED:
|
if settings.ZILENCER_ENABLED:
|
||||||
from analytics.views.remote_activity import get_remote_server_activity
|
from analytics.views.remote_activity import get_remote_server_activity
|
||||||
from analytics.views.stats import (
|
from analytics.views.stats import stats_for_remote_installation, stats_for_remote_realm
|
||||||
get_chart_data_for_remote_installation,
|
from analytics.views.support import remote_servers_support
|
||||||
get_chart_data_for_remote_realm,
|
|
||||||
)
|
|
||||||
|
|
||||||
i18n_urlpatterns += [
|
i18n_urlpatterns += [
|
||||||
path("activity/remote", get_remote_server_activity),
|
path("activity/remote", get_remote_server_activity),
|
||||||
@@ -53,6 +48,7 @@ if settings.ZILENCER_ENABLED:
|
|||||||
"stats/remote/<int:remote_server_id>/realm/<int:remote_realm_id>/",
|
"stats/remote/<int:remote_server_id>/realm/<int:remote_realm_id>/",
|
||||||
stats_for_remote_realm,
|
stats_for_remote_realm,
|
||||||
),
|
),
|
||||||
|
path("activity/remote/support", remote_servers_support, name="remote_servers_support"),
|
||||||
]
|
]
|
||||||
|
|
||||||
# These endpoints are a part of the API (V1), which uses:
|
# These endpoints are a part of the API (V1), which uses:
|
||||||
@@ -69,6 +65,15 @@ v1_api_and_json_patterns = [
|
|||||||
rest_path("analytics/chart_data/stream/<stream_id>", GET=get_chart_data_for_stream),
|
rest_path("analytics/chart_data/stream/<stream_id>", GET=get_chart_data_for_stream),
|
||||||
rest_path("analytics/chart_data/realm/<realm_str>", GET=get_chart_data_for_realm),
|
rest_path("analytics/chart_data/realm/<realm_str>", GET=get_chart_data_for_realm),
|
||||||
rest_path("analytics/chart_data/installation", GET=get_chart_data_for_installation),
|
rest_path("analytics/chart_data/installation", GET=get_chart_data_for_installation),
|
||||||
|
]
|
||||||
|
|
||||||
|
if settings.ZILENCER_ENABLED:
|
||||||
|
from analytics.views.stats import (
|
||||||
|
get_chart_data_for_remote_installation,
|
||||||
|
get_chart_data_for_remote_realm,
|
||||||
|
)
|
||||||
|
|
||||||
|
v1_api_and_json_patterns += [
|
||||||
rest_path(
|
rest_path(
|
||||||
"analytics/chart_data/remote/<int:remote_server_id>/installation",
|
"analytics/chart_data/remote/<int:remote_server_id>/installation",
|
||||||
GET=get_chart_data_for_remote_installation,
|
GET=get_chart_data_for_remote_installation,
|
||||||
|
|||||||
Reference in New Issue
Block a user