mirror of https://github.com/zulip/zulip.git
activity: Add realm stats link to "realm activtiy table".
This commit is contained in:
parent
b26c38bc47
commit
03a2a9c792
|
@ -468,6 +468,7 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:
|
|||
|
||||
# formatting
|
||||
for row in rows:
|
||||
row['stats_link'] = realm_stats_link(row['string_id'])
|
||||
row['string_id'] = realm_activity_link(row['string_id'])
|
||||
|
||||
# Count active sites
|
||||
|
@ -489,6 +490,7 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str:
|
|||
|
||||
rows.append(dict(
|
||||
string_id='Total',
|
||||
stats_link = '',
|
||||
date_created_day='',
|
||||
realm_admin_email='',
|
||||
dau_count=total_dau_count,
|
||||
|
@ -934,6 +936,12 @@ def realm_activity_link(realm_str: str) -> mark_safe:
|
|||
realm_link = '<a href="%s">%s</a>' % (url, realm_str)
|
||||
return mark_safe(realm_link)
|
||||
|
||||
def realm_stats_link(realm_str: str) -> mark_safe:
|
||||
url_name = 'analytics.views.stats_for_realm'
|
||||
url = reverse(url_name, kwargs=dict(realm_str=realm_str))
|
||||
stats_link = '<a href="{}"><i class="fa fa-pie-chart"></i></a>'.format(url, realm_str)
|
||||
return mark_safe(stats_link)
|
||||
|
||||
def realm_client_table(user_summaries: Dict[str, Dict[str, Dict[str, Any]]]) -> str:
|
||||
exclude_keys = [
|
||||
'internal',
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<tr>
|
||||
<th>Realm</th>
|
||||
<th>Created (green if ≤12wk)</th>
|
||||
<th><i class="fa fa-envelope"></i></th>
|
||||
<th></th>
|
||||
<th>DAU</th>
|
||||
<th>WAU</th>
|
||||
<th>Total users</th>
|
||||
|
@ -63,12 +63,13 @@
|
|||
{{ row.date_created_day }}
|
||||
</td>
|
||||
|
||||
<td class="envelope">
|
||||
<td>
|
||||
{% if not loop.last %}
|
||||
<a class="envelope-link" data-value="{{ row.realm_admin_email }}">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ row.stats_link }}
|
||||
</td>
|
||||
|
||||
<td class="number">
|
||||
|
|
Loading…
Reference in New Issue