mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
adding known users column
This commit is contained in:
parent
959d5a386a
commit
94bc1a6867
2 changed files with 4 additions and 1 deletions
|
@ -973,6 +973,7 @@ def admin_instances():
|
|||
low_bandwidth = request.cookies.get('low_bandwidth', '0') == '1'
|
||||
|
||||
instances = Instance.query.order_by(Instance.domain)
|
||||
user_model = User
|
||||
|
||||
if search:
|
||||
instances = instances.filter(Instance.domain.ilike(f"%{search}%"))
|
||||
|
@ -987,7 +988,7 @@ def admin_instances():
|
|||
return render_template('admin/instances.html', instances=instances,
|
||||
title=_('Instances'), search=search,
|
||||
next_url=next_url, prev_url=prev_url,
|
||||
low_bandwidth=low_bandwidth,
|
||||
low_bandwidth=low_bandwidth, user_model=user_model,
|
||||
moderating_communities=moderating_communities(current_user.get_id()),
|
||||
joined_communities=joined_communities(current_user.get_id()),
|
||||
menu_topics=menu_topics(), site=g.site)
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<th>Domain</th>
|
||||
<th>Software</th>
|
||||
<th>Version</th>
|
||||
<th title="{{ _('Known Users') }}">Users</td>
|
||||
<th>Posts</th>
|
||||
<th>Post Replies</th>
|
||||
<th>Communities</th>
|
||||
|
@ -32,6 +33,7 @@
|
|||
<td><a href="https://{{ instance.domain }}" rel="noopener nofollow noindex noreferrer">{{ instance.domain }}</a></td>
|
||||
<td>{{ instance.software }}</td>
|
||||
<td>{{ instance.version if instance.version }}</td>
|
||||
<td>{{ len(user_model.query.filter_by(instance_id=instance.id).all()) }}</td>
|
||||
<td>{{ len(instance.posts.all()) }}</td>
|
||||
<td>{{ len(instance.post_replies.all()) }}</td>
|
||||
<td>{{ len(instance.communities.all()) }}</td>
|
||||
|
|
Loading…
Add table
Reference in a new issue