@require_server_admin
@has_request_variables
def get_activity(request: HttpRequest) -> HttpResponse:
    (duration_content, realm_minutes) = user_activity_intervals()
    counts_content: str = realm_summary_table(realm_minutes)
    data = [('Counts', counts_content), ('Durations', duration_content)]
    for page in ad_hoc_queries():
        data.append((page['title'], page['content']))
    title = 'Activity'
    return render(request, 'analytics/activity.html', context=dict(data=data, title=title, is_home=True))
@require_server_admin
@has_request_variables
def get_activity(request: HttpRequest) -> HttpResponse:
    (duration_content, realm_minutes) = user_activity_intervals()
    counts_content: str = realm_summary_table(realm_minutes)
    data = [('Counts', counts_content), ('Durations', duration_content)]
    for page in ad_hoc_queries():
        data.append((page['title'], page['content']))
    title = 'Activity'
    return render(request, 'analytics/activity.html', context=dict(data=data, title=title, is_home=True))