Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
analytics: Add chart key to remote activity page.
Lauryn Menard26168728ca1b
diff --git a/analytics/views/remote_activity.py b/analytics/views/remote_activity.pyindex efc429798ea..b53509bb02c 100644--- a/analytics/views/remote_activity.py+++ b/analytics/views/remote_activity.py@@ -69,9 +69,8 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:"Analytics users","Mobile users","Last update time",- "7 day count of mobile pushes forwarded (includes today's current count)",- "Analytics",- "Support",+ "Mobile pushes forwarded",+ "Links",]rows = get_query_data(query)@@ -79,14 +78,12 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:totals_columns = [4, 5]for row in rows:stats = remote_installation_stats_link(row[0])- row.append(stats)+ support = remote_installation_support_link(row[1])+ links = stats + " " + support+ row.append(links)for i, col in enumerate(cols):if col == "Last update time":fix_rows(rows, i, format_date_for_activity_reports)- if col == "Hostname":- for row in rows:- support = remote_installation_support_link(row[i])- row.append(support)if i == 0:total_row.append("Total")elif i in totals_columns:diff --git a/templates/analytics/ad_hoc_query.html b/templates/analytics/ad_hoc_query.htmlindex 9e85172151d..8c19dd85dc1 100644--- a/templates/analytics/ad_hoc_query.html+++ b/templates/analytics/ad_hoc_query.html@@ -1,5 +1,9 @@<h3>{{ data.title }}</h3>+{% if data.title == "Remote servers" %}+{% include "analytics/remote_activity_key.html" %}+{% endif %}+{{ data.rows|length}} rows<table class="table sortable table-striped table-bordered analytics_table">diff --git a/templates/analytics/remote_activity_key.html b/templates/analytics/remote_activity_key.htmlnew file mode 100644index 00000000000..816cb3f339b--- /dev/null+++ b/templates/analytics/remote_activity_key.html@@ -0,0 +1,11 @@+<h4>Chart key:</h4>+<ul>+ <li><strong>Zulip version</strong> - as of last update time</li>+ <li><strong>Mobile pushes forwarded</strong> - last 7 days, including today's current count</li>+ <li><strong>Links</strong>+ <ul>+ <li><strong><i class="fa fa-pie-chart"></i></strong> - remote server's stats page</li>+ <li><strong><i class="fa fa-gear"></i></strong> - remote server's support page</li>+ </ul>+ </li>+</ul>