Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
templates: Move activity templates to /templates/corporate/activity.
Lauryn Menardefd0d689fc92
diff --git a/corporate/lib/activity.py b/corporate/lib/activity.pyindex b6ddb91bb99..5e13bad8353 100644--- a/corporate/lib/activity.py+++ b/corporate/lib/activity.py@@ -66,7 +66,7 @@ def make_table(data = dict(title=title, cols=cols, rows=rows, totals=totals, stats_link=stats_link)content = loader.render_to_string(- "analytics/ad_hoc_query.html",+ "corporate/activity/activity_table.html",dict(data=data),)diff --git a/corporate/views/installation_activity.py b/corporate/views/installation_activity.pyindex 6a1b8399406..491cef1e3cd 100644--- a/corporate/views/installation_activity.py+++ b/corporate/views/installation_activity.py@@ -271,7 +271,7 @@ def realm_summary_table() -> str:]content = loader.render_to_string(- "analytics/realm_summary_table.html",+ "corporate/activity/installation_activity_table.html",dict(rows=rows,totals=total_row,@@ -291,7 +291,7 @@ def get_installation_activity(request: HttpRequest) -> HttpResponse:return render(request,- "analytics/activity_details_template.html",+ "corporate/activity/activity.html",context=dict(data=content, title=title, is_home=True),)@@ -344,7 +344,7 @@ def get_integrations_activity(request: HttpRequest) -> HttpResponse:content = make_table(title, cols, rows)return render(request,- "analytics/activity_details_template.html",+ "corporate/activity/activity.html",context=dict(data=content,title=title,diff --git a/corporate/views/realm_activity.py b/corporate/views/realm_activity.pyindex a83e8249f7a..0ef67e38162 100644--- a/corporate/views/realm_activity.py+++ b/corporate/views/realm_activity.py@@ -164,7 +164,7 @@ def get_realm_activity(request: HttpRequest, realm_str: str) -> HttpResponse:return render(request,- "analytics/activity_details_template.html",+ "corporate/activity/activity.html",context=dict(data=content,title=title,diff --git a/corporate/views/remote_activity.py b/corporate/views/remote_activity.pyindex 74f5b78c34b..70be4a2911b 100644--- a/corporate/views/remote_activity.py+++ b/corporate/views/remote_activity.py@@ -216,6 +216,6 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:content = make_table(title, cols, rows, totals=total_row)return render(request,- "analytics/activity_details_template.html",+ "corporate/activity/activity.html",context=dict(data=content, title=title, is_home=False),)diff --git a/corporate/views/user_activity.py b/corporate/views/user_activity.pyindex 4f46d784f80..29df5b7160f 100644--- a/corporate/views/user_activity.py+++ b/corporate/views/user_activity.py@@ -57,7 +57,7 @@ def get_user_activity(request: HttpRequest, user_profile_id: int) -> HttpResponsreturn render(request,- "analytics/activity_details_template.html",+ "corporate/activity/activity.html",context=dict(data=content,title=title,diff --git a/templates/analytics/activity_details_template.html b/templates/corporate/activity/activity.htmlsimilarity index 100%rename from templates/analytics/activity_details_template.htmlrename to templates/corporate/activity/activity.htmldiff --git a/templates/analytics/ad_hoc_query.html b/templates/corporate/activity/activity_table.htmlsimilarity index 93%rename from templates/analytics/ad_hoc_query.htmlrename to templates/corporate/activity/activity_table.htmlindex 9aba0b81cc5..7657901f3ae 100644--- a/templates/analytics/ad_hoc_query.html+++ b/templates/corporate/activity/activity_table.html@@ -1,7 +1,7 @@<h3>{{ data.title }} {% if data.stats_link %}{{ data.stats_link }}{% endif %}</h3>{% if data.title == "Remote servers" %}-{% include "analytics/remote_activity_key.html" %}+{% include "corporate/activity/remote_activity_key.html" %}{% endif %}{{ data.rows|length}} rowsdiff --git a/templates/analytics/realm_summary_table.html b/templates/corporate/activity/installation_activity_table.htmlsimilarity index 95%rename from templates/analytics/realm_summary_table.htmlrename to templates/corporate/activity/installation_activity_table.htmlindex fc671ec5109..5943b3b6713 100644--- a/templates/analytics/realm_summary_table.html+++ b/templates/corporate/activity/installation_activity_table.html@@ -1,6 +1,6 @@-<h3 style="text-align: center;">Installation activity: {{ num_active_sites }} active sites</h3>+<h3 class="installation-activity-header">Installation activity: {{ num_active_sites }} active sites</h3>-<p style="text-align: center;">{{ utctime }}</p>+<p class="installation-activity-header">{{ utctime }}</p><h4>Installation information:</h4><ul>diff --git a/templates/analytics/remote_activity_key.html b/templates/corporate/activity/remote_activity_key.htmlsimilarity index 100%rename from templates/analytics/remote_activity_key.htmlrename to templates/corporate/activity/remote_activity_key.htmldiff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.pyindex 24edfb9e9f1..800039675ec 100644--- a/tools/linter_lib/custom_check.py+++ b/tools/linter_lib/custom_check.py@@ -720,7 +720,6 @@ html_rules: List["Rule"] = ["templates/zerver/accounts_send_confirm.html","templates/zerver/integrations/index.html","templates/zerver/documentation_main.html",- "templates/analytics/realm_summary_table.html","templates/corporate/zephyr.html","templates/corporate/zephyr-mirror.html",},diff --git a/web/styles/portico/activity.css b/web/styles/portico/activity.cssindex 75ccf89801b..83eaef0211b 100644--- a/web/styles/portico/activity.css+++ b/web/styles/portico/activity.css@@ -244,6 +244,10 @@ tr.admin td:first-child {}}+.installation-activity-header {+ text-align: center;+}+.remote-server-information,.remote-realm-information {padding-bottom: 15px;