mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
remote-activity: Display latest audit log update for remote server.
Since the latest end time for reported active users on a remote server is not used to determine if a remote server has current data for billing purposes, we instead display the last audit log update datetime for the remote server object. Removes the note in the remote activity key about the Zulip version. Also adds a sum in the total row for mobile push notifications sent.
This commit is contained in:
committed by
Tim Abbott
parent
2e7715e522
commit
4143101637
@@ -36,8 +36,7 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
|
||||
icount as (
|
||||
select
|
||||
icount_id.server_id,
|
||||
value as latest_value,
|
||||
end_time as latest_end_time
|
||||
value as latest_value
|
||||
from icount_id
|
||||
join zilencer_remoteinstallationcount
|
||||
on max_count_id = zilencer_remoteinstallationcount.id
|
||||
@@ -64,9 +63,9 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
|
||||
rserver.hostname,
|
||||
rserver.contact_email,
|
||||
rserver.last_version,
|
||||
rserver.last_audit_log_update,
|
||||
latest_value,
|
||||
push_user_count,
|
||||
latest_end_time,
|
||||
push_forwarded_count
|
||||
from zilencer_remotezulipserver rserver
|
||||
left join icount on icount.server_id = rserver.id
|
||||
@@ -82,9 +81,9 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
|
||||
"Hostname",
|
||||
"Contact email",
|
||||
"Zulip version",
|
||||
"Last audit log update",
|
||||
"Analytics users",
|
||||
"Mobile users",
|
||||
"Last update time",
|
||||
"Mobile pushes forwarded",
|
||||
"Plan name",
|
||||
"Plan status",
|
||||
@@ -96,7 +95,7 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
|
||||
|
||||
rows = get_query_data(query)
|
||||
total_row = []
|
||||
totals_columns = [4, 5]
|
||||
totals_columns = [5, 6, 7]
|
||||
plan_data_by_remote_server = get_plan_data_by_remote_server()
|
||||
|
||||
for row in rows:
|
||||
@@ -121,7 +120,7 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
|
||||
links = stats + " " + support
|
||||
row.append(links)
|
||||
for i, col in enumerate(cols):
|
||||
if col == "Last update time":
|
||||
if col == "Last audit log update":
|
||||
fix_rows(rows, i, format_date_for_activity_reports)
|
||||
if col in ["Mobile users", "Mobile pushes forwarded"]:
|
||||
fix_rows(rows, i, format_none_as_zero)
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<h4>Chart key:</h4>
|
||||
<ul>
|
||||
<li><strong>Zulip version</strong> - as of last update time</li>
|
||||
<li><strong>Mobile pushes forwarded</strong> - last 7 days, including today's current count</li>
|
||||
<li><strong>ARR</strong> (annual recurring revenue) - the number of users they are paying for * annual price/user</li>
|
||||
<li><strong>Links</strong>
|
||||
|
Reference in New Issue
Block a user