Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

remote-support: Highlight if audit log data is stale or current.

Lauryn Menard4d470a52f86f
diff --git a/corporate/lib/support.py b/corporate/lib/support.py
index 15f0f962a6f..731188fa1cc 100644
--- a/corporate/lib/support.py
+++ b/corporate/lib/support.py
@@ -98,6 +98,7 @@ class MobilePushData:
@dataclass
class RemoteSupportData:
date_created: datetime
+ has_stale_audit_log: bool
plan_data: PlanData
sponsorship_data: SponsorshipData
user_data: RemoteCustomerUserCount
@@ -376,6 +377,7 @@ def get_data_for_remote_support_view(billing_session: BillingSession) -> RemoteS
return RemoteSupportData(
date_created=date_created,
+ has_stale_audit_log=stale_audit_log_data,
plan_data=plan_data,
sponsorship_data=sponsorship_data,
user_data=user_data,
diff --git a/templates/corporate/support/current_plan_details.html b/templates/corporate/support/current_plan_details.html
index 9a3fc3aa1f5..c72c8538487 100644
--- a/templates/corporate/support/current_plan_details.html
+++ b/templates/corporate/support/current_plan_details.html
@@ -2,8 +2,7 @@
<p class="support-section-header">📅 Current plan information:</p>
{% if plan_data.warning %}
<div class="current-plan-data-missing">
- {{ plan_data.warning }}
- <br />
+ <b>{{ plan_data.warning }}</b><br />
</div>
{% endif %}
<b>Plan name</b>: {{ plan_data.current_plan.name }}<br />
diff --git a/templates/corporate/support/remote_server_support.html b/templates/corporate/support/remote_server_support.html
index ab3efdff0f0..a2ff787112b 100644
--- a/templates/corporate/support/remote_server_support.html
+++ b/templates/corporate/support/remote_server_support.html
@@ -68,7 +68,11 @@
<b>Has remote realms</b>: {{ remote_realms[remote_server.id] != [] }}<br />
<br />
<b>Max monthly messages</b>: {{ remote_server_to_max_monthly_messages[remote_server.id] }}<br />
- <b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}<br />
+ {% if remote_servers_support_data[remote_server.id].has_stale_audit_log %}
+ <span class="stale-audit-log"><b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}</span><br />
+ {% else %}
+ <span class="current-audit-log"><b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}</span><br />
+ {% endif %}
<b>Plan type</b>: {{ get_plan_type_name(remote_server.plan_type) }}<br />
<b>Non-guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.non_guest_user_count }}<br />
<b>Guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.guest_user_count }}<br />
diff --git a/web/styles/portico/activity.css b/web/styles/portico/activity.css
index 04e47523cc0..99de76215eb 100644
--- a/web/styles/portico/activity.css
+++ b/web/styles/portico/activity.css
@@ -104,7 +104,6 @@ tr.admin td:first-child {
color: hsl(120deg 100% 33%);
}
-.current-plan-data-missing,
.bad {
font-weight: bold;
color: hsl(0deg 100% 39%);
@@ -176,6 +175,15 @@ tr.admin td:first-child {
.remote-label {
background-color: hsl(186deg 76% 36%);
}
+
+ .current-audit-log {
+ color: hsl(123deg 46% 34%);
+ }
+
+ .current-plan-data-missing,
+ .stale-audit-log {
+ color: hsl(2deg 64% 53%);
+ }
}
.reactivate-remote-server-button,