analytics: Add remote installation suport link function.

This commit is contained in:
Lauryn Menard 2023-11-28 13:49:44 +01:00 committed by Tim Abbott
parent 4e577119b4
commit 4fc639cead
1 changed files with 7 additions and 0 deletions

View File

@ -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