mirror of https://github.com/zulip/zulip.git
Add User Profile Count to General tab on /activity.
(imported from commit 231b3d6f2fe48f511d6387e25c2fea5e3accc186)
This commit is contained in:
parent
b84fb319ee
commit
902185f8fb
|
@ -6,6 +6,7 @@
|
|||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Active User Count</th>
|
||||
<th>User Profile Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -25,6 +26,11 @@
|
|||
{{ row.active_user_count }}
|
||||
</td>
|
||||
|
||||
{# User Profile Count #}
|
||||
<td class="number">
|
||||
{{ row.user_profile_count }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -1845,7 +1845,14 @@ def realm_summary_table():
|
|||
query = '''
|
||||
SELECT
|
||||
realm.domain,
|
||||
coalesce(user_counts.active_user_count, 0) active_user_count
|
||||
coalesce(user_counts.active_user_count, 0) active_user_count,
|
||||
(
|
||||
SELECT
|
||||
count(*)
|
||||
FROM zerver_userprofile up
|
||||
WHERE up.realm_id = realm.id
|
||||
AND is_active
|
||||
) user_profile_count
|
||||
FROM zerver_realm realm
|
||||
LEFT OUTER JOIN
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue