From 4fc639ceadee133df6c9dc2f085eef737a15a576 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Tue, 28 Nov 2023 13:49:44 +0100 Subject: [PATCH] analytics: Add remote installation suport link function. --- analytics/views/activity_common.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/analytics/views/activity_common.py b/analytics/views/activity_common.py index e86282554c..c85cdad275 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('').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