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.

analytics: Add remote installation suport link function.

Lauryn Menard4fc639ceadee
diff --git a/analytics/views/activity_common.py b/analytics/views/activity_common.py
index e86282554c1..c85cdad275c 100644
--- a/analytics/views/activity_common.py
+++ b/analytics/views/activity_common.py
@@ -146,6 +146,13 @@ def remote_installation_stats_link(server_id: int, hostname: str) -> Markup:
)
+def remote_installation_support_link(hostname: str) -> Markup:
+ support_url = reverse("remote_servers_support")
+ query = urlencode({"q": hostname})
+ url = append_url_query_string(support_url, query)
+ return Markup('<a href="{url}"><i class="fa fa-gear"></i></a>').format(url=url)
+
+
def get_user_activity_summary(records: Collection[UserActivity]) -> Dict[str, Any]:
#: The type annotation used above is clearly overly permissive.
#: We should perhaps use TypedDict to clearly lay out the schema