Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
activity: Move links columns to be first in chart.
Lauryn Menardff8552269d2c
diff --git a/corporate/views/remote_activity.py b/corporate/views/remote_activity.pyindex 85f7e0cec7a..3023c8d933f 100644--- a/corporate/views/remote_activity.py+++ b/corporate/views/remote_activity.py@@ -79,6 +79,7 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:)cols = [+ "Links","IDs","Realm name","Realm host or server hostname",@@ -94,20 +95,19 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:"Rate","Total users","Guest users",- "Links",]# If the query or column order above changes, update the constants belowSERVER_AND_REALM_IDS = 0SERVER_HOST = 2REALM_HOST = 3- LAST_AUDIT_LOG_DATE = 5- MOBILE_USER_COUNT = 6- MOBILE_PUSH_COUNT = 7- ORG_TYPE = 8- ARR = 11- TOTAL_USER_COUNT = 13- GUEST_COUNT = 14+ LAST_AUDIT_LOG_DATE = 6+ MOBILE_USER_COUNT = 7+ MOBILE_PUSH_COUNT = 8+ ORG_TYPE = 9+ ARR = 12+ TOTAL_USER_COUNT = 14+ GUEST_COUNT = 15rows = get_query_data(query)plan_data_by_remote_server = get_plan_data_by_remote_server()@@ -140,6 +140,12 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:row.pop(REALM_HOST)server_host = row[SERVER_HOST]+ # Add server links+ stats = remote_installation_stats_link(server_id)+ support = remote_installation_support_link(server_host)+ links = stats + " " + support+ row.insert(0, links)+# Count mobile users and pushes forwarded, once per serverif server_id not in remote_server_mobile_data_counted:if row[MOBILE_USER_COUNT] is not None:@@ -190,12 +196,6 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:row.append(total_users)row.append(user_counts.guest_user_count)- # Add server links- stats = remote_installation_stats_link(server_id)- support = remote_installation_support_link(server_host)- links = stats + " " + support- row.append(links)-# Format column data and add total rowfor i, col in enumerate(cols):if i == LAST_AUDIT_LOG_DATE:diff --git a/templates/corporate/activity/installation_activity_table.html b/templates/corporate/activity/installation_activity_table.htmlindex 5943b3b6713..54db2f311a1 100644--- a/templates/corporate/activity/installation_activity_table.html+++ b/templates/corporate/activity/installation_activity_table.html@@ -33,6 +33,7 @@<thead class="activity-head"><tr>+ <th>Links</th><th>Realm</th><th>Created (green if ≤12wk)</th>{% if billing_enabled %}@@ -41,7 +42,6 @@<th>ARR</th><th>Rate (%)</th>{% endif %}- <th>Links</th><th>DAU</th><th>WAU</th><th>Total users</th>@@ -55,6 +55,12 @@{% for row in rows %}<tr>+ <td>+ {{ row.realm_url }}+ {{ row.stats_link }}+ {{ row.support_link }}+ </td>+<td>{{ row.string_id }}</td>@@ -89,12 +95,6 @@</td>{% endif %}- <td>- {{ row.realm_url }}- {{ row.stats_link }}- {{ row.support_link }}- </td>-<td class="number">{{ row.dau_count }}</td>