mirror of https://github.com/zulip/zulip.git
activity: Show plan_type in activity page.
This commit is contained in:
parent
2e6aaf3215
commit
6fcb095e70
|
@ -355,6 +355,7 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:
|
|||
SELECT
|
||||
realm.string_id,
|
||||
realm.date_created,
|
||||
realm.plan_type,
|
||||
coalesce(user_counts.dau_count, 0) dau_count,
|
||||
coalesce(wau_counts.wau_count, 0) wau_count,
|
||||
(
|
||||
|
@ -469,6 +470,8 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:
|
|||
|
||||
for row in rows:
|
||||
row['date_created_day'] = row['date_created'].strftime('%Y-%m-%d')
|
||||
row['plan_type_string'] = [
|
||||
'', 'self hosted', 'limited', 'premium', 'premium free'][row['plan_type']]
|
||||
row['age_days'] = int((now - row['date_created']).total_seconds()
|
||||
/ 86400)
|
||||
row['is_new'] = row['age_days'] < 12 * 7
|
||||
|
@ -519,6 +522,7 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:
|
|||
|
||||
rows.append(dict(
|
||||
string_id='Total',
|
||||
plan_type_string="",
|
||||
stats_link = '',
|
||||
date_created_day='',
|
||||
realm_admin_email='',
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<tr>
|
||||
<th>Realm</th>
|
||||
<th>Created (green if ≤12wk)</th>
|
||||
<th>Plan Type</th>
|
||||
<th></th>
|
||||
<th>DAU</th>
|
||||
<th>WAU</th>
|
||||
|
@ -64,6 +65,10 @@
|
|||
{{ row.date_created_day }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ row.plan_type_string }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if not loop.last %}
|
||||
<a class="envelope-link" data-value="{{ row.realm_admin_email }}">
|
||||
|
|
Loading…
Reference in New Issue