From ab771e4b19c9145ada8bfe938904c54b970b7172 Mon Sep 17 00:00:00 2001 From: Vishnu KS Date: Fri, 16 Apr 2021 23:47:48 +0530 Subject: [PATCH] support: Show the first human user in realm search result. --- analytics/tests/test_views.py | 3 +++ static/styles/portico/activity.css | 5 +++++ templates/analytics/realm_details.html | 13 ++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/analytics/tests/test_views.py b/analytics/tests/test_views.py index 2a930516ab..e7d1f795a1 100644 --- a/analytics/tests/test_views.py +++ b/analytics/tests/test_views.py @@ -618,8 +618,11 @@ class TestSupportEndpoint(ZulipTestCase): def check_zulip_realm_query_result(result: HttpResponse) -> None: zulip_realm = get_realm("zulip") + first_human_user = zulip_realm.get_first_human_user() + assert first_human_user is not None self.assert_in_success_response( [ + f"First human user: {first_human_user.delivery_email}\n", f'", '', diff --git a/static/styles/portico/activity.css b/static/styles/portico/activity.css index 4aa2e7c31e..bd0370c5ff 100644 --- a/static/styles/portico/activity.css +++ b/static/styles/portico/activity.css @@ -69,6 +69,11 @@ tr.admin td:first-child { top: -2px; } +.support-realm-status-form { + position: relative; + top: 20px; +} + .support-discount-form { position: relative; top: -50px; diff --git a/templates/analytics/realm_details.html b/templates/analytics/realm_details.html index 6bcb350fdf..a08137ab6f 100644 --- a/templates/analytics/realm_details.html +++ b/templates/analytics/realm_details.html @@ -19,7 +19,18 @@ {% endif %} -
+
+{% set first_human_user = realm.get_first_human_user() %} +{% if first_human_user %} +First human user: {{ first_human_user.delivery_email }} + + + +{% else %} +First human user: +{% endif %} + + Status:
{{ csrf_input }}