Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
analytics-activity: Remove link with realm owners emails.
Lauryn Menard90d0531e206d
diff --git a/analytics/tests/test_activity_views.py b/analytics/tests/test_activity_views.pyindex 66cc5a3757b..2a8261627d1 100644--- a/analytics/tests/test_activity_views.py+++ b/analytics/tests/test_activity_views.py@@ -32,7 +32,7 @@ class ActivityTest(ZulipTestCase):user_profile.save(update_fields=["is_staff"])flush_per_request_caches()- with self.assert_database_query_count(19):+ with self.assert_database_query_count(18):result = self.client_get("/activity")self.assertEqual(result.status_code, 200)diff --git a/analytics/views/installation_activity.py b/analytics/views/installation_activity.pyindex 05914c23ed4..5dbd651503b 100644--- a/analytics/views/installation_activity.py+++ b/analytics/views/installation_activity.py@@ -26,7 +26,7 @@ from analytics.views.support import get_plan_namefrom zerver.decorator import require_server_adminfrom zerver.lib.request import has_request_variablesfrom zerver.lib.timestamp import timestamp_to_datetime-from zerver.models import Realm, UserActivityInterval, UserProfile, get_org_type_display_name+from zerver.models import Realm, UserActivityInterval, get_org_type_display_nameif settings.BILLING_ENABLED:from corporate.lib.stripe import (@@ -187,19 +187,10 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:rows = dictfetchall(cursor)cursor.close()- # Fetch all the realm administrator users- realm_owners: Dict[str, List[str]] = defaultdict(list)- for up in UserProfile.objects.select_related("realm").filter(- role=UserProfile.ROLE_REALM_OWNER,- is_active=True,- ):- realm_owners[up.realm.string_id].append(up.delivery_email)-for row in rows:row["date_created_day"] = row["date_created"].strftime("%Y-%m-%d")row["age_days"] = int((now - row["date_created"]).total_seconds() / 86400)row["is_new"] = row["age_days"] < 12 * 7- row["realm_owner_emails"] = ", ".join(realm_owners[row["string_id"]])# get messages sent per daycounts = get_realm_day_counts()@@ -283,7 +274,6 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:arr=total_arr,stats_link="",date_created_day="",- realm_owner_emails="",dau_count=total_dau_count,user_profile_count=total_user_profile_count,bot_count=total_bot_count,diff --git a/templates/analytics/realm_summary_table.html b/templates/analytics/realm_summary_table.htmlindex 07c3248a177..96822e24bb0 100644--- a/templates/analytics/realm_summary_table.html+++ b/templates/analytics/realm_summary_table.html@@ -9,7 +9,6 @@<li><strong>active (user)</strong> - sent a message, or advanced the pointer (reading messages doesn't count unless advances the pointer)</li><li><strong>ARR</strong> (Annual recurring revenue) - the number of users they are paying for * annual price/user.</li><li><strong>Rate</strong> - % of full price the customer pays, or will pay, if on a paid plan.</li>- <li><strong><th><i class="fa fa-envelope"></i></th></strong> - copies realm admin emails to clipboard</li><li><strong>DAU</strong> (daily active users) - users active in last 24hr</li><li><strong>WAU</strong> (weekly active users) - users active in last 7 * 24hr</li><li><strong>DAT</strong> (daily active time) - total user-activity time in last 24hr</li>@@ -80,11 +79,6 @@{% endif %}<td>- {% if not loop.first %}- <a class="envelope-link" data-admin-emails="{{ row.realm_owner_emails }}">- <i class="fa fa-envelope"></i>- </a>- {% endif %}{{ row.stats_link }}</td>